mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
net: mscc: ocelot: allow unregistered IP multicast flooding to CPU
Since commit4cf35a2b62("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 commit7569459a52("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
810962c794
commit
5696f7983d
@@ -2206,11 +2206,15 @@ int ocelot_init(struct ocelot *ocelot)
|
||||
ocelot_rmw_rix(ocelot, ANA_PGID_PGID_PGID(BIT(ocelot->num_phys_ports)),
|
||||
ANA_PGID_PGID_PGID(BIT(ocelot->num_phys_ports)),
|
||||
ANA_PGID_PGID, PGID_MC);
|
||||
ocelot_rmw_rix(ocelot, ANA_PGID_PGID_PGID(BIT(ocelot->num_phys_ports)),
|
||||
ANA_PGID_PGID_PGID(BIT(ocelot->num_phys_ports)),
|
||||
ANA_PGID_PGID, PGID_MCIPV4);
|
||||
ocelot_rmw_rix(ocelot, ANA_PGID_PGID_PGID(BIT(ocelot->num_phys_ports)),
|
||||
ANA_PGID_PGID_PGID(BIT(ocelot->num_phys_ports)),
|
||||
ANA_PGID_PGID, PGID_MCIPV6);
|
||||
ocelot_rmw_rix(ocelot, ANA_PGID_PGID_PGID(BIT(ocelot->num_phys_ports)),
|
||||
ANA_PGID_PGID_PGID(BIT(ocelot->num_phys_ports)),
|
||||
ANA_PGID_PGID, PGID_BC);
|
||||
ocelot_write_rix(ocelot, 0, ANA_PGID_PGID, PGID_MCIPV4);
|
||||
ocelot_write_rix(ocelot, 0, ANA_PGID_PGID, PGID_MCIPV6);
|
||||
|
||||
/* Allow manual injection via DEVCPU_QS registers, and byte swap these
|
||||
* registers endianness.
|
||||
|
||||
Reference in New Issue
Block a user