Subject: Re: [PATCH v4 net-next 2/7] net: ethtool: attach an XArray of custom RSS contexts to a netdevice

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

On Wed, 27 Sep 2023 19:13:33 +0100 [email-masked] wrote:
>  /**
>   * struct ethtool_netdev_state - per-netdevice state for ethtool features
> + * @rss_ctx:		XArray of custom RSS contexts
> + * @rss_ctx_max_id:	maximum (exclusive) supported RSS context ID

Is this one set by the driver? How would it be set?
It'd be good if drivers didn't access ethtool state directly.
Makes core easier to refactor if the API is constrained.

>   * @wol_enabled:	Wake-on-LAN is enabled
>   */
>  struct ethtool_netdev_state {
> -	unsigned		wol_enabled:1;
> +	struct xarray		rss_ctx;
> +	u32			rss_ctx_max_id;
> +	u32			wol_enabled:1;