RE: [PATCH net 0/5] net: stmmac: Fix double VLAN 802.1ad tag handling
From: Ovidiu Panait
Date: Thu Jul 30 2026 - 05:07:27 EST
Hi Andrew,
>
> On Wed, Jul 29, 2026 at 09:51:04AM +0000, Ovidiu Panait wrote:
> > Currently, hardware VLAN stripping is broken for 802.1ad tags.
> vlan_rx_hw()
> > hardcodes ETH_P_8021Q when putting the hardware tag into the skb, rather
> > than using the actual protocol from the packet. Because of this, packets
> > that contain an 802.1ad outer tag are incorrectly passed up the stack as
> > having an 802.1Q tag.
> >
> > This issue was observed on the Renesas RZ/V2H platform (which has a
> dwmac4
> > IP), when testing QinQ ping:
> >
> > # DUT
> > ip link add link end0 name end0.100 type vlan proto 802.1ad id 100
> > ip link add link end0.100 name end0.100.200 type vlan proto 802.1q id
> 200
> > ip addr add 172.16.3.2/24 dev end0.100.200
> > ip link set end0 up
> > ip link set end0.100 up
> > ip link set end0.100.200 up
> >
> > # Peer
> > ip link add link eth0 name eth0.100 type vlan proto 802.1ad id 100
> > ip link add link eth0.100 name eth0.100.200 type vlan proto 802.1q id
> 200
> > ip addr add 172.16.3.1/24 dev eth0.100.200
> > ip link set eth0 up
> > ip link set eth0.100 up
> > ip link set eth0.100.200 up
> > ping 172.16.3.2
> > -- FAIL --
>
> I stretch goal, if you are interested and have time. Can you turn this
> into a test somewhere in tools/testing/selftests/net ? If one MAC
> driver has it wrong, there are probably other MAC drivers which are
> also wrong.
>
Sure, I can add a test for this in tools/testing/selftests/net. I'll include it v2.
Thanks,
Ovidiu
> Andrew