[PATCH] net/i40e: fix QinQ stripping

Bruce Richardson bruce.richardson at intel.com
Tue Jan 13 17:25:41 CET 2026


On Mon, Jan 12, 2026 at 06:01:50PM +0000, Bruce Richardson wrote:
> On Thu, Dec 11, 2025 at 03:58:15PM +0000, Mandal, Anurag wrote:
> >    -----Original Message-----
> > 
> >    From: Richardson, Bruce <[1]bruce.richardson at intel.com>
> > 
> >    Sent: 11 December 2025 20:11
> > 
> >    To: Mandal, Anurag <[2]anurag.mandal at intel.com>
> > 
> >    Cc: [3]dev at dpdk.org; [4]stable at 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: [5]stable at dpdk.org
> > 
> >    >
> > 
> >    > Signed-off-by: Anurag Mandal <[6]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);
> > 
> >    >            }
> > 
> >    >
> > 
> >    >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
> > 
> > 
> Thanks for the instructions. I've finally got around to testing things and
> indeed I see the behaviour you described - sending packet with two 0x8100
> tags I don't see them stripped unless I reverse the qinq_strip and vlan
> strip commands. This patch makes it work with both orderings.
> 
> Tested-by: Bruce Richardson <bruce.richardson at intel.com>
> Acked-by: Bruce Richardson <bruce.richardson at intel.com>
> 
Applied to dpdk-next-net-intel


More information about the dev mailing list