[dpdk-dev] [PATCH] net/i40e: consider QinQ when setting MTU
Ferruh Yigit
ferruh.yigit at intel.com
Fri Apr 28 07:55:23 CEST 2017
On 4/28/2017 2:55 AM, Wenzhuo Lu wrote:
> When counting max packet length from MTU, count
> VLAN tag length twice for QinQ packets.
>
> Signed-off-by: Wenzhuo Lu <wenzhuo.lu at intel.com>
> ---
> drivers/net/i40e/i40e_ethdev.c | 2 +-
> drivers/net/i40e/i40e_ethdev_vf.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
> index 3fa25dc..74041ae 100644
> --- a/drivers/net/i40e/i40e_ethdev.c
> +++ b/drivers/net/i40e/i40e_ethdev.c
> @@ -10593,7 +10593,7 @@ static void i40e_set_default_mac_addr(struct rte_eth_dev *dev,
> struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
> struct rte_eth_dev_data *dev_data = pf->dev_data;
> uint32_t frame_size = mtu + ETHER_HDR_LEN
> - + ETHER_CRC_LEN + I40E_VLAN_TAG_SIZE;
> + + ETHER_CRC_LEN + I40E_VLAN_TAG_SIZE * 2;
Hi Wenzhuo,
Shouldn't we check if QinQ enabled before taking size account?
More information about the dev
mailing list