Subject: Re: [PATCH net-next] ethtool: add netlink support for rss set

From: Jakub Kicinski <[email-masked]>
Date: Tue, 14 Mar 2023 21:23:34 -0700

On Tue, 14 Mar 2023 13:34:51 +0000 Edward Cree wrote:
> > Add a pointer to struct
> > netdevice to hold an "ethtool_settings" struct. In the ethtool settings
> > struct add a list head. Put an object for each created RSS context on
> > that list.  
> Would an IDR not be appropriate here, rather than a list?

Yup, I was too lazy how much memory IDR eats when unused, and list is
easier to explain, but let's just go for an xarray if you're doing it.

> AFAICT every driver that supports contexts either treats the context
>  ID as an opaque handle or as an index into a fixed-size array, so as
>  long as the driver reports its max context ID to the core somehow,
>  the specific ID values chosen are arbitrary and the driver doesn't
>  need to do the choosing, it can just take what comes out of the IDR.

Sounds great.