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 B7DE18E79 for ; Wed, 25 Nov 2015 09:00:34 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP; 25 Nov 2015 00:00:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,341,1444719600"; d="scan'208";a="828597194" Received: from unknown (HELO dpdk-fedora20.icx.intel.com) ([10.238.55.64]) by orsmga001.jf.intel.com with ESMTP; 25 Nov 2015 00:00:28 -0800 From: haifeng To: dts@dpdk.org Date: Wed, 25 Nov 2015 15:55:58 +0800 Message-Id: <1448438158-3657-1-git-send-email-haifengx.tang@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dts] [DTS][PATCH] fix tx crc 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: Wed, 25 Nov 2015 08:00:35 -0000 Signed-off-by: haifeng --- tests/TestSuite_shutdown_api.py | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/tests/TestSuite_shutdown_api.py b/tests/TestSuite_shutdown_api.py index 23888f4..411e4bf 100644 --- a/tests/TestSuite_shutdown_api.py +++ b/tests/TestSuite_shutdown_api.py @@ -82,7 +82,7 @@ class TestShutdownApi(TestCase): stats = output.get_pmd_stats(portid) return stats - def check_forwarding(self, ports=None, pktSize=68, received=True, vlan=False, promisc=False, crcStrip=False): + def check_forwarding(self, ports=None, pktSize=68, received=True, vlan=False, promisc=False, crcStrip=True): if ports is None: ports = self.ports if len(ports) == 1: @@ -146,25 +146,14 @@ class TestShutdownApi(TestCase): # RRC will always strip rx/tx vlan rx_bytes_exp -= 4 tx_bytes_exp -= 4 - elif self.nic in ["fortville_eagle", "fortville_spirit", - "fortville_spirit_single", "bartonhills"]: - # some NIC will always strip tx crc - tx_bytes_exp -= 4 - if vlan is True: - # vlan strip default is on - tx_bytes_exp -= 4 - elif self.nic in ["springville", "powerville"]: - if vlan is True: - # vlan strip default is on - tx_bytes_exp -= 4 else: - # some NIC will always include tx crc - if crcStrip is True: - rx_bytes_exp -= 4 - if vlan is True: - # vlan strip default is on - tx_bytes_exp -= 4 - + if self.nic not in ['kawela_4']: + tx_bytes_exp -= 4 + if crcStrip is True: + rx_bytes_exp -= 4 + if vlan is True: + tx_bytes_exp -= 4 + if received: self.verify(p0tx_pkts == p1rx_pkts, "Wrong TX pkts p0_tx=%d, p1_rx=%d" % (p0tx_pkts, p1rx_pkts)) self.verify(p1rx_bytes == rx_bytes_exp, "Wrong Rx bytes p1_rx=%d, expect=%d" % (p1rx_bytes, rx_bytes_exp)) -- 1.9.3