Re: [PATCH v0] net: dsa: mv88e6xxx: Add FID map cache

From: Andrew Lunn
Date: Mon Jun 10 2024 - 08:24:23 EST


On Mon, Jun 10, 2024 at 05:07:23PM +1200, Aryan Srivastava wrote:
> Add a cached FID bitmap. This mitigates the need to
> walk all VTU entries to find the next free FID.
>
> Walk VTU once, then store read FID map into bitmap. Use
> and manipulate this bitmap from now on, instead of re-reading
> HW for the FID map.
>
> The repeatedly VTU walks are costly can result in taking ~40 mins
> if ~4000 vlans are added. Caching the FID map reduces this time
> to <2 mins.

How long does the first walk take? Rather than having fid_populated, i
wounder if the walk should just be done in mv88e6xxx_vtu_setup() or
mv88e6xxx_atu_setup().

Andrew