From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 30112A0A03; Mon, 18 Jan 2021 08:10:50 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B442C140D44; Mon, 18 Jan 2021 08:09:10 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 204E0140D22 for ; Mon, 18 Jan 2021 08:09:07 +0100 (CET) IronPort-SDR: DTspFYZcgloKWgLTYbq6FXgWiz1aCr/w/fH7eIQ0aEQAvUrHVnE3dKN6iJgMBkTaHCdXjXFD/M 0hpNIl+8Ox1g== X-IronPort-AV: E=McAfee;i="6000,8403,9867"; a="197460253" X-IronPort-AV: E=Sophos;i="5.79,355,1602572400"; d="scan'208";a="197460253" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jan 2021 23:08:55 -0800 IronPort-SDR: uLi2XsF6fCKJI6THDaj8Pc0V5m48VsvkAB/KGwfa38rryb9SroSOt6N4M3/VXSNHDG4PZjqIIu KCTqAG5Q8zNg== X-IronPort-AV: E=Sophos;i="5.79,355,1602572400"; d="scan'208";a="355087029" Received: from intel-npg-odc-srv01.cd.intel.com ([10.240.178.136]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jan 2021 23:08:54 -0800 From: Steve Yang To: dev@dpdk.org Cc: Steve Yang , Heinrich Kuhn Date: Mon, 18 Jan 2021 07:04:27 +0000 Message-Id: <20210118070428.36998-22-stevex.yang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210118070428.36998-1-stevex.yang@intel.com> References: <20210114094537.13661-1-stevex.yang@intel.com> <20210118070428.36998-1-stevex.yang@intel.com> Subject: [dpdk-dev] [PATCH v4 21/22] net/nfp: fix the jumbo frame flag condition for mtu set X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition. If the Ether overhead is larger than 18 when it supports VLAN tag, that will cause the jumbo flag rx offload is wrong when MTU size is 'RTE_ETHER_MTU'. This fix will change the boundary condition with 'RTE_ETHER_MTU', that perhaps impacts the cases of the jumbo frame related. Fixes: d4a27a3b092a ("nfp: add basic features") Cc: Heinrich Kuhn Signed-off-by: Steve Yang --- drivers/net/nfp/nfp_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index 1608bf5ea1..9ea24e5bda 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -1508,7 +1508,7 @@ nfp_net_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) } /* switch to jumbo mode if needed */ - if ((uint32_t)mtu > RTE_ETHER_MAX_LEN) + if ((uint32_t)mtu > RTE_ETHER_MTU) dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME; else dev->data->dev_conf.rxmode.offloads &= ~DEV_RX_OFFLOAD_JUMBO_FRAME; -- 2.17.1