[RFC PATCH net-next] net: dsa: mt7530: support setting ageing time

DENG Qingfang dqfext at gmail.com
Thu Nov 19 22:37:53 EST 2020


On Fri, Nov 20, 2020 at 10:26 AM Andrew Lunn <andrew at lunn.ch> wrote:
> The bridge code will default to 300 seconds. And after a topology
> change, it sets it to 2 * the forwarding delay, which defaults to 15
> seconds. So maybe you can look for these two values, and use
> pre-computed values?

15 and 300 are not larger than 4096 (AGE_UNIT_MAX + 1) so the exact
match can always be found in the first iteration:

age_count = 0, age_unit = 14, secs = (0 + 1) * (14 + 1) = 15
age_count = 0, age_unit = 299, secs = (0 + 1) * (299 + 1) = 300

>
> You still need to handle other values, the user can configure these.
>
>              Andrew



More information about the Linux-mediatek mailing list