]> git.ipfire.org Git - thirdparty/linux.git/commit
netdev-genl: Elide napi_id when not present
authorJoe Damato <jdamato@fastly.com>
Wed, 5 Feb 2025 19:37:47 +0000 (19:37 +0000)
committerJakub Kicinski <kuba@kernel.org>
Fri, 7 Feb 2025 00:59:25 +0000 (16:59 -0800)
commit6597e8d35851e1e0cb381f76ce1d960518fd8c94
tree6bc4840bf5a436cfec3627b96d0a6b919c291edc
parent71f0dd5a3293d75d26d405ffbaedfdda4836af32
netdev-genl: Elide napi_id when not present

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.

Signed-off-by: Joe Damato <jdamato@fastly.com>
Reviewed-by: Sridhar Samudrala <sridhar.samudrala@intel.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20250205193751.297211-1-jdamato@fastly.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/busy_poll.h
net/core/netdev-genl.c