Star64_linux/drivers/net/ethernet/mscc
Vladimir Oltean 906647e745 net: mscc: ocelot: allow unregistered IP multicast flooding to CPU
Since commit 4cf35a2b62 ("net: mscc: ocelot: fix broken IP multicast
flooding") from v5.12, unregistered IP multicast flooding is
configurable in the ocelot driver for bridged ports. However, by writing
0 to the PGID_MCIPV4 and PGID_MCIPV6 port masks at initialization time,
the CPU port module, for which ocelot_port_set_mcast_flood() is not
called, will have unknown IP multicast flooding disabled.

This makes it impossible for an application such as smcroute to work
properly, since all IP multicast traffic received on a standalone port
is treated as unregistered (and dropped).

Starting with commit 7569459a52 ("net: dsa: manage flooding on the CPU
ports"), the limitation above has been lifted, because when standalone
ports become IFF_PROMISC or IFF_ALLMULTI, ocelot_port_set_mcast_flood()
would be called on the CPU port module, so unregistered multicast is
flooded to the CPU on an as-needed basis.

But between v5.12 and v5.18, IP multicast flooding to the CPU has
remained broken, promiscuous or not.

Delete the inexplicable premature optimization of clearing PGID_MCIPV4
and PGID_MCIPV6 as part of the init sequence, and allow unregistered IP
multicast to be flooded freely to the CPU port module.

Fixes: a556c76adc ("net: mscc: Add initial Ocelot switch support")
Cc: stable@kernel.org
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-19 17:50:50 +08:00
..
Kconfig of: net: move of_net under net/ 2023-04-19 17:45:56 +08:00
Makefile
ocelot.c net: mscc: ocelot: allow unregistered IP multicast flooding to CPU 2023-04-19 17:50:50 +08:00
ocelot.h
ocelot_devlink.c
ocelot_flower.c net: mscc: ocelot: restrict tc-trap actions to VCAP IS2 lookup 0 2023-04-19 17:48:45 +08:00
ocelot_io.c
ocelot_mrp.c
ocelot_net.c
ocelot_police.c
ocelot_police.h
ocelot_ptp.c
ocelot_qs.h
ocelot_rew.h
ocelot_vcap.c net: mscc: ocelot: avoid corrupting hardware counters when moving VCAP filters 2023-04-19 17:48:45 +08:00
ocelot_vcap.h
ocelot_vsc7514.c