Re: [PATCH net-next v2 1/3] net: dsa: microchip: ksz9477: apply a shorter ageing time at once
From: Andrew Lunn
Date: Sun Nov 15 2026 - 10:38:30 EST
On Sun, Nov 15, 2026 at 11:59:51AM +0100, Oleksij Rempel wrote:
> Pulse Fast Aging when the programmed ageing time gets shorter or the Age
> Count gets smaller.
>
> The ageing time is Age Count times Age Period. An entry stores the Age
> Count when it is updated, as the datasheet says. The datasheet does not
> say when a new Age Period applies.
>
> Without the pulse, stale entries outlived an STP topology change. In my
> STP tests the switch ran at 300 s as 4 x 75 s, its reset value. With
> forward_delay 4 s, the bridge asks for an ageing time of 8 s. Read back
> right after the write, the register showed 8 s. In three tests, an
> entry learned before the change still stayed for more than a minute. I
> think the switch uses the new Age Period only after the running one
> ends.
>
> The pulse is also needed when the ageing time grows but the Age Count
> shrinks. From 8 s (4 x 2 s) to 31 s (1 x 31 s), an entry stayed about
> 63 s in one test.
>
> On a KSZ9893 the pulse removed the dynamic entries on the one user port
> I tested. The new period then started right away.
>
> I found this in STP tests on a KSZ9893. I tested the fix there with
> kernel STP and with STP off. With mstpd I checked only the programmed
> ageing time, not the FDB.
>
> Fixes: 2c119d9982b1 ("net: dsa: microchip: add the support for set_ageing_time")
> Signed-off-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>
Reviewed-by: Andrew Lunn <andrew@xxxxxxx>
Andrew