Thread (4 messages) flat view 4 messages, 2 authors, 2025-02-05

Re: [PATCH net-next v3] netdev-genl: Elide napi_id when not present

From: Joe Damato <hidden>
Date: 2025-02-05 19:11:59
Also in: lkml

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.
[...]
quoted hunk ↗ jump to hunk
 		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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help