Subject: Re: [PATCH v4 net-next 6/7] net: ethtool: add a mutex protecting RSS contexts

From: Jakub Kicinski <[email-masked]>
Date: Wed, 4 Oct 2023 16:16:51 -0700

On Wed, 27 Sep 2023 19:13:37 +0100 [email-masked] wrote:
> While this is not needed to serialise the ethtool entry points (which
>  are all under RTNL), drivers may have cause to asynchronously access
>  dev->ethtool->rss_ctx; taking dev->ethtool->rss_lock allows them to
>  do this safely without needing to take the RTNL.

Can we use a replay mechanism, like we do in TC offloads and VxLAN/UDP
ports? The driver which lost config can ask for the rss contexts to be
"replayed" and the core will issue a series of ->create calls for all
existing entries?

Regarding the lock itself - can we hide it under ethtool_rss_lock(dev)
/ ethtool_rss_unlock(dev) helpers?