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 0496CA04DD for ; Mon, 16 Nov 2020 20:04:09 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A35402C16; Mon, 16 Nov 2020 20:04:08 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 0A7CB2C16; Mon, 16 Nov 2020 20:04:05 +0100 (CET) IronPort-SDR: v3J/eHLbXiqOLfkKpinJelNSKqwqYcnoUF739J3NF0dZDxwbmMRu50FKxlRcpRNjR8jl8sRGDL eWCWRmHnkCfQ== X-IronPort-AV: E=McAfee;i="6000,8403,9807"; a="158574278" X-IronPort-AV: E=Sophos;i="5.77,483,1596524400"; d="scan'208";a="158574278" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Nov 2020 11:03:59 -0800 IronPort-SDR: Rl4ZGFmYh3z5B4Gf/pVUJhfIEaXV2SZeErMUpZ8SdvbjSZVwcYK1HJz6nkqRaza+zB0+Dw5wgu gyTsRt4Uuxdw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,483,1596524400"; d="scan'208";a="533519860" Received: from silpixa00399752.ir.intel.com (HELO silpixa00399752.ger.corp.intel.com) ([10.237.222.180]) by fmsmga005.fm.intel.com with ESMTP; 16 Nov 2020 11:03:57 -0800 From: Ferruh Yigit To: Wenzhuo Lu , Beilei Xing , Bernard Iremonger , Qi Zhang , Andrew Rybchenko Cc: Ferruh Yigit , dev@dpdk.org, stable@dpdk.org Date: Mon, 16 Nov 2020 19:03:54 +0000 Message-Id: <20201116190355.3390447-1-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH] app/testpmd: revert setting MTU explicitly after configure X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Setting MTU after each 'rte_eth_dev_configure()' prevents using "--max-pkt-len=N" parameter and "port config all max-pkt-len #" command This is breaking DTS scatter test case which is using "--max-pkt-len=9000" testpmd parameter. Reverting workaround to recover the DTS testcase. Fixes: 1c21ee95cf52 ("app/testpmd: fix MTU after device configure") Cc: stable@dpdk.org Signed-off-by: Ferruh Yigit --- app/test-pmd/testpmd.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 48e9647fc7..33fc0fddf5 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -2537,8 +2537,6 @@ start_port(portid_t pid) } if (port->need_reconfig > 0) { - uint16_t mtu = RTE_ETHER_MTU; - port->need_reconfig = 0; if (flow_isolate_all) { @@ -2572,23 +2570,6 @@ start_port(portid_t pid) port->need_reconfig = 1; return -1; } - - /* - * Workaround for rte_eth_dev_configure(), max_rx_pkt_len - * set MTU wrong for the PMDs that have frame overhead - * bigger than RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN. - * For a PMD that has 26 bytes overhead, rte_eth_dev_configure() - * can set MTU to max 1492, not to expected 1500 bytes. - * Using rte_eth_dev_set_mtu() to be able to set MTU correctly, - * default MTU value is 1500. - */ - diag = rte_eth_dev_get_mtu(pi, &mtu); - if (diag) - printf("Failed to get MTU for port %d\n", pi); - diag = rte_eth_dev_set_mtu(pi, mtu); - if (diag != 0 && diag != -ENOTSUP) - printf("Failed to set MTU to %u for port %d\n", - mtu, pi); } if (port->need_reconfig_queues > 0) { port->need_reconfig_queues = 0; -- 2.26.2