From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id C59F7271 for ; Thu, 29 Mar 2018 09:42:49 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Mar 2018 00:42:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,376,1517904000"; d="scan'208";a="42249332" Received: from unknown (HELO dpdk-fedora20.icx.intel.com) ([10.240.176.135]) by fmsmga001.fm.intel.com with ESMTP; 29 Mar 2018 00:42:47 -0700 From: "han,yingya" To: dts@dpdk.org Cc: "han,yingya" Date: Thu, 29 Mar 2018 15:44:02 +0800 Message-Id: <1522309442-103581-1-git-send-email-yingyax.han@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dts] [PATCH V1]tests/userspace_ethtool: fix FVL stats issue 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: Thu, 29 Mar 2018 07:42:50 -0000 FVL port statistic is retrieved from register. Those filtered packets still will be calculated in. Signed-off-by: han,yingya --- 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