Re: [RFC PATCH 02/10] net: dsa: b53: prevent FAST_AGE access on BCM5325

From: Vladimir Oltean
Date: Tue Jun 03 2025 - 06:19:49 EST


On Mon, Jun 02, 2025 at 11:01:40AM -0700, Florian Fainelli wrote:
> On 6/2/25 02:37, Vladimir Oltean wrote:
> > Hello,
> >
> > On Sat, May 31, 2025 at 12:13:00PM +0200, Álvaro Fernández Rojas wrote:
> > > BCM5325 doesn't implement FAST_AGE registers so we should avoid reading or
> > > writing them.
> > >
> > > Fixes: 967dd82ffc52 ("net: dsa: b53: Add support for Broadcom RoboSwitch")
> > > Signed-off-by: Álvaro Fernández Rojas <noltari@xxxxxxxxx>
> > > ---
> >
> > How about implementing a "slow age" procedure instead? Walk through the
> > FDB, and delete the dynamically learned entries for the port?
> >
> > Address aging is important for STP state transitions.
>
> That's a good suggestion, I suppose for now this can be b53 specific until
> we encounter another 20 year old switch and then we move that logic within
> the DSA framework?
> --
> Florian

Hmm, thank you for saying that, I didn't even consider consolidating the
logic in the DSA framework, but it sure makes sense and we already have
almost all API required to do that.

So I now have a WIP patch attached, but the consolidation into the
framework is definitely a net-next activity, since it will also affect
mt7530, hellcreek and vsc73xx, and those need testing. Also, for b53 it
further requires changing the port_fast_age() prototype.

The question further becomes whether for stable kernels we should
implement a local slow age procedure in b53 like the one from sja1105,
only to delete it in net-next, or to skip it altogether, go with
Álvaro's patch as is and concentrate on the net-next implementation
directly. I'm ok both ways.