From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 42D912B8D for ; Fri, 16 Jun 2017 08:25:14 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Jun 2017 23:25:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,346,1493708400"; d="scan'208";a="1141851830" Received: from unknown (HELO dpdk-fedora20.icx.intel.com) ([10.240.176.135]) by orsmga001.jf.intel.com with ESMTP; 15 Jun 2017 23:25:11 -0700 From: "xu,gang" To: dts@dpdk.org Cc: "xu,gang" Date: Fri, 16 Jun 2017 14:26:34 +0800 Message-Id: <1497594394-7449-1-git-send-email-gangx.xu@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dts] [PATCH V1] fix 2vf_k2d_scapy_stream miscellaneous package 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: Fri, 16 Jun 2017 06:25:15 -0000 check rx package src and dst to confirm rx correct package Signed-off-by: xu,gang --- tests/TestSuite_vf_to_vf_nic_bridge.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/tests/TestSuite_vf_to_vf_nic_bridge.py b/tests/TestSuite_vf_to_vf_nic_bridge.py index b890be0..58142a3 100644 --- a/tests/TestSuite_vf_to_vf_nic_bridge.py +++ b/tests/TestSuite_vf_to_vf_nic_bridge.py @@ -216,11 +216,6 @@ class TestVF2VFBridge(TestCase): self.vm0_ports = self.vm0_dut.get_ports('any') self.vm0_pmd = PmdOutput(self.vm0_dut) self.vm0_pmd.start_testpmd('all') - self.vm0_pmd.execute_cmd('set fwd rxonly') - self.vm0_pmd.execute_cmd('start') - # disable promisc to filter misc packets from tester. - self.vm0_pmd.execute_cmd('set promisc all off') - self.vm0_pmd.execute_cmd('clear port stats all') self.vm1_ports = self.vm1_dut.get_ports('any') self.vm1_dut.restore_interfaces() @@ -231,10 +226,20 @@ class TestVF2VFBridge(TestCase): pkt_content = 'Ether(dst="%s", src="%s")/IP()/Raw(load="X"*46)' % \ (dst_mac, src_mac) self.vm1_dut.send_expect('scapy', '>>> ', 10) + + self.vm0_pmd.execute_cmd('set promisc all off') + self.vm0_pmd.execute_cmd('set fwd rxonly') + self.vm0_pmd.execute_cmd('set verbose 1') + self.vm0_pmd.execute_cmd('start') + self.vm1_dut.send_expect('sendp([%s], iface="%s", count=%d)' % (pkt_content, vf1_intf, SEND_PACKET), '>>> ', 30) + + out = self.vm0_dut.get_session_output(timeout=60) + rx_packets = re.findall("src=%s - dst=%s" % (src_mac,dst_mac), out) + recv_num = len(rx_packets) + self.vm1_dut.send_expect('quit()', '# ', 10) self.vm1_dut.bind_interfaces_linux(self.drivername) - recv_num = self.vm0_pmd.get_pmd_stats(0)['RX-packets'] self.vm0_pmd.execute_cmd('stop') self.vm0_pmd.execute_cmd('quit', '# ') -- 1.9.3