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

From: Edward Cree
Date: Mon Oct 14 2024 - 06:12:28 EST


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.

-ed