DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/i40e: fix QinQ stripping
@ 2025-12-06 18:43 Anurag Mandal
  0 siblings, 0 replies; 2+ messages in thread
From: Anurag Mandal @ 2025-12-06 18:43 UTC (permalink / raw)
  To: dev; +Cc: bruce.richardson, Anurag Mandal, stable

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@dpdk.org

Signed-off-by: Anurag Mandal <anurag.mandal@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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] net/i40e: fix QinQ stripping
@ 2025-12-06 18:24 Anurag Mandal
  0 siblings, 0 replies; 2+ messages in thread
From: Anurag Mandal @ 2025-12-06 18:24 UTC (permalink / raw)
  To: dev; +Cc: bruce.richardson, Anurag Mandal, stable

Outer VLAN strip gets disabled when inner VLAN
stripping is enabled/disabled after enabling outer
VLAN stripping.
This happens because the respective register of
gets 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@dpdk.org

Signed-off-by: Anurag Mandal <anurag.mandal@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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-12-06 19:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-06 18:43 [PATCH] net/i40e: fix QinQ stripping Anurag Mandal
  -- strict thread matches above, loose matches on Subject: below --
2025-12-06 18:24 Anurag Mandal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).