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 EAD96A0471 for ; Mon, 15 Jul 2019 11:42:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E135A325F; Mon, 15 Jul 2019 11:42:14 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id E18D52C6A for ; Mon, 15 Jul 2019 11:42:12 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Jul 2019 02:42:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,493,1557212400"; d="scan'208";a="194455488" Received: from unknown (HELO debug193.icx.intel.com) ([10.240.176.193]) by fmsmga002.fm.intel.com with ESMTP; 15 Jul 2019 02:42:11 -0700 From: Wenjie Li To: dts@dpdk.org Cc: Wenjie Li Date: Mon, 15 Jul 2019 18:37:49 +0000 Message-Id: <1563215869-27837-1-git-send-email-wenjiex.a.li@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dts] [PATCH V1] tests/userspace_ethtool: optimze port_mtu for springville/powerville 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" 1. From DPDK-15062, max mtu of igb NIC is 2026; change mtu_threshold to 2026 for powerville and springville in script. 2. The ether headsize is 22 bytes(not 18) in igb nics; add an offset(4 bytes) for the packets. Signed-off-by: Wenjie Li --- tests/TestSuite_userspace_ethtool.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/TestSuite_userspace_ethtool.py b/tests/TestSuite_userspace_ethtool.py index c774552..afd5d00 100644 --- a/tests/TestSuite_userspace_ethtool.py +++ b/tests/TestSuite_userspace_ethtool.py @@ -548,6 +548,10 @@ class TestUserspaceEthtool(TestCase, IxiaPacketGenerator): self.dut.send_expect(self.cmd, "EthApp>", 60) mtus = [1519, 2048] mtu_threshold = 2022 + offset = 0 + if self.nic in ['powerville', 'springville']: + mtu_threshold = 2026 + offset = 4 for index in range(len(self.ports)): port = self.ports[index] # change mtu @@ -558,17 +562,20 @@ class TestUserspaceEthtool(TestCase, IxiaPacketGenerator): for mtu in mtus: # The mtu threshold is 2022,When it is greater than 2022, the open/stop port is required. 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("mtu %d %d" % (index, mtu), "EthApp>") + time.sleep(5) ori_rx_pkts, _ = self.strip_portstats(index) - pkt_size = mtu + HEADER_SIZE['eth'] + pkt_size = mtu + HEADER_SIZE['eth'] + offset pkt = Packet(pkt_len=pkt_size) pkt.send_pkt(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_len=mtu + 1 + HEADER_SIZE['eth']) + pkt = Packet(pkt_len=mtu + 1 + HEADER_SIZE['eth'] + offset) pkt.send_pkt(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