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

From: Jakub Kicinski <[email-masked]>
Date: Thu, 5 Oct 2023 17:07:32 -0700

On Thu, 5 Oct 2023 21:56:47 +0100 Edward Cree wrote:
> > 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?  
> 
> I like that idea, yes.  Will try to implement it for v5.
> There is a question as to how the core should react if the ->create call
>  then fails; see my reply to Martin on #7.

Hm. The application asked for a config which is no longer applied.
The machine needs to raise some form of an alarm or be taken out
of commission. My first thought would be to print an error message
in the core, and expect the driver to fail some devlink health
reporter.

I don't think a "broken" flag local to RSS would be monitored, there'd
be too many of such local flags throughout the APIs. devlink health
may be monitored.

> > Regarding the lock itself - can we hide it under ethtool_rss_lock(dev)
> > / ethtool_rss_unlock(dev) helpers?  
> 
> Sure.  If I can't get replay to work then I'll do that.