openwrt-6.x/target/linux
Bjørn Mork 0890fb2df4 realtek: net: dsa: configure better brport flags when ports leave the bridge
Ensures that the DSA driver sets exactly the same default flags as the
bridge when a port joins or leaves.  Without this we end up with a
confusing flag mismatch, where DSA and bridge ports use different sets
of flags.

This is critical as the "learning" mismatch will be harmful to the
network, causing all traffic to be flooded on all ports.

The original commit was buggy, trying to set the flags one-by-one in a
loop.  This was not supported by the API and the end result was that
all but the last flag were cleared.  This bug was implicitly fixed
upstream by commit e18f4c18ab5b ("net: switchdev: pass flags and mask
to both {PRE_,}BRIDGE_FLAGS attributes").

This is a minimum temporary stop measure fix for the critical lack of
"learning" only.  The major API change associated with a full v5.12+
backport is neither required nor wanted. A simpler fix, moving the
call to dsa_port_bridge_flags() out of the loop,  has therefore been
merged into this modified backport.

Fixes: afa3ab54c0 ("realtek: Backport bridge configuration for DSA")
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Acked-by: Daniel Golle <daniel@makrotopia.org>
Tested-by: Stijn Tintel <stijn@linux-ipv6.be>
[fix typos in commit message]
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-03-06 22:01:04 +02:00
..
apm821xx
archs38 kernel: 5.10: remove CONFIG_DEVTMPFS{,_MOUNT} from kconfigs 2022-03-01 22:57:40 +00:00
armvirt
at91 kernel: bump 5.10 to 5.10.103 2022-03-05 21:05:45 +01:00
ath25
ath79 kernel: bump 5.10 to 5.10.103 2022-03-05 21:05:45 +01:00
bcm27xx kernel: bump 5.10 to 5.10.103 2022-03-05 21:05:45 +01:00
bcm47xx
bcm53xx kernel: 5.10: allocate last level PTEs in high memory 2022-03-01 22:57:34 +00:00
bcm63xx bcm63xx: switch to Kernel 5.10 2022-02-27 14:41:28 +01:00
bcm4908 kernel: bump 5.10 to 5.10.103 2022-03-05 21:05:45 +01:00
bmips
gemini
generic kernel: backport patch to allow using parser_trx from ramips 2022-03-06 20:40:35 +01:00
imx
ipq40xx kernel: 5.10: allocate last level PTEs in high memory 2022-03-01 22:57:34 +00:00
ipq806x kernel: 5.10: allocate last level PTEs in high memory 2022-03-01 22:57:34 +00:00
kirkwood
lantiq kernel: bump 5.10 to 5.10.101 2022-03-01 21:38:36 +01:00
layerscape kernel: 5.10: remove CONFIG_DEVTMPFS{,_MOUNT} from kconfigs 2022-03-01 22:57:40 +00:00
malta
mediatek kernel: move parser_trx patches of custom magic to generic 2022-03-06 20:40:07 +01:00
mpc85xx
mvebu kernel: 5.10: allocate last level PTEs in high memory 2022-03-01 22:57:34 +00:00
mxs
octeon
octeontx
omap
oxnas kernel: 5.10: remove CONFIG_DEVTMPFS{,_MOUNT} from kconfigs 2022-03-01 22:57:40 +00:00
pistachio
qoriq
ramips ramips: use parser_trx for Buffalo WCR-1166DS 2022-03-06 20:40:35 +01:00
realtek realtek: net: dsa: configure better brport flags when ports leave the bridge 2022-03-06 22:01:04 +02:00
rockchip kernel: 5.10: remove CONFIG_DEVTMPFS{,_MOUNT} from kconfigs 2022-03-01 22:57:40 +00:00
sunxi kernel: bump 5.10 to 5.10.101 2022-03-01 21:38:36 +01:00
tegra
uml
x86 kernel: 5.10: allocate last level PTEs in high memory 2022-03-01 22:57:34 +00:00
zynq kernel: 5.10: allocate last level PTEs in high memory 2022-03-01 22:57:34 +00:00
Makefile