testpmd will initialize default max packet length to 1518 which doesn't
include vlan tag size in ether overheader. Once, send the max mtu length
packet with vlan tag, the max packet length will exceed 1518 that will
cause packets dropped directly from NIC hw side.

iavf can support dual vlan tags that need more 8 bytes for max packet size,
so, configures the correct max packet size in dev_config ops.

Fixes: 02d212ca3125 ("net/iavf: rename remaining avf strings")

Signed-off-by: SteveX Yang <stevex.y...@intel.com>
---
 drivers/net/iavf/iavf_ethdev.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 440da7d76..20581994c 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -226,6 +226,11 @@ iavf_dev_configure(struct rte_eth_dev *dev)
        if (dev->data->dev_conf.rxmode.mq_mode & ETH_MQ_RX_RSS_FLAG)
                dev->data->dev_conf.rxmode.offloads |= DEV_RX_OFFLOAD_RSS_HASH;
 
+       /* Considering QinQ packet, max frame size should be MTU and
+        * corresponding ether overhead.
+        */
+       iavf_dev_mtu_set(dev, dev->data->mtu);
+
        /* Vlan stripping setting */
        if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN) {
                if (dev_conf->rxmode.offloads & DEV_RX_OFFLOAD_VLAN_STRIP)
-- 
2.17.1

Reply via email to