[dts] [PATCH V1] tests/vmdq: recorrect the dst mac of pcap

Han, YingyaX yingyax.han at intel.com
Thu Jun 18 04:12:38 CEST 2020


Tested-by: Han,YingyaX <yingyax.han at intel.com>

Best regards,
Yingya

-----Original Message-----
From: Ma, LihongX <lihongx.ma at intel.com> 
Sent: Thursday, June 18, 2020 2:29 AM
To: dts at dpdk.org; Han, YingyaX <yingyax.han at intel.com>
Cc: Ma, LihongX <lihongx.ma at intel.com>
Subject: [dts][PATCH V1] tests/vmdq: recorrect the dst mac of pcap

Signed-off-by: lihong <lihongx.ma at intel.com>
---
 tests/TestSuite_vmdq.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/TestSuite_vmdq.py b/tests/TestSuite_vmdq.py index e5dcd82..162636f 100644
--- a/tests/TestSuite_vmdq.py
+++ b/tests/TestSuite_vmdq.py
@@ -166,11 +166,13 @@ class TestVmdq(TestCase):
         for _port in self.dut_ports:
             if _port % len(self.dut_ports) == 0 or len(self.dut_ports) % _port == 2:
                 txIntf = self.tester.get_local_port(self.dut_ports[_port + 1])
+                dst_port = _port + 1
             else:
                 txIntf = self.tester.get_local_port(self.dut_ports[_port - 1])
+                dst_port = _port - 1
             rxIntf = self.tester.get_local_port(self.dut_ports[_port])
-            self.tester.scapy_append('flows = [Ether(dst="%s")/Dot1Q(vlan=0)/("X"*%d)]'
-                                     % (self.destmac_port[txIntf], payload))
+            self.tester.scapy_append('flows = [Ether(dst="%s")/Dot1Q(vlan=0)/IP(src="1.2.3.4", dst="1.1.1.1")/("X"*%d)]'
+                                     % (self.destmac_port[dst_port], 
+ payload))
             pcap = os.sep.join([self.output_path, "%s-%d.pcap" % (self.suite_name, _port)])
             self.tester.scapy_append('wrpcap("%s", flows)' % pcap)
             self.tester.scapy_execute()
--
2.7.4

-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestVmdq.log
Type: application/octet-stream
Size: 547136 bytes
Desc: TestVmdq.log
URL: <http://mails.dpdk.org/archives/dts/attachments/20200618/dae37533/attachment.obj>


More information about the dts mailing list