All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Joe Damato <jdamato@fastly.com>
Cc: netdev@vger.kernel.org, sridhar.samudrala@intel.com,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
	Stanislav Fomichev <sdf@fomichev.me>,
	Mina Almasry <almasrymina@google.com>,
	linux-kernel@vger.kernel.org (open list)
Subject: Re: [RFC net-next] netdev-genl: Elide napi_id for TX-only NAPIs
Date: Tue, 28 Jan 2025 14:27:30 -0800	[thread overview]
Message-ID: <20250128142730.39be476b@kernel.org> (raw)
In-Reply-To: <20250128163038.429864-1-jdamato@fastly.com>

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.

      reply	other threads:[~2025-01-28 22:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-28 16:30 [RFC net-next] netdev-genl: Elide napi_id for TX-only NAPIs Joe Damato
2025-01-28 22:27 ` Jakub Kicinski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250128142730.39be476b@kernel.org \
    --to=kuba@kernel.org \
    --cc=almasrymina@google.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jdamato@fastly.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf@fomichev.me \
    --cc=sridhar.samudrala@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.