* [RFC PATCH net-next] net: dsa: vsc73xx: remove ds->untag_bridge_pvid request
@ 2024-10-08 10:46 Vladimir Oltean
2024-10-12 20:23 ` Paweł Dembicki
0 siblings, 1 reply; 3+ messages in thread
From: Vladimir Oltean @ 2024-10-08 10:46 UTC (permalink / raw)
To: netdev
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Andrew Lunn, Florian Fainelli, Pawel Dembicki, Linus Walleij,
linux-kernel
Similar to the situation described for sja1105 in commit 1f9fc48fd302
("net: dsa: sja1105: fix reception from VLAN-unaware bridges") from the
'net' tree, the vsc73xx driver uses tag_8021q.
The ds->untag_bridge_pvid option strips VLANs from packets received on
VLAN-unaware bridge ports. But those VLANs should already be stripped by
tag_vsc73xx_8021q.c as part of vsc73xx_rcv(). It is even plausible that
the same bug that existed for sja1105 also exists for vsc73xx:
dsa_software_untag_vlan_unaware_bridge() tries to untag a VLAN that
doesn't exist, corrupting the packet.
Only compile tested, as I don't have access to the hardware.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
drivers/net/dsa/vitesse-vsc73xx-core.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/dsa/vitesse-vsc73xx-core.c b/drivers/net/dsa/vitesse-vsc73xx-core.c
index e4b98fd51643..f18aa321053d 100644
--- a/drivers/net/dsa/vitesse-vsc73xx-core.c
+++ b/drivers/net/dsa/vitesse-vsc73xx-core.c
@@ -851,7 +851,6 @@ static int vsc73xx_setup(struct dsa_switch *ds)
dev_info(vsc->dev, "set up the switch\n");
- ds->untag_bridge_pvid = true;
ds->max_num_bridges = DSA_TAG_8021Q_MAX_NUM_BRIDGES;
ds->fdb_isolation = true;
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [RFC PATCH net-next] net: dsa: vsc73xx: remove ds->untag_bridge_pvid request
2024-10-08 10:46 [RFC PATCH net-next] net: dsa: vsc73xx: remove ds->untag_bridge_pvid request Vladimir Oltean
@ 2024-10-12 20:23 ` Paweł Dembicki
2024-10-14 14:55 ` Vladimir Oltean
0 siblings, 1 reply; 3+ messages in thread
From: Paweł Dembicki @ 2024-10-12 20:23 UTC (permalink / raw)
To: Vladimir Oltean
Cc: netdev, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Andrew Lunn, Florian Fainelli, Linus Walleij,
linux-kernel
wt., 8 paź 2024 o 12:47 Vladimir Oltean <vladimir.oltean@nxp.com> napisał(a):
>
> Similar to the situation described for sja1105 in commit 1f9fc48fd302
> ("net: dsa: sja1105: fix reception from VLAN-unaware bridges") from the
> 'net' tree, the vsc73xx driver uses tag_8021q.
>
> The ds->untag_bridge_pvid option strips VLANs from packets received on
> VLAN-unaware bridge ports. But those VLANs should already be stripped by
> tag_vsc73xx_8021q.c as part of vsc73xx_rcv(). It is even plausible that
> the same bug that existed for sja1105 also exists for vsc73xx:
> dsa_software_untag_vlan_unaware_bridge() tries to untag a VLAN that
> doesn't exist, corrupting the packet.
>
> Only compile tested, as I don't have access to the hardware.
>
Thanks Vladimir for this patch. This fix is required for the proper
functioning of vsc73xx.
Tested-by: Pawel Dembicki <paweldembicki@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC PATCH net-next] net: dsa: vsc73xx: remove ds->untag_bridge_pvid request
2024-10-12 20:23 ` Paweł Dembicki
@ 2024-10-14 14:55 ` Vladimir Oltean
0 siblings, 0 replies; 3+ messages in thread
From: Vladimir Oltean @ 2024-10-14 14:55 UTC (permalink / raw)
To: Paweł Dembicki
Cc: netdev, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Andrew Lunn, Florian Fainelli, Linus Walleij,
linux-kernel
On Sat, Oct 12, 2024 at 10:23:35PM +0200, Paweł Dembicki wrote:
> wt., 8 paź 2024 o 12:47 Vladimir Oltean <vladimir.oltean@nxp.com> napisał(a):
> >
> > Similar to the situation described for sja1105 in commit 1f9fc48fd302
> > ("net: dsa: sja1105: fix reception from VLAN-unaware bridges") from the
> > 'net' tree, the vsc73xx driver uses tag_8021q.
> >
> > The ds->untag_bridge_pvid option strips VLANs from packets received on
> > VLAN-unaware bridge ports. But those VLANs should already be stripped by
> > tag_vsc73xx_8021q.c as part of vsc73xx_rcv(). It is even plausible that
> > the same bug that existed for sja1105 also exists for vsc73xx:
> > dsa_software_untag_vlan_unaware_bridge() tries to untag a VLAN that
> > doesn't exist, corrupting the packet.
> >
> > Only compile tested, as I don't have access to the hardware.
> >
>
> Thanks Vladimir for this patch. This fix is required for the proper
> functioning of vsc73xx.
>
> Tested-by: Pawel Dembicki <paweldembicki@gmail.com>
Thanks for testing, Paweł, I suspected as much. I will resend a v2 to
the 'net' tree with your test tag and a Fixes: tag. I hope I caught it
early enough that it didn't cause too much trouble.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-10-14 14:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-08 10:46 [RFC PATCH net-next] net: dsa: vsc73xx: remove ds->untag_bridge_pvid request Vladimir Oltean
2024-10-12 20:23 ` Paweł Dembicki
2024-10-14 14:55 ` Vladimir Oltean
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox