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 9B7D3A09E0; Fri, 13 Nov 2020 17:01:45 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 68D6CC8C4; Fri, 13 Nov 2020 17:01:41 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 1B9ADC8BC for ; Fri, 13 Nov 2020 17:01:38 +0100 (CET) IronPort-SDR: Yg/tdKQ+k3YrHQBrpS62diFz1Xe4pEJXZypZP8z1kcaN0PCav8qf7zU2EHF8oD0kcmI0E3DMe8 Nhodj0jZVL/Q== X-IronPort-AV: E=McAfee;i="6000,8403,9804"; a="255201219" X-IronPort-AV: E=Sophos;i="5.77,475,1596524400"; d="scan'208";a="255201219" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Nov 2020 08:01:36 -0800 IronPort-SDR: OBbyeG4wBOov2izG4R9WZpyA8ZdS8dlxWmooiYXtdlExzrMh5bIMjhgOsVe7ws1Yi70n9If8EH Hr06RMY+ekkw== X-IronPort-AV: E=Sophos;i="5.77,475,1596524400"; d="scan'208";a="474712412" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.252.3.208]) ([10.252.3.208]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Nov 2020 08:01:34 -0800 To: Andrew Rybchenko , Wenzhuo Lu , Beilei Xing , Bernard Iremonger Cc: dev@dpdk.org, Qi Zhang , Steve Yang , Thomas Monjalon , Konstantin Ananyev , Olivier Matz , Lance Richardson , Igor Romanov References: <20201105180942.2938152-1-ferruh.yigit@intel.com> <20201113114400.3356527-1-ferruh.yigit@intel.com> <336c632d-a0b0-464d-09a1-881c2b3f74ff@oktetlabs.ru> From: Ferruh Yigit Message-ID: <084f5e74-ea7f-fa92-7399-92765e0aa883@intel.com> Date: Fri, 13 Nov 2020 16:01:29 +0000 MIME-Version: 1.0 In-Reply-To: <336c632d-a0b0-464d-09a1-881c2b3f74ff@oktetlabs.ru> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix MTU after device configure X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 11/13/2020 2:53 PM, Andrew Rybchenko wrote: > On 11/13/20 2:44 PM, Ferruh Yigit wrote: >> In 'rte_eth_dev_configure()', if 'DEV_RX_OFFLOAD_JUMBO_FRAME' is not set >> the max frame size is limited to 'RTE_ETHER_MAX_LEN' (1518). >> This is mistake because for the PMDs that has frame size bigger than >> "RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN" (18 bytes), the MTU becomes >> less than 1500, causing a valid frame with 1500 bytes payload to be >> dropped. >> >> Since 'rte_eth_dev_set_mtu()' works as expected, it is called after >> 'rte_eth_dev_configure()' to fix the MTU. >> It may look redundant to set MTU after 'rte_eth_dev_configure()', both >> with default values, but it is not, the resulting MTU config can be >> different in the device based on frame overhead of the PMD. >> >> And instead of setting the MTU to default value, it is first get via >> 'rte_eth_dev_get_mtu()' and set again, this is to cover cases MTU >> changed from testpmd command line. >> >> 'rte_eth_dev_set_mtu()', '-ENOTSUP' error is ignored to prevent >> irrelevant warning messages for the virtual PMDs. >> >> Signed-off-by: Ferruh Yigit >> Reviewed-by: Qi Zhang > > Acked-by: Andrew Rybchenko > Tested-by: Igor Romanov > Applied to dpdk-next-net/main, thanks.