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 <ian.sto...@intel.com> > --- > 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