linux/drivers/net/dsa
Vladimir Oltean 987afe1479 net: dsa: lantiq_gswip: suppress -EINVAL errors for bridge FDB entries added to the CPU port
The blamed commit and others in that patch set started the trend
of reusing existing DSA driver API for a new purpose: calling
ds->ops->port_fdb_add() on the CPU port.

The lantiq_gswip driver was not prepared to handle that, as can be seen
from the many errors that Daniel presents in the logs:

[  174.050000] gswip 1e108000.switch: port 2 failed to add fa:aa:72:f4:8b:1e vid 1 to fdb: -22
[  174.060000] gswip 1e108000.switch lan2: entered promiscuous mode
[  174.070000] gswip 1e108000.switch: port 2 failed to add 00:01:02:03:04:02 vid 0 to fdb: -22
[  174.090000] gswip 1e108000.switch: port 2 failed to add 00:01:02:03:04:02 vid 1 to fdb: -22
[  174.090000] gswip 1e108000.switch: port 2 failed to delete fa:aa:72:f4:8b:1e vid 1 from fdb: -2

The errors are because gswip_port_fdb() wants to get a handle to the
bridge that originated these FDB events, to associate it with a FID.
Absolutely honourable purpose, however this only works for user ports.

To get the bridge that generated an FDB entry for the CPU port, one
would need to look at the db.bridge.dev argument. But this was
introduced in commit c26933639b ("net: dsa: request drivers to perform
FDB isolation"), first appeared in v5.18, and when the blamed commit was
introduced in v5.14, no such API existed.

So the core DSA feature was introduced way too soon for lantiq_gswip.
Not acting on these host FDB entries and suppressing any errors has no
other negative effect, and practically returns us to not supporting the
host filtering feature at all - peacefully, this time.

Fixes: 10fae4ac89 ("net: dsa: include bridge addresses which are local in the host fdb list")
Reported-by: Daniel Golle <daniel@makrotopia.org>
Closes: https://lore.kernel.org/netdev/aJfNMLNoi1VOsPrN@pidgin.makrotopia.org/
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://patch.msgid.link/20250918072142.894692-3-vladimir.oltean@nxp.com
Tested-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2025-09-25 10:29:18 +02:00
..
b53 net: dsa: b53: fix ageing time for BCM53101 2025-09-08 17:53:02 -07:00
hirschmann net: dsa: hellcreek: Constify struct devlink_region_ops and struct hellcreek_fdb_entry 2025-07-01 19:33:31 -07:00
microchip net: dsa: microchip: Fix KSZ9477 HSR port setup issue 2025-08-20 19:25:38 -07:00
mv88e6xxx net: dsa: mv88e6xxx: Fix fwnode reference leaks in mv88e6xxx_port_setup_leds 2025-09-02 17:04:03 -07:00
ocelot net: dsa: convert to ndo_hwtstamp_get() and ndo_hwtstamp_set() 2025-05-09 16:34:09 -07:00
qca net: Use dev_fwnode() 2025-06-12 18:46:37 -07:00
realtek net: Switch to irq_domain_create_*() 2025-05-16 21:06:10 +02:00
sja1105 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-05-15 11:28:30 -07:00
xrs700x
Kconfig net: dsa: rzn1_a5psw: add COMPILE_TEST 2025-07-10 15:41:01 +02:00
Makefile
bcm_sf2.c net: dsa: b53: implement setting ageing time 2025-05-12 18:51:09 -07:00
bcm_sf2.h
bcm_sf2_cfp.c
bcm_sf2_regs.h
dsa_loop.c net: phy: fixed_phy: remove irq argument from fixed_phy_register 2025-05-20 18:17:43 -07:00
dsa_loop.h
dsa_loop_bdinfo.c
lan9303-core.c
lan9303.h
lan9303_i2c.c
lan9303_mdio.c
lantiq_gswip.c net: dsa: lantiq_gswip: suppress -EINVAL errors for bridge FDB entries added to the CPU port 2025-09-25 10:29:18 +02:00
lantiq_pce.h
mt7530-mdio.c net: dsa: mt7530: Constify struct regmap_config 2025-07-13 22:28:56 +01:00
mt7530-mmio.c net: dsa: mt7530: Constify struct regmap_config 2025-07-13 22:28:56 +01:00
mt7530.c treewide: rename GPIO set callbacks back to their original names 2025-08-07 10:07:06 +02:00
mt7530.h net: dsa: mt7530: Add AN7583 support 2025-05-27 17:07:52 -07:00
mv88e6060.c
mv88e6060.h
rzn1_a5psw.c net: dsa: rzn1_a5psw: use devm to enable clocks 2025-07-10 15:41:02 +02:00
rzn1_a5psw.h
vitesse-vsc73xx-core.c treewide: rename GPIO set callbacks back to their original names 2025-08-07 10:07:06 +02:00
vitesse-vsc73xx-platform.c
vitesse-vsc73xx-spi.c
vitesse-vsc73xx.h