[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z6O3-1rZm8wBazxG@LQ3V64L9R2>
Date: Wed, 5 Feb 2025 11:11:55 -0800
From: Joe Damato <jdamato@...tly.com>
To: netdev@...r.kernel.org
Cc: pabeni@...hat.com, edumazet@...gle.com, sridhar.samudrala@...el.com,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, Simon Horman <horms@...nel.org>,
Stanislav Fomichev <sdf@...ichev.me>,
Mina Almasry <almasrymina@...gle.com>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next v3] netdev-genl: Elide napi_id when not present
On Tue, Feb 04, 2025 at 07:27:21PM +0000, Joe Damato wrote:
> There are at least two cases where napi_id may not present and the
> napi_id should be elided:
>
> 1. Queues could be created, but napi_enable may not have been called
> yet. In this case, there may be a NAPI but it may not have an ID and
> output of a napi_id should be elided.
>
> 2. TX-only NAPIs currently do not have NAPI IDs. If a TX queue happens
> to be linked with a TX-only NAPI, elide the NAPI ID from the netlink
> output as a NAPI ID of 0 is not useful for users.
[...]
> binding = rxq->mp_params.mp_priv;
> @@ -397,8 +403,7 @@ netdev_nl_queue_fill_one(struct sk_buff *rsp, struct net_device *netdev,
> break;
> case NETDEV_QUEUE_TYPE_TX:
> txq = netdev_get_tx_queue(netdev, q_idx);
> - if (txq->napi && nla_put_u32(rsp, NETDEV_A_QUEUE_NAPI_ID,
> - txq->napi->napi_id))
> + if (nla_put_napi_id(rsp, rxq->napi))
Err, looks like a typo. Sorry about that, will fix in v4.
--
pw-bot: cr
Powered by blists - more mailing lists