[Bridge] [PATCH v4 net-next 7/9] net: mscc: ocelot: use separate flooding PGID for broadcast

Vladimir Oltean olteanv at gmail.com
Fri Feb 12 12:23:09 UTC 2021

On Fri, Feb 12, 2021 at 03:05:29AM +0200, Vladimir Oltean wrote:
> From: Vladimir Oltean <vladimir.oltean at nxp.com>
> In preparation of offloading the bridge port flags which have
> independent settings for unknown multicast and for broadcast, we should
> also start reserving one destination Port Group ID for the flooding of
> broadcast packets, to allow configuring it individually.
> Signed-off-by: Vladimir Oltean <vladimir.oltean at nxp.com>
> Reviewed-by: Florian Fainelli <f.fainelli at gmail.com>
> ---

After more testing with the ocelot-8021q tagger too, not just the
default NPI-based one, I noticed that I introduced a regression.

devlink-sb tells me that broadcast packets remain stuck in the ingress
queues of the front-panel ports instead of being forwarded to the CPU.
This is because I forgot this:

-----------------------------[cut here]-----------------------------
 drivers/net/dsa/ocelot/felix.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/dsa/ocelot/felix.c b/drivers/net/dsa/ocelot/felix.c
index 96d9d13c5ae0..2771560cef61 100644
--- a/drivers/net/dsa/ocelot/felix.c
+++ b/drivers/net/dsa/ocelot/felix.c
@@ -299,6 +299,7 @@ static int felix_setup_tag_8021q(struct dsa_switch *ds, int cpu)
 	cpu_flood = ANA_PGID_PGID_PGID(BIT(ocelot->num_phys_ports));
 	ocelot_rmw_rix(ocelot, 0, cpu_flood, ANA_PGID_PGID, PGID_UC);
 	ocelot_rmw_rix(ocelot, 0, cpu_flood, ANA_PGID_PGID, PGID_MC);
+	ocelot_rmw_rix(ocelot, 0, cpu_flood, ANA_PGID_PGID, PGID_BC);
 	felix->dsa_8021q_ctx = kzalloc(sizeof(*felix->dsa_8021q_ctx),
-----------------------------[cut here]-----------------------------

If there is no other feedback on this series, can I send this as a
follow-up fixup? Thanks.

More information about the Bridge mailing list