Re: [PATCH v5 net-next 1/9] net: mscc: ocelot: serialize access to the MAC table

From: Vladimir Oltean
Date: Sat Sep 25 2021 - 15:13:23 EST


On Fri, Sep 24, 2021 at 05:52:18PM +0800, Xiaoliang Yang wrote:
> From: Vladimir Oltean <vladimir.oltean@xxxxxxx>
>
> DSA would like to remove the rtnl_lock from its
> SWITCHDEV_FDB_{ADD,DEL}_TO_DEVICE handlers, and the felix driver uses
> the same MAC table functions as ocelot.
>
> This means that the MAC table functions will no longer be implicitly
> serialized with respect to each other by the rtnl_mutex, we need to add
> a dedicated lock in ocelot for the non-atomic operations of selecting a
> MAC table row, reading/writing what we want and polling for completion.
>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@xxxxxxx>
> ---

This patch needs your sign-off too.