test suite reviews and discussions
 help / color / mirror / Atom feed
From: "xu,gang" <gangx.xu@intel.com>
To: dts@dpdk.org
Cc: "xu,gang" <gangx.xu@intel.com>
Subject: [dts] [PATCH V1] fix 2vf_k2d_scapy_stream miscellaneous package
Date: Fri, 16 Jun 2017 14:26:34 +0800	[thread overview]
Message-ID: <1497594394-7449-1-git-send-email-gangx.xu@intel.com> (raw)

check rx package src and dst to confirm rx correct package

Signed-off-by: xu,gang <gangx.xu@intel.com>
---
 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

             reply	other threads:[~2017-06-16  6:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-16  6:26 xu,gang [this message]
2017-06-23 17:13 ` Liu, Yong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1497594394-7449-1-git-send-email-gangx.xu@intel.com \
    --to=gangx.xu@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).