linux/drivers/net/dsa
Vladimir Oltean eca70102cf net: dsa: felix: add support for changing DSA master
Changing the DSA master means different things depending on the tagging
protocol in use.

For NPI mode ("ocelot" and "seville"), there is a single port which can
be configured as NPI, but DSA only permits changing the CPU port
affinity of user ports one by one. So changing a user port to a
different NPI port globally changes what the NPI port is, and breaks the
user ports still using the old one.

To address this while still permitting the change of the NPI port,
require that the user ports which are still affine to the old NPI port
are down, and cannot be brought up until they are all affine to the same
NPI port.

The tag_8021q mode ("ocelot-8021q") is more flexible, in that each user
port can be freely assigned to one CPU port or to the other. This works
by filtering host addresses towards both tag_8021q CPU ports, and then
restricting the forwarding from a certain user port only to one of the
two tag_8021q CPU ports.

Additionally, the 2 tag_8021q CPU ports can be placed in a LAG. This
works by enabling forwarding via PGID_SRC from a certain user port
towards the logical port ID containing both tag_8021q CPU ports, but
then restricting forwarding per packet, via the LAG hash codes in
PGID_AGGR, to either one or the other.

When we change the DSA master to a LAG device, DSA guarantees us that
the LAG has at least one lower interface as a physical DSA master.
But DSA masters can come and go as lowers of that LAG, and
ds->ops->port_change_master() will not get called, because the DSA
master is still the same (the LAG). So we need to hook into the
ds->ops->port_lag_{join,leave} calls on the CPU ports and update the
logical port ID of the LAG that user ports are assigned to.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2022-09-20 10:32:36 +02:00
..
b53 net: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:07 -07:00
hirschmann net: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:07 -07:00
microchip net: dsa: microchip: lan937x: fix reference count leak in lan937x_mdio_register() 2022-09-19 14:17:59 -07:00
mv88e6xxx net: dsa: propagate extack to port_lag_join 2022-09-20 10:32:36 +02:00
ocelot net: dsa: felix: add support for changing DSA master 2022-09-20 10:32:36 +02:00
qca net: dsa: propagate extack to port_lag_join 2022-09-20 10:32:36 +02:00
realtek
sja1105 net: dsa: sja1105: fix buffer overflow in sja1105_setup_devlink_regions() 2022-08-17 21:58:15 -07:00
xrs700x net: dsa: xrs700x: Use irqsave variant for u64 stats update 2022-08-29 13:02:26 +01:00
bcm_sf2_cfp.c net: dsa: introduce dsa_port_get_master() 2022-09-20 10:32:35 +02:00
bcm_sf2_regs.h
bcm_sf2.c net: dsa: introduce dsa_port_get_master() 2022-09-20 10:32:35 +02:00
bcm_sf2.h
dsa_loop_bdinfo.c
dsa_loop.c
dsa_loop.h
Kconfig net: dsa: LAN9303: Add basic support for LAN9354 2022-09-07 11:06:04 +01:00
lan9303_i2c.c
lan9303_mdio.c net: dsa: LAN9303: Add basic support for LAN9354 2022-09-07 11:06:04 +01:00
lan9303-core.c net: dsa: introduce dsa_port_get_master() 2022-09-20 10:32:35 +02:00
lan9303.h
lantiq_gswip.c
lantiq_pce.h
Makefile
mt7530.c
mt7530.h
mv88e6060.c net: dsa: mv88e6060: prevent crash on an unused port 2022-08-12 17:24:44 -07:00
mv88e6060.h
rzn1_a5psw.c
rzn1_a5psw.h
vitesse-vsc73xx-core.c
vitesse-vsc73xx-platform.c
vitesse-vsc73xx-spi.c
vitesse-vsc73xx.h