[PATCH dpdk v2] net: fix L2 ptype assignment in VLAN loop
Robin Jarry
rjarry at redhat.com
Wed Apr 22 15:18:10 CEST 2026
Thomas Monjalon, Apr 22, 2026 at 15:16:
> 22/04/2026 12:38, Robin Jarry:
>> Since commit 1f250674085a ("net: fix packet type for stacked VLAN"),
>> rte_net_get_ptype() uses |= to set the L2 ptype inside the VLAN
>> parsing loop. Since pkt_type is already initialized with
>> RTE_PTYPE_L2_ETHER (0x1), or-ing it with RTE_PTYPE_L2_ETHER_VLAN
>> (0x6) results in RTE_PTYPE_L2_ETHER_QINQ (0x7). This causes single
>> VLAN frames to be misidentified as QinQ.
>
> Thanks for finding this major regression.
>
> Minor nit about the title (for whoever will merge it):
> we don't really care the problem is in a loop.
> I think this title is easier to read:
> net: fix VLAN packet type
I will send a v3 with a different approach. Currently my fix breaks the
detection of QinQ if it is followed by a plain vlan header.
I'll adjust the title.
More information about the stable
mailing list