test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1]tests/userspace_ethtool: fix FVL stats issue
@ 2018-03-29  7:44 han,yingya
  2018-04-10  1:29 ` Liu, Yong
  0 siblings, 1 reply; 2+ messages in thread
From: han,yingya @ 2018-03-29  7:44 UTC (permalink / raw)
  To: dts; +Cc: han,yingya

FVL port statistic is retrieved from register.
Those filtered packets still will be calculated in.
Signed-off-by: han,yingya <yingyax.han@intel.com>
---
 tests/TestSuite_userspace_ethtool.py | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/tests/TestSuite_userspace_ethtool.py b/tests/TestSuite_userspace_ethtool.py
index 84b1f1e..44bac01 100644
--- a/tests/TestSuite_userspace_ethtool.py
+++ b/tests/TestSuite_userspace_ethtool.py
@@ -443,7 +443,11 @@ class TestUserspaceEthtool(TestCase, IxiaPacketGenerator):
             pkt.send_pkt(tx_port=intf)
             time.sleep(2)
             rx_pkts_wrong, _ = self.strip_portstats(port)
-            self.verify(rx_pkts_wrong == rx_pkts, "Failed to filter Rx vlan packet")
+            if self.nic.startswith('fortville'):
+                self.verify(rx_pkts_wrong == rx_pkts + 1, "Failed to filter Rx vlan packet")
+                self.verify(_ == rx_pkts, "Failed to filter Rx vlan packet")
+            else:
+                self.verify(rx_pkts_wrong == rx_pkts, "Failed to filter Rx vlan packet")
 
             # remove vlan
             self.dut.send_expect("vlan %d del %d" % (index, vlan), "EthApp>")
@@ -452,7 +456,11 @@ class TestUserspaceEthtool(TestCase, IxiaPacketGenerator):
             pkt.send_pkt(tx_port=intf)
             time.sleep(2)
             rx_pkts_del, _ = self.strip_portstats(port)
-            self.verify(rx_pkts_del == rx_pkts, "Failed to remove Rx vlan filter")
+            if self.nic.startswith('fortville'):
+                self.verify(rx_pkts_del == rx_pkts_wrong + 1, "Failed to filter Rx vlan packet")
+                self.verify(_ == rx_pkts, "Failed to filter Rx vlan packet")
+            else:
+                self.verify(rx_pkts_del == rx_pkts, "Failed to filter Rx vlan packet")
 
         self.dut.send_expect("quit", "# ")
         self.dut.send_expect("sed -i -e '/hw_vlan_filter=1;$/d' %s" % main_file, "# ")
-- 
1.9.3

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

* Re: [dts] [PATCH V1]tests/userspace_ethtool: fix FVL stats issue
  2018-03-29  7:44 [dts] [PATCH V1]tests/userspace_ethtool: fix FVL stats issue han,yingya
@ 2018-04-10  1:29 ` Liu, Yong
  0 siblings, 0 replies; 2+ messages in thread
From: Liu, Yong @ 2018-04-10  1:29 UTC (permalink / raw)
  To: Han, YingyaX, dts; +Cc: Han, YingyaX

Yingya,
One comments below.

Thanks,
Marvin

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of han,yingya
> Sent: Thursday, March 29, 2018 3:44 PM
> To: dts@dpdk.org
> Cc: Han, YingyaX <yingyax.han@intel.com>
> Subject: [dts] [PATCH V1]tests/userspace_ethtool: fix FVL stats issue
> 
> FVL port statistic is retrieved from register.
> Those filtered packets still will be calculated in.
> Signed-off-by: han,yingya <yingyax.han@intel.com>
> ---
>  tests/TestSuite_userspace_ethtool.py | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/TestSuite_userspace_ethtool.py
> b/tests/TestSuite_userspace_ethtool.py
> index 84b1f1e..44bac01 100644
> --- a/tests/TestSuite_userspace_ethtool.py
> +++ b/tests/TestSuite_userspace_ethtool.py
> @@ -443,7 +443,11 @@ class TestUserspaceEthtool(TestCase,
> IxiaPacketGenerator):
>              pkt.send_pkt(tx_port=intf)
>              time.sleep(2)
>              rx_pkts_wrong, _ = self.strip_portstats(port)
> -            self.verify(rx_pkts_wrong == rx_pkts, "Failed to filter Rx
> vlan packet")
> +            if self.nic.startswith('fortville'):
> +                self.verify(rx_pkts_wrong == rx_pkts + 1, "Failed to
> filter Rx vlan packet")
> +                self.verify(_ == rx_pkts, "Failed to filter Rx vlan
> packet")
> +            else:
> +                self.verify(rx_pkts_wrong == rx_pkts, "Failed to filter
> Rx vlan packet")

Since transmitted packets number can be used to track the number of actually received packets,
Why not just use that one? Basic vlan feature has been covered in vlan suite, so I think
We can simplify the problem here. 

> 
>              # remove vlan
>              self.dut.send_expect("vlan %d del %d" % (index, vlan),
> "EthApp>")
> @@ -452,7 +456,11 @@ class TestUserspaceEthtool(TestCase,
> IxiaPacketGenerator):
>              pkt.send_pkt(tx_port=intf)
>              time.sleep(2)
>              rx_pkts_del, _ = self.strip_portstats(port)
> -            self.verify(rx_pkts_del == rx_pkts, "Failed to remove Rx vlan
> filter")
> +            if self.nic.startswith('fortville'):
> +                self.verify(rx_pkts_del == rx_pkts_wrong + 1, "Failed to
> filter Rx vlan packet")
> +                self.verify(_ == rx_pkts, "Failed to filter Rx vlan
> packet")
> +            else:
> +                self.verify(rx_pkts_del == rx_pkts, "Failed to filter Rx
> vlan packet")
> 
>          self.dut.send_expect("quit", "# ")
>          self.dut.send_expect("sed -i -e '/hw_vlan_filter=1;$/d' %s" %
> main_file, "# ")
> --
> 1.9.3

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

end of thread, other threads:[~2018-04-10  1:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-29  7:44 [dts] [PATCH V1]tests/userspace_ethtool: fix FVL stats issue han,yingya
2018-04-10  1:29 ` 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).