From: Ferruh Yigit Subject: Re: [PATCH v2 6/7] net/e1000: set min and max MTU for igb devices Date: Mon, 25 Mar 2019 14:25:13 +0000 Message-ID: <4916320d-5a37-a33d-0a01-5e10bc99123c@intel.com> References: <1553259678-4515-1-git-send-email-ian.stokes@intel.com> <1553259678-4515-7-git-send-email-ian.stokes@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: stephen@networkplumber.org, Wenzhuo Lu , Konstantin Ananyev , Beilei Xing , Qi Zhang To: Ian Stokes , dev@dpdk.org Return-path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 74F402BD3 for ; Mon, 25 Mar 2019 15:25:17 +0100 (CET) In-Reply-To: <1553259678-4515-7-git-send-email-ian.stokes@intel.com> Content-Language: en-US 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 3/22/2019 1:01 PM, Ian Stokes wrote: > This commit sets the min and max supported MTU values for igb devices > via the eth_igb_info_get() function. Min MTU supported is set to > ETHER_MIN_MTU and max mtu is calculated as the max packet length > supported minus the transport overhead. To aid in these calculations > a new MACRO 'E1000_ETH_OVERHEAD' has been introduced to consolidate > overhead calculation and avoid duplication. > > Signed-off-by: Ian Stokes > --- > drivers/net/e1000/e1000_ethdev.h | 6 ++++++ > drivers/net/e1000/igb_ethdev.c | 7 +++++-- > 2 files changed, 11 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/e1000/e1000_ethdev.h b/drivers/net/e1000/e1000_ethdev.h > index 94edff08e..3e74cd8fe 100644 > --- a/drivers/net/e1000/e1000_ethdev.h > +++ b/drivers/net/e1000/e1000_ethdev.h > @@ -89,6 +89,12 @@ > ETH_RSS_IPV6_UDP_EX) > > /* > + * The overhead from MTU to max frame size. > + * Considering VLAN so a tag needs to be counted. > + */ > +#define E1000_ETH_OVERHEAD (ETHER_HDR_LEN + ETHER_CRC_LEN + VLAN_TAG_SIZE) As an overhead, following drivers set: i40e: HDR + CRC + 2 * VLAN ixgbe: HDR + CRC e1000: HDR + CRC + VLAN I wonder if this difference is HW limitation, or driver limitation or just implementation inconsistency. Better to confirm it that it is not implementation inconsistency. Wenzhuo, Konstantin, Beilei, Qi, Can you please comment? Thanks, ferruh