linux-stable/drivers/net/dsa
Arınç ÜNAL 86c0c154a7 net: dsa: mt7530: fix handling of all link-local frames
[ Upstream commit 69ddba9d17 ]

Currently, the MT753X switches treat frames with :01-0D and :0F MAC DAs as
regular multicast frames, therefore flooding them to user ports.

On page 205, section "8.6.3 Frame filtering" of the active standard, IEEE
Std 802.1Q™-2022, it is stated that frames with 01:80:C2:00:00:00-0F as MAC
DA must only be propagated to C-VLAN and MAC Bridge components. That means
VLAN-aware and VLAN-unaware bridges. On the switch designs with CPU ports,
these frames are supposed to be processed by the CPU (software). So we make
the switch only forward them to the CPU port. And if received from a CPU
port, forward to a single port. The software is responsible of making the
switch conform to the latter by setting a single port as destination port
on the special tag.

This switch intellectual property cannot conform to this part of the
standard fully. Whilst the REV_UN frame tag covers the remaining :04-0D and
:0F MAC DAs, it also includes :22-FF which the scope of propagation is not
supposed to be restricted for these MAC DAs.

Set frames with :01-03 MAC DAs to be trapped to the CPU port(s). Add a
comment for the remaining MAC DAs.

Note that the ingress port must have a PVID assigned to it for the switch
to forward untagged frames. A PVID is set by default on VLAN-aware and
VLAN-unaware ports. However, when the network interface that pertains to
the ingress port is attached to a vlan_filtering enabled bridge, the user
can remove the PVID assignment from it which would prevent the link-local
frames from being trapped to the CPU port. I am yet to see a way to forward
link-local frames while preventing other untagged frames from being
forwarded too.

Fixes: b8f126a8d5 ("net-next: dsa: add dsa support for Mediatek MT7530 switch")
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-26 18:21:02 -04:00
..
b53 net: dsa: b53: mmap: add phy ops 2023-04-26 14:28:36 +02:00
hirschmann
microchip net: dsa: microchip: fix register write order in ksz8_ind_write8() 2024-03-15 10:48:15 -04:00
mv88e6xxx net: dsa: mv88e6xxx: Fix mv88e6352_serdes_get_stats error path 2024-02-05 20:12:52 +00:00
ocelot net: dsa: felix: fix oversize frame dropping for always closed tc-taprio gates 2023-08-30 16:11:00 +02:00
qca net: dsa: qca8k: fix illegal usage of GPIO 2024-02-05 20:13:01 +00:00
realtek net: dsa: realtek: fix out-of-bounds access 2023-04-06 12:10:44 +02:00
sja1105 net: dsa: sja1105: block FDB accesses that are concurrent with a switch reset 2023-09-19 12:28:09 +02:00
xrs700x
Kconfig
Makefile
bcm_sf2.c net: dsa: bcm_sf2: Fix possible memory leak in bcm_sf2_mdio_register() 2023-10-25 12:03:07 +02:00
bcm_sf2.h
bcm_sf2_cfp.c
bcm_sf2_regs.h
dsa_loop.c
dsa_loop.h
dsa_loop_bdinfo.c
lan9303-core.c net: dsa: lan9303: allow vid != 0 in port_fdb_{add|del} methods 2023-06-14 11:15:16 +02:00
lan9303.h
lan9303_i2c.c
lan9303_mdio.c net: dsa: lan9303: consequently nested-lock physical MDIO 2023-11-28 17:07:18 +00:00
lantiq_gswip.c
lantiq_pce.h
mt7530.c net: dsa: mt7530: fix handling of all link-local frames 2024-03-26 18:21:02 -04:00
mt7530.h net: dsa: mt7530: fix handling of all link-local frames 2024-03-26 18:21:02 -04:00
mv88e6060.c
mv88e6060.h
rzn1_a5psw.c net: dsa: rzn1-a5psw: disable learning for standalone ports 2023-05-24 17:32:44 +01:00
rzn1_a5psw.h net: dsa: rzn1-a5psw: fix STP states handling 2023-05-24 17:32:44 +01:00
vitesse-vsc73xx-core.c net: dsa: vsc73xx: Add null pointer check to vsc73xx_gpio_probe 2024-01-25 15:27:50 -08:00
vitesse-vsc73xx-platform.c
vitesse-vsc73xx-spi.c
vitesse-vsc73xx.h