Re: [PATCH net-next v3 1/4] Add support to set napi threaded for individual napi
From: Joe Damato <hidden>
Date: 2025-02-06 18:40:20
On Wed, Feb 05, 2025 at 11:10:03PM +0000, David Laight wrote:
On Wed, 5 Feb 2025 00:10:49 +0000 Samiullah Khawaja [off-list ref] wrote:quoted
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. Tested using following command in qemu/virtio-net: ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \ --do napi-set --json '{"id": 66, "threaded": 1}'Is there a sane way for a 'real person' to set these from a normal startup/network configuration script? The netlink API is hardly user-friendly.
There is a C library, libynl that abstracts a lot of the netlink stuff away and is quite nice. That said, if you wanted to use it from a script, you'd probably need bindings for it in the language of your choice. If you meant more a shell script type setup, then yea.... the python CLI is (AFAIK) the only option.