[RFC PATCH] doc: clarify VLAN and QinQ stripping behaviour

Bruce Richardson bruce.richardson at intel.com
Tue Jul 15 09:47:27 CEST 2025


On Mon, Jul 14, 2025 at 04:09:11PM -0400, Dean Marx wrote:
> On Mon, Jul 14, 2025 at 9:30 AM Bruce Richardson
> <bruce.richardson at intel.com> wrote:
> >
> > The behaviour of VLAN tag stripping Rx offloads is unclear in DPDK, and
> > not very well documented. Even the documentation that does exist appears
> > contradictory.
> >
> > For example, the doxygen docs for the mbuf flag
> > RTE_MBUF_F_RX_QINQ_STRIPPED says:
> >
> >   "If RTE_MBUF_F_RX_QINQ_STRIPPED is set and RTE_MBUF_F_RX_VLAN_STRIPPED
> >   is unset, only the outer VLAN is removed from packet data,..."
> >
> > but the docs for RTE_MBUF_F_RX_QINQ says:
> >
> >   "If the flag RTE_MBUF_F_RX_QINQ_STRIPPED is also present, both VLANs
> >   headers have been stripped from mbuf data, ..."
> >
> > Without a good definition of what the correct behaviour is, it's not
> > possible to assess and ensure conformance across drivers. Update the
> > documentation for NIC features, ethdev and mbuf library to all report
> > the same information: that VLAN strip feature is stripping one flag, and
> > QinQ strip feature is removing two.
> 
> I'm working on testing QinQ/VLAN stripping features across PMDs, and
> so far I've found that our Intel devices are capable of QinQ
> stripping, while our Mellanox/Broadcom devices are not. When QinQ
> stripping is enabled on an Intel PMD, the test packet is received with
> its outer VLAN layer stripped, but the inner VLAN layer remains
> intact. Thus, the doxygen example is more accurate for what is
> currently supported. I'm also running some tests on VLAN stripping
> behavior, I'll update this thread with the results once these are
> finished.

Thanks. Let me know how the testing otherwise goes. If only Intel NICs are
supporting QinQ, then it can't be that widely used a feature yet, so we may
be able to tweak things a bit if it diverges from what is expected.

I also wonder if the definition of expected behaviour is preventing other
NICs from implementing the feature?

Can you also check with VLAN stripping enabled? My biggest issue with the
behaviour description of QinQ strip only removing outer tag is that it
implies for QinQ traffoc that VLAN strip alone should strip inner tag without
removing outer. That doesn't make sense to me - and I'm not sure if NIC
hardware supports such features of removing inner headers while leaving
outer.

/Bruce


More information about the dev mailing list