For i40e kernel drivers which support either vlan(v1) or vlan(v2) VIRTCHNL OP,it will set strip on when setting filter on. But dpdk side will not change strip flag. To be consistent with dpdk side, explicitly disable strip again.
Bugzilla ID:1725 Cc: sta...@dpdk.org v3: - Fixed the vlan(v2) scenario by calling appropriate api - Addresses Bugzilla ID: 1735 v2: - Fixed indentation in commit message Signed-off-by: Amiya Ranjan Mohakud <amiyaranjan.moha...@gmail.com> --- drivers/net/intel/iavf/iavf_ethdev.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/intel/iavf/iavf_ethdev.c b/drivers/net/intel/iavf/iavf_ethdev.c index c33fdd9069..335a8126c4 100644 --- a/drivers/net/intel/iavf/iavf_ethdev.c +++ b/drivers/net/intel/iavf/iavf_ethdev.c @@ -1388,6 +1388,7 @@ iavf_disable_vlan_strip_ex(struct rte_eth_dev *dev, int on) */ struct iavf_adapter *adapter = IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); + struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter); struct rte_eth_conf *dev_conf = &dev->data->dev_conf; int err; @@ -1395,7 +1396,10 @@ iavf_disable_vlan_strip_ex(struct rte_eth_dev *dev, int on) adapter->hw.mac.type == IAVF_MAC_VF || adapter->hw.mac.type == IAVF_MAC_X722_VF) { if (on && !(dev_conf->rxmode.offloads & RTE_ETH_RX_OFFLOAD_VLAN_STRIP)) { - err = iavf_disable_vlan_strip(adapter); + if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN_V2) + err = iavf_config_vlan_strip_v2(adapter, false); + else + err = iavf_disable_vlan_strip(adapter); if (err) return -EIO; } -- 2.39.5 (Apple Git-154)