From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id B91FB2BB9 for ; Tue, 17 Jan 2017 03:13:14 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP; 16 Jan 2017 18:13:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,242,1477983600"; d="scan'208";a="31386713" Received: from unknown (HELO dpdk-fedora20.icx.intel.com) ([10.240.176.135]) by orsmga002.jf.intel.com with ESMTP; 16 Jan 2017 18:13:12 -0800 From: Lijuan Tu To: dts@dpdk.org Cc: Lijuan Tu Date: Tue, 17 Jan 2017 10:14:18 +0800 Message-Id: <1484619258-47474-1-git-send-email-lijuanx.a.tu@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dts] [PATCH V1] vf_to_vf_nic_bridge: fix packets calculate error X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jan 2017 02:13:15 -0000 Sender will send misc packets becuase of some protocol. The misc packets is broadcast or multicast packets. We can only calculate unicast packets to aviod this. Clear qume when we destroy vfs. Signed-off-by: Lijuan Tu --- tests/TestSuite_vf_to_vf_nic_bridge.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/TestSuite_vf_to_vf_nic_bridge.py b/tests/TestSuite_vf_to_vf_nic_bridge.py index 065038a..0080013 100644 --- a/tests/TestSuite_vf_to_vf_nic_bridge.py +++ b/tests/TestSuite_vf_to_vf_nic_bridge.py @@ -100,6 +100,10 @@ class TestVF2VFBridge(TestCase): if self.vm1 is not None: self.vm1.stop() self.vm1 = None + + self.dut.virt_exit() + time.sleep(3) + if self.pf_port_for_vfs is not None: self.dut.destroy_sriov_vfs_by_port(self.pf_port_for_vfs) port = self.dut.ports_info[self.pf_port_for_vfs]['port'] @@ -187,7 +191,7 @@ class TestVF2VFBridge(TestCase): self.vm0_dut.restore_interfaces() self.vm0_ports = self.vm0_dut.get_ports('any') vf0_intf = self.vm0_dut.ports_info[self.vm0_ports[0]]['intf'] - self.vm0_dut.send_expect('tcpdump -i %s -s 1000 ' % vf0_intf, 'tcpdump', 30) +# self.vm0_dut.send_expect('tcpdump -i %s -s 1000 "ether src %s and ether dst %s""' % (vf0_intf, src['ether'], dst['ether']), 'tcpdump', 30) self.vm1_ports = self.vm1_dut.get_ports('any') self.prepare_pktgen(self.vm1_dut) @@ -201,6 +205,8 @@ class TestVF2VFBridge(TestCase): load = {} load['content'] = "'X'*46" self.generate_pcap_pkt(dst, src, load) + + self.vm0_dut.send_expect('tcpdump -i %s -s 1000 "ether src %s and ether dst %s"' % (vf0_intf, src['ether'], dst['ether']), 'tcpdump', 30) self.send_stream_pktgen(self.vm1_dut) self.stop_stream_pktgen(self.vm1_dut) -- 1.9.3