Re: [PATCH net-next v2] net: dsa: mv88e6xxx: Add FID map cache

From: Andrew Lunn
Date: Tue Oct 08 2024 - 17:25:30 EST


On Mon, Oct 07, 2024 at 10:29:05AM +1300, Aryan Srivastava wrote:
> Add a cached FID bitmap. This mitigates the need to walk all VTU entries
> to find the next free FID.
>
> When flushing the VTU (during init), zero the FID bitmap. Use and
> manipulate this bitmap from now on, instead of reading HW for the FID
> map.
>
> The repeated VTU walks are costly and can take ~40 mins if ~4000 vlans
> are added. Caching the FID map reduces this time to <2 mins.
>
> Signed-off-by: Aryan Srivastava <aryan.srivastava@xxxxxxxxxxxxxxxxxxx>

Reviewed-by: Andrew Lunn <andrew@xxxxxxx>

Andrew