Re: [PATCH net-next 1/2] ethtool: rss: prevent rss ctx deletion when in use

From: Jakub Kicinski
Date: Mon Oct 14 2024 - 20:55:08 EST


On Mon, 14 Oct 2024 11:10:33 +0100 Edward Cree wrote:
> On 11/10/2024 19:35, Daniel Zahka wrote:
> > A list of active
> > ntuple filters and their associated rss contexts can be compiled by
> > querying a device's ethtool_ops.get_rxnfc. This patch checks to see if
> > any ntuple filters are referencing an rss context during context
> > deletion, and prevents the deletion if the requested context is still
> > in use.
>
> Imho it would make more sense to add core tracking of ntuple
> filters, along with a refcount on the rss context. That way
> context deletion just has to check the count is zero.

True... This is my least favorite kind of situation, where the posted
code is clearly much better than the status quo, but even better
solution is possible. So question becomes do we push for the optimal
solution and potentially get neither or do we apply what's posted and
hope the better one will still be delivered later..