DPDK patches and discussions
 help / color / mirror / Atom feed
From: Patrick Robb <probb@iol.unh.edu>
To: Dean Marx <dmarx@iol.unh.edu>
Cc: Bruce Richardson <bruce.richardson@intel.com>,
	dev@dpdk.org, techboard@dpdk.org
Subject: Re: [RFC PATCH] doc: clarify VLAN and QinQ stripping behaviour
Date: Mon, 14 Jul 2025 17:41:45 -0400	[thread overview]
Message-ID: <CAJvnSUDD9EAknohiYXbD6SCDBgEBmghAXhcrmBqd0DCw3cKAkg@mail.gmail.com> (raw)
In-Reply-To: <CABD7UXPVg56UwvmtOsssBwV2HzmgV4ZJZCb=FrnVQKkggtD2+Q@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3047 bytes --]

On Mon, Jul 14, 2025 at 4:09 PM Dean Marx <dmarx@iol.unh.edu> wrote:

> On Mon, Jul 14, 2025 at 9:30 AM Bruce Richardson
> <bruce.richardson@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 for checking the test results on the Intel NICs. That's interesting
that the behavior (only outer tag stripped) differs from the description in
the patch. But, I guess this question will become irrelevant if QinQ strip
without VLAN strip will become disallowed at the ethdev layer. So problem
solved there I guess!

Otherwise, it sounds like there are basically 3 valid "strip" configs a
port can be set to.

1. No strip
2. VLAN Strip
3. VLAN Strip + QinQ strip

And then, as Morten points out, there are various packet profiles which we
can send through these 3 configurations for your testcases.

Single VLAN: Ether() / Dot1Q(vlan=100, type=0x8100) / IP(dst="1.2.3.4") /
UDP(dport=1234, sport=4321)
Double VLAN: Ether() / Dot1Q(vlan=100, type=0x8100) / Dot1Q(vlan=200,
type=0x8100) / IP(dst="1.2.3.4") / UDP(dport=1234, sport=4321)
Single 0x88a8 tag only: Ether() / Dot1Q(vlan=100,
type=0x88a8 / IP(dst="1.2.3.4") / UDP(dport=1234, sport=4321)
Single VLAN + 1 0x88a8 tag: Ether() / Dot1Q(vlan=100, type=0x88a8)
/ Dot1Q(vlan=100, type=0x8100) / IP(dst="1.2.3.4") / UDP(dport=1234,
sport=4321)

Dean I gotta run for now but tomorrow let's see if we can define the
expected behavior for the intersection of these various stripping option
and packet profiles and pseudo code out some testcases based on that.

[-- Attachment #2: Type: text/html, Size: 3880 bytes --]

      reply	other threads:[~2025-07-14 21:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-14 13:30 Bruce Richardson
2025-07-14 15:06 ` Stephen Hemminger
2025-07-14 15:11   ` Bruce Richardson
2025-07-14 16:33 ` Morten Brørup
2025-07-14 16:49   ` Bruce Richardson
2025-07-14 20:09 ` Dean Marx
2025-07-14 21:41   ` Patrick Robb [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJvnSUDD9EAknohiYXbD6SCDBgEBmghAXhcrmBqd0DCw3cKAkg@mail.gmail.com \
    --to=probb@iol.unh.edu \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=dmarx@iol.unh.edu \
    --cc=techboard@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).