From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B6953A3168 for ; Thu, 17 Oct 2019 09:43:55 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 72E3F1E881; Thu, 17 Oct 2019 09:43:55 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 667151E880 for ; Thu, 17 Oct 2019 09:43:54 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Oct 2019 00:43:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,306,1566889200"; d="scan'208";a="279790680" Received: from ubuntu.sh.intel.com ([10.239.250.27]) by orsmga001.jf.intel.com with ESMTP; 17 Oct 2019 00:43:52 -0700 From: Peng Zhihong To: dts@dpdk.org Cc: Peng Zhihong Date: Thu, 17 Oct 2019 08:44:12 -0700 Message-Id: <20191017154412.13493-1-zhihongx.peng@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH V1] Packets larger than mtu 8 bytes can be received by cvl; the portstats command must be executed when the program starts to receive packets as large as mtu. 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: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Signed-off-by: Peng Zhihong --- tests/TestSuite_userspace_ethtool.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/TestSuite_userspace_ethtool.py b/tests/TestSuite_userspace_ethtool.py index 116fd3a..bdbbea3 100644 --- a/tests/TestSuite_userspace_ethtool.py +++ b/tests/TestSuite_userspace_ethtool.py @@ -546,6 +546,7 @@ class TestUserspaceEthtool(TestCase, IxiaPacketGenerator): mtus = [1519, 2048] mtu_threshold = 2022 offset = 0 + ice_eth_overhead = 8 if self.nic in ['powerville', 'springville']: mtu_threshold = 2026 offset = 4 @@ -561,10 +562,10 @@ class TestUserspaceEthtool(TestCase, IxiaPacketGenerator): if mtu > mtu_threshold: if self.nic in ['powerville', 'springville']: mtu = mtu_threshold - self.dut.send_expect("stop %s" % index, "EthApp>") - self.dut.send_expect("mtu %d %d" % (index, mtu), "EthApp>") - self.dut.send_expect("open %s" % index, "EthApp>") + self.dut.send_expect("stop %s" % index, "EthApp>") self.dut.send_expect("mtu %d %d" % (index, mtu), "EthApp>") + self.dut.send_expect("open %s" % index, "EthApp>") + self.dut.send_expect("portstats %d" % (index), "EthApp>") time.sleep(5) ori_rx_pkts, _ = self.strip_portstats(index) pkt_size = mtu + HEADER_SIZE['eth'] + offset @@ -572,7 +573,10 @@ class TestUserspaceEthtool(TestCase, IxiaPacketGenerator): pkt.send_pkt(self.tester, tx_port=intf, count=4) rx_pkts, _ = self.strip_portstats(index) self.verify(rx_pkts == ori_rx_pkts + 4, "Packet match mtu not forwarded as expected") - pkt = Packet(pkt_type='UDP', pkt_len=mtu + 1 + HEADER_SIZE['eth'] + offset) + if self.nic in ['columbiaville_25g', 'columbiaville_100g']: + pkt = Packet(pkt_type='UDP', pkt_len=mtu + ice_eth_overhead + 1 + HEADER_SIZE['eth'] + offset) + else: + pkt = Packet(pkt_type='UDP', pkt_len=mtu + 1 + HEADER_SIZE['eth'] + offset) pkt.send_pkt(self.tester, tx_port=intf, count=4) rx_pkts_over, _ = self.strip_portstats(index) self.verify(rx_pkts == rx_pkts_over, "Packet over mtu should not be forwarded") -- 2.17.1