[PATCH] net/i40e: fix QinQ stripping

Anurag Mandal anurag.mandal at intel.com
Sat Dec 6 19:43:11 CET 2025


Outer VLAN strip gets disabled when inner
VLAN stripping is enabled/disabled after
enabling outer VLAN stripping.
This happens because the respective register
is overridden by the vsi params update of
inner VLAN stripping.

This patch fixes the issue by re-enabling
outer VLAN stripping after modification
of inner VLAN stripping.

Fixes: c52ff36686a4 ("net/i40e: enable QinQ stripping")
Cc: stable at dpdk.org

Signed-off-by: Anurag Mandal <anurag.mandal at intel.com>
---
 drivers/net/intel/i40e/i40e_ethdev.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/net/intel/i40e/i40e_ethdev.c b/drivers/net/intel/i40e/i40e_ethdev.c
index b8ce79061b..c8153f3351 100644
--- a/drivers/net/intel/i40e/i40e_ethdev.c
+++ b/drivers/net/intel/i40e/i40e_ethdev.c
@@ -4150,6 +4150,16 @@ i40e_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 			i40e_vsi_config_vlan_stripping(vsi, TRUE);
 		else
 			i40e_vsi_config_vlan_stripping(vsi, FALSE);
+
+		/* When VLAN strip is enabled/disabled
+		 * after enabling outer VLAN stripping,
+		 * outer VLAN stripping gets disabled
+		 * as the register gets overridden by
+		 * VLAN's strip vsi param update.
+		 * Hence, re-enable outer VLAN stripping.
+		 */
+		if (rxmode->offloads & RTE_ETH_RX_OFFLOAD_QINQ_STRIP)
+			i40e_vsi_config_outer_vlan_stripping(vsi, TRUE);
 	}
 
 	if (mask & RTE_ETH_VLAN_EXTEND_MASK) {
-- 
2.43.0



More information about the stable mailing list