[dts] [PATCH V1]tests/userspace_ethtool: fix FVL stats issue
han,yingya
yingyax.han at intel.com
Thu Mar 29 09:44:02 CEST 2018
FVL port statistic is retrieved from register.
Those filtered packets still will be calculated in.
Signed-off-by: han,yingya <yingyax.han at 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
More information about the dts
mailing list