* [PATCH] net/i40e: fix QinQ stripping
@ 2025-12-06 18:24 Anurag Mandal
0 siblings, 0 replies; 4+ 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 related [flat|nested] 4+ messages in thread* [PATCH] net/i40e: fix QinQ stripping
@ 2025-12-06 18:43 Anurag Mandal
2025-12-11 14:41 ` Bruce Richardson
0 siblings, 1 reply; 4+ 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 related [flat|nested] 4+ messages in thread* Re: [PATCH] net/i40e: fix QinQ stripping 2025-12-06 18:43 Anurag Mandal @ 2025-12-11 14:41 ` Bruce Richardson 2025-12-11 15:58 ` Mandal, Anurag 0 siblings, 1 reply; 4+ messages in thread From: Bruce Richardson @ 2025-12-11 14:41 UTC (permalink / raw) To: Anurag Mandal; +Cc: dev, stable On Sat, Dec 06, 2025 at 06:43:11PM +0000, Anurag Mandal wrote: > 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); > } > Hi, to help me test this patch, can you provide a set of instructions as to how to demonstrate the issue with i40e and how to verify the fix? Thanks, /Bruce ^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] net/i40e: fix QinQ stripping 2025-12-11 14:41 ` Bruce Richardson @ 2025-12-11 15:58 ` Mandal, Anurag 0 siblings, 0 replies; 4+ messages in thread From: Mandal, Anurag @ 2025-12-11 15:58 UTC (permalink / raw) To: Richardson, Bruce; +Cc: dev@dpdk.org, stable@dpdk.org [-- Attachment #1: Type: text/plain, Size: 6402 bytes --] -----Original Message----- From: Richardson, Bruce <bruce.richardson@intel.com<mailto:bruce.richardson@intel.com>> Sent: 11 December 2025 20:11 To: Mandal, Anurag <anurag.mandal@intel.com<mailto:anurag.mandal@intel.com>> Cc: dev@dpdk.org<mailto:dev@dpdk.org>; stable@dpdk.org<mailto:stable@dpdk.org> Subject: Re: [PATCH] net/i40e: fix QinQ stripping On Sat, Dec 06, 2025 at 06:43:11PM +0000, Anurag Mandal wrote: > 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<mailto:stable@dpdk.org> > > Signed-off-by: Anurag Mandal <anurag.mandal@intel.com<mailto: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); > } > >Hi, >to help me test this patch, can you provide a set of instructions as to how to demonstrate the issue with >i40e and how to verify the fix? Hi Bruce, Thank you for your queries. PFB my response. Traffic: To observe the issue, one needs QinQ traffic with outer VLAN 802.1ad (0x88A8)/802.1Q(0x8100) and inner VLAN 802.1Q(0x8100). Instructions :Assuming outer VLAN id as 201, inner vlan can be any other. a. set promisc 0 off b. vlan set extend on 0 c. vlan set filter on 0 d. vlan set outer tpid 0x88a8 0 e. vlan set inner tpid 0x8100 0 f. vlan set qinq_strip on 0 g. vlan set strip on 0 h.rx_vlan add 201 0 i. set fwd macswap j. set verbose 8 k. start Objective: To get both outer and inner VLANs stripped from the incoming double tagged traffic. Issue: When outer VLAN strip (qinq_strip) is enabled first[point f) and afterwards, inner vlan strip is enabled[point g], QinQ stripping fails. In verbose o/p we can see incoming packets will still have either type=0x88a8 or 0x8100 VLAN tag present which is the outer VLAN tag. Verifying Fix: No change in instruction order. Verbose o/p will show type=0x0800 in incoming order indicating both VLAN tags are removed. P.S: If traffic type is 0x8100+0x8100, then points d and e are Not needed as when we set VLAN extend, both outer & inner VLAN TPIDs are set to 802.1Q(0x8100) by default. Also, if inner VLAN strip is enabled first and then outer VLAN strip is set, QinQ stripping happens smoothly and incoming traffic shows type=0x0800. Thank you. Regards, Anurag M -----Original Message----- From: Richardson, Bruce <bruce.richardson@intel.com<mailto:bruce.richardson@intel.com>> Sent: 11 December 2025 20:11 To: Mandal, Anurag <anurag.mandal@intel.com<mailto:anurag.mandal@intel.com>> Cc: dev@dpdk.org<mailto:dev@dpdk.org>; stable@dpdk.org<mailto:stable@dpdk.org> Subject: Re: [PATCH] net/i40e: fix QinQ stripping On Sat, Dec 06, 2025 at 06:43:11PM +0000, Anurag Mandal wrote: > 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<mailto:stable@dpdk.org> > > Signed-off-by: Anurag Mandal <anurag.mandal@intel.com<mailto: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); > } > Hi, to help me test this patch, can you provide a set of instructions as to how to demonstrate the issue with i40e and how to verify the fix? Thanks, /Bruce [-- Attachment #2: Type: text/html, Size: 16551 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-12-11 15:58 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-12-06 18:24 [PATCH] net/i40e: fix QinQ stripping Anurag Mandal -- strict thread matches above, loose matches on Subject: below -- 2025-12-06 18:43 Anurag Mandal 2025-12-11 14:41 ` Bruce Richardson 2025-12-11 15:58 ` Mandal, Anurag
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).