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

lihong lihongx.ma at intel.com
Wed Jun 17 20:29:22 CEST 2020


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



More information about the dts mailing list