OpenCloudOS-Kernel/drivers/net/dsa
Arınç ÜNAL 16f55acf58 net: dsa: mt7530: fix handling of all link-local frames
[ Upstream commit 69ddba9d170bdaee1dc0eb4ced38d7e4bb7b92af ]

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:20:13 -04:00
..
b53 net: dsa: use capital "OR" for multiple licenses in SPDX 2023-08-24 12:02:53 -07:00
hirschmann net: dsa: use capital "OR" for multiple licenses in SPDX 2023-08-24 12:02:53 -07:00
microchip net: dsa: microchip: fix register write order in ksz8_ind_write8() 2024-03-15 10:48:18 -04:00
mv88e6xxx net: dsa: mv88e6xxx: Fix failed probe due to unsupported C45 reads 2024-02-23 09:25:08 +01:00
ocelot Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-08-24 10:51:39 -07:00
qca net: dsa: qca8k: fix illegal usage of GPIO 2024-02-05 20:14:36 +00:00
realtek net: dsa: realtek: add phylink_get_caps implementation 2023-08-20 11:38:43 +01:00
sja1105 net: dsa: sja1105: block FDB accesses that are concurrent with a switch reset 2023-09-11 08:32:30 +01:00
xrs700x net: dsa: Explicitly include correct DT includes 2023-07-26 21:54:16 -07:00
Kconfig net: dsa: mt7530: improve and relax PHY driver dependency 2023-08-09 11:22:55 +01:00
Makefile net: dsa: mt7530: introduce driver for MT7988 built-in switch 2023-04-03 10:13:01 +01:00
bcm_sf2.c net: dsa: bcm_sf2: Fix possible memory leak in bcm_sf2_mdio_register() 2023-10-13 16:29:46 -07:00
bcm_sf2.h net: dsa: bcm_sf2: refactor LED regs access 2021-12-30 17:28:32 -08:00
bcm_sf2_cfp.c net: dsa: introduce dsa_port_get_master() 2022-09-20 10:32:35 +02:00
bcm_sf2_regs.h net: dsa: bcm_sf2: refactor LED regs access 2021-12-30 17:28:32 -08:00
dsa_loop.c net: dsa: Fix possible memory leaks in dsa_loop_init() 2022-10-28 10:32:59 +01:00
dsa_loop.h
dsa_loop_bdinfo.c
lan9303-core.c net: dsa: Explicitly include correct DT includes 2023-07-26 21:54:16 -07:00
lan9303.h
lan9303_i2c.c net: dsa: Switch i2c drivers back to use .probe() 2023-05-31 09:52:55 +01:00
lan9303_mdio.c net: dsa: lan9303: consequently nested-lock physical MDIO 2023-11-28 17:20:11 +00:00
lantiq_gswip.c net: dsa: lantiq_gswip: mark OF related data as maybe unused 2023-03-15 08:11:01 +00:00
lantiq_pce.h
mt7530-mdio.c net: dsa: mt7530: fix support for MT7531BE 2023-04-19 17:37:45 -07:00
mt7530-mmio.c net: dsa: Explicitly include correct DT includes 2023-07-26 21:54:16 -07:00
mt7530.c net: dsa: mt7530: fix handling of all link-local frames 2024-03-26 18:20:13 -04:00
mt7530.h net: dsa: mt7530: fix handling of all link-local frames 2024-03-26 18:20:13 -04:00
mv88e6060.c net: dsa: mv88e6060: add phylink_get_caps implementation 2023-08-14 18:57:17 -07:00
mv88e6060.h
rzn1_a5psw.c net: dsa: rzn1-a5psw: remove redundant logs 2023-08-23 09:43:32 +01:00
rzn1_a5psw.h net: dsa: rzn1-a5psw: add vlan support 2023-08-11 11:58:36 +01:00
vitesse-vsc73xx-core.c net: dsa: vsc73xx: Add null pointer check to vsc73xx_gpio_probe 2024-01-25 15:35:58 -08:00
vitesse-vsc73xx-platform.c net: dsa: vitesse-vsc73xx: remove unnecessary set_drvdata() 2022-09-22 19:30:39 -07:00
vitesse-vsc73xx-spi.c net: dsa: vitesse-vsc73xx: remove unnecessary set_drvdata() 2022-09-22 19:30:39 -07:00
vitesse-vsc73xx.h