]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
Add support to set NAPI threaded for individual NAPI
authorSamiullah Khawaja <skhawaja@google.com>
Thu, 10 Jul 2025 21:12:03 +0000 (21:12 +0000)
committerJakub Kicinski <kuba@kernel.org>
Tue, 15 Jul 2025 01:02:37 +0000 (18:02 -0700)
commit2677010e7793451c20d895c477c4dc76f6e6a10e
treeb01196cdc5e5b9804e2a073f1ec4abff855c0665
parenta44312d58e78cfe8f0e72435101b7a9187b21d46
Add support to set NAPI threaded for individual NAPI

A net device has a threaded sysctl that can be used to enable threaded
NAPI polling on all of the NAPI contexts under that device. Allow
enabling threaded NAPI polling at individual NAPI level using netlink.

Extend the netlink operation `napi-set` and allow setting the threaded
attribute of a NAPI. This will enable the threaded polling on a NAPI
context.

Add a test in `nl_netdev.py` that verifies various cases of threaded
NAPI being set at NAPI and at device level.

Tested
 ./tools/testing/selftests/net/nl_netdev.py
 TAP version 13
 1..7
 ok 1 nl_netdev.empty_check
 ok 2 nl_netdev.lo_check
 ok 3 nl_netdev.page_pool_check
 ok 4 nl_netdev.napi_list_check
 ok 5 nl_netdev.dev_set_threaded
 ok 6 nl_netdev.napi_set_threaded
 ok 7 nl_netdev.nsim_rxq_reset_down
 # Totals: pass:7 fail:0 xfail:0 xpass:0 skip:0 error:0

Signed-off-by: Samiullah Khawaja <skhawaja@google.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://patch.msgid.link/20250710211203.3979655-1-skhawaja@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Documentation/netlink/specs/netdev.yaml
Documentation/networking/napi.rst
include/linux/netdevice.h
include/uapi/linux/netdev.h
net/core/dev.c
net/core/dev.h
net/core/netdev-genl-gen.c
net/core/netdev-genl.c
tools/include/uapi/linux/netdev.h
tools/testing/selftests/net/nl_netdev.py