test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] fix 2vf_k2d_scapy_stream miscellaneous package
@ 2017-06-16  6:26 xu,gang
  2017-06-23 17:13 ` Liu, Yong
  0 siblings, 1 reply; 2+ messages in thread
From: xu,gang @ 2017-06-16  6:26 UTC (permalink / raw)
  To: dts; +Cc: xu,gang

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dts] [PATCH V1] fix 2vf_k2d_scapy_stream miscellaneous package
  2017-06-16  6:26 [dts] [PATCH V1] fix 2vf_k2d_scapy_stream miscellaneous package xu,gang
@ 2017-06-23 17:13 ` Liu, Yong
  0 siblings, 0 replies; 2+ messages in thread
From: Liu, Yong @ 2017-06-23 17:13 UTC (permalink / raw)
  To: Xu, GangX, dts; +Cc: Xu, GangX

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of xu,gang
> Sent: Thursday, June 15, 2017 11:27 PM
> To: dts@dpdk.org
> Cc: Xu, GangX <gangx.xu@intel.com>
> Subject: [dts] [PATCH V1] fix 2vf_k2d_scapy_stream miscellaneous package

Please follow unified subject format, it should be "tests name: fix issue...". 
Package should be packet.

> 
> 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)

There should be one space between two parameters. 

> +        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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-23 17:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-16  6:26 [dts] [PATCH V1] fix 2vf_k2d_scapy_stream miscellaneous package xu,gang
2017-06-23 17:13 ` Liu, Yong

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).