Re: [PATCH net] net: dsa: microchip: fix KSZ9477 set_ageing_time function

From: Andrew Lunn
Date: Thu May 30 2024 - 20:22:03 EST


> > Is the additional accuracy worthy the added complexity WRT:
> >
> > mult = DIV_ROUND_UP(secs, 0xff);
> >
> > ?
>
> I do not know much accuracy is expected of this function. I do not know
> whether users can easily specify the amount, but the default is 3 seconds
> which is the same as the hardware default where the multiplier is 4 and
> the count is 75. So most of the time the rest of the code will not be
> executed.

Are you sure it is 3 seconds?

#define BR_DEFAULT_AGEING_TIME (300 * HZ)

Fast ageing, after a topology change, is i think 15 seconds.

Andrew