Re: [PATCH net 1/3] net: mscc: ocelot: extend ocelot->fwd_domain_lock to cover ocelot->tas_lock

From: Simon Horman
Date: Tue Jul 11 2023 - 12:56:58 EST


On Wed, Jul 05, 2023 at 01:44:20PM +0300, Vladimir Oltean wrote:
> In a future commit we will have to call vsc9959_tas_guard_bands_update()
> from ocelot_port_update_active_preemptible_tcs(), and that will be
> impossible due to the AB/BA locking dependencies between
> ocelot->tas_lock and ocelot->fwd_domain_lock.
>
> Just like we did in commit 3ff468ef987e ("net: mscc: ocelot: remove
> struct ocelot_mm_state :: lock"), the only solution is to expand the
> scope of ocelot->fwd_domain_lock for it to also serialize changes made
> to the Time-Aware Shaper, because those will have to result in a
> recalculation of cut-through TCs, which is something that depends on the
> forwarding domain.
>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@xxxxxxx>

Reviewed-by: Simon Horman <simon.horman@xxxxxxxxxxxx>