Skip to main content

Module napi

Module napi 

Source
Expand description

io_uring NAPI busy-poll registration for NFS-target rings. io_uring NAPI busy-poll registration for NFS-target rings.

NAPI busy-polling reduces network completion latency by having the kernel poll NIC receive queues directly from io_uring_enter(), avoiding the interrupt->softirq->wakeup path. This is particularly beneficial for NFS targets where each copy operation involves multiple RPC round-trips.

Kernel requirements: Linux 6.9+, CONFIG_NET_RX_BUSY_POLL=y. The wrapper degrades gracefully on older kernels (returns Err(ENOSYS)).

Uses the io-uring 0.7.13 crate’s native Submitter::register_napi API (io_uring::types::Napi), which wraps IORING_REGISTER_NAPI (opcode 27).

Constants§

DEFAULT_NAPI_BUSY_POLL_TO_US
Default busy-poll timeout in microseconds.

Functions§

register_napi_with_ring
Register NAPI busy-poll parameters with an io_uring ring.
try_register_napi
Attempt to register NAPI busy-poll, treating ENOSYS as success.
unregister_napi_from_ring
Unregister NAPI busy-poll from an io_uring ring.