From: Stephen Hemminger <stephen@networkplumber.org>
To: Robin Jarry <rjarry@redhat.com>
Cc: dev@dpdk.org
Subject: Re: [PATCH dpdk v5 0/5] Fix and improve VLAN/MPLS parsing in rte_net_get_ptype
Date: Tue, 2 Jun 2026 13:45:16 -0700 [thread overview]
Message-ID: <20260602134516.376b1362@phoenix.local> (raw)
In-Reply-To: <20260518132712.70913-8-rjarry@redhat.com>
On Mon, 18 May 2026 15:27:14 +0200
Robin Jarry <rjarry@redhat.com> wrote:
> Revert commit 1f250674085a ("net: fix packet type for stacked VLAN")
> which introduced a regression causing single VLAN frames to be
> misidentified as QinQ due to incorrect use of |= on the ptype.
>
> Replace the separate VLAN and QinQ code paths with a single loop
> that handles arbitrarily stacked VLAN tags. Fix the MPLS path to
> use the bottom of stack bit instead of a hardcoded label limit,
> and parse the L3 protocol of the MPLS payload by inspecting the
> first nibble.
>
> Add unit tests for rte_net_get_ptype covering Ethernet, VLAN, QinQ,
> MPLS, IPv4/IPv6, and truncated packet scenarios.
>
> v5:
>
> * Split the series in multiple patches.
> * Revert the commit that introduced the bug.
> * Add support for stacked VLAN/QINQ as suggested by David.
> * Fix MPLS bottom of stack detection. Try to guess MPLS payload.
> * Add more test cases.
>
> v4:
>
> * changed the approach again. Only set VLAN or QINQ ptype for the first
> encountered vlan/qinq ether type.
> * unit tests not changed
>
> v3:
>
> * changed the approach: initialize pkt_type=0 and only set it to
> RTE_PTYPE_L2_ETHER if neither of VLAN nor QINQ matched.
> * extended the unit tests to check for header lengths and added ipv6 / tcp
> cases.
>
> v2: added new ptype tests
>
> v3:
>
> * changed the approach: initialize pkt_type=0 and only set it to
> RTE_PTYPE_L2_ETHER if neither of VLAN nor QINQ matched.
> * extended the unit tests to check for header lengths and added ipv6 / tcp
> cases.
>
> v2: added new ptype tests
>
> Robin Jarry (5):
> Revert "net: fix packet type for stacked VLAN"
> net: support multiple stacked VLAN tags
> net: add unit tests for rte_net_get_ptype
> net: parse L3 protocol after MPLS labels
> net: add truncated packet tests for rte_net_get_ptype
>
> app/test/meson.build | 1 +
> app/test/test_net_ptype.c | 326 ++++++++++++++++++++++++++++++++++++++
> lib/net/rte_net.c | 72 +++++----
> 3 files changed, 369 insertions(+), 30 deletions(-)
> create mode 100644 app/test/test_net_ptype.c
>
In addition to the other comments, would like a release note for this.
Warning: rte_net_get_ptype() is a public stable API and this changes its
observable output (MPLS payload now resolves to L3 IPv4/IPv6 and falls
through to l3 instead of returning at the MPLS layer). No release-notes
entry accompanies the series. The VLAN misidentification fix (patch 1)
is a bug fix with Cc: stable, but the MPLS L3-detection change is a
behavior enhancement to an existing API and warrants a note in the
current release notes.
prev parent reply other threads:[~2026-06-02 20:45 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-22 10:28 [PATCH dpdk] net: fix L2 ptype assignment in VLAN loop Robin Jarry
2026-04-22 10:35 ` Robin Jarry
2026-04-22 10:38 ` [PATCH dpdk v2] " Robin Jarry
2026-04-22 13:16 ` Thomas Monjalon
2026-04-22 13:18 ` Robin Jarry
2026-04-22 13:23 ` David Marchand
2026-04-22 13:32 ` [PATCH dpdk v3] net: fix VLAN packet type Robin Jarry
2026-04-23 9:19 ` Kevin Traynor
2026-04-23 9:49 ` Robin Jarry
2026-04-23 10:59 ` Kevin Traynor
2026-04-23 11:11 ` Robin Jarry
2026-04-23 11:24 ` [PATCH dpdk v4] " Robin Jarry
2026-04-24 16:18 ` Kevin Traynor
2026-04-25 8:40 ` David Marchand
2026-04-27 10:47 ` Robin Jarry
2026-04-27 15:53 ` Thomas Monjalon
2026-04-30 10:12 ` David Marchand
2026-04-30 11:06 ` Morten Brørup
2026-05-15 11:17 ` Kevin Traynor
2026-05-18 13:27 ` [PATCH dpdk v5 0/5] Fix and improve VLAN/MPLS parsing in rte_net_get_ptype Robin Jarry
2026-05-18 13:27 ` [PATCH dpdk v5 1/5] Revert "net: fix packet type for stacked VLAN" Robin Jarry
2026-05-20 9:47 ` David Marchand
2026-05-20 10:24 ` Kevin Traynor
2026-05-18 13:27 ` [PATCH dpdk v5 2/5] net: support multiple stacked VLAN tags Robin Jarry
2026-05-20 9:56 ` David Marchand
2026-05-20 11:09 ` Robin Jarry
2026-05-20 12:42 ` David Marchand
2026-05-21 13:38 ` Kevin Traynor
2026-05-21 13:38 ` Kevin Traynor
2026-05-21 13:40 ` Robin Jarry
2026-06-02 20:43 ` Stephen Hemminger
2026-05-18 13:27 ` [PATCH dpdk v5 3/5] net: add unit tests for rte_net_get_ptype Robin Jarry
2026-05-18 13:27 ` [PATCH dpdk v5 4/5] net: parse L3 protocol after MPLS labels Robin Jarry
2026-05-18 18:00 ` Stephen Hemminger
2026-06-02 20:44 ` Stephen Hemminger
2026-05-18 13:27 ` [PATCH dpdk v5 5/5] net: add truncated packet tests for rte_net_get_ptype Robin Jarry
2026-06-02 20:45 ` Stephen Hemminger [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=20260602134516.376b1362@phoenix.local \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=rjarry@redhat.com \
/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