Subject: Re: [RFC net-next] netdev-genl: Elide napi_id for TX-only NAPIs

From: Jakub Kicinski <[email-masked]>
Date: Tue, 28 Jan 2025 14:27:30 -0800

On Tue, 28 Jan 2025 16:30:37 +0000 Joe Damato wrote:
> -		if (txq->napi && nla_put_u32(rsp, NETDEV_A_QUEUE_NAPI_ID,
> -					     txq->napi->napi_id))
> +		if (!txq->napi)
>  			goto nla_put_failure;

Skip the attr but no need to fail. We're reporting info about a queue
here, the queue still exists, even if we can't report a valid NAPI ID.

> +		if (txq->napi->napi_id >= MIN_NAPI_ID)
> +			if (nla_put_u32(rsp, NETDEV_A_QUEUE_NAPI_ID,
> +					txq->napi->napi_id))
> +				goto nla_put_failure;

Similar treatment should be applied to the Rx queues, I reckon.