io_uring_register_napi(3)
β¨ io_uring_register_napi β¨
okay bestie, gather round, because we're talking about the liburing manual page for io_uring_register_napi(3) and honestly? it's giving network-nerd excellence π¦
πΈ NAME πΈ
io_uring_register_napi β register NAPI busy poll settings π
π SYNOPSIS π
#include <liburing.h>
int io_uring_register_napi(struct io_uring *ring,
struct io_uring_napi *napi)
π DESCRIPTION π
so io_uring_register_napi(3) registers the NAPI settings for all the operations that come after it. like, it's setting the vibe for everything downstream, no cap. β¨
the NAPI settings themselves live in the struct you hand over in the napi parameter, and that struct is made of:
- the napi timeout
busy_poll_toβ that's the napi busy poll timeout, measured in us - and
prefer_busy_poll
registering NAPI settings sets the mode that gets used when you call the function napi_busy_loop, and lowkey it corresponds to the SO_PREFER_BUSY_POLL socket option. iykyk π₯
and the whole point? NAPI busy poll can reduce the network roundtrip time. literally faster roundtrips, we love to see it π
β RETURN VALUE β
- on success,
io_uring_register_napi(3)returns0π«Ά - on failure, it returns
-errnoπ - and heads up β it also updates the
napistructure with the current values, so that struct isn't staying the way you left it bestie, it's coming back with receipts π
reminder that this one both registers and updates, so don't be shocked when your napi struct changes on you π
and that's the whole page, periodt π this was the liburing-2.4 version of the manual, dated November 16, 2022 β mwah, go reduce some roundtrip times bestie π§π
π¦ where this page comes from
- alpine 3.22: liburing-doc 2.9-r0 Β· LGPL-2.1-or-later OR MIT
- alpine 3.23: liburing-doc 2.12-r0 Β· LGPL-2.1-or-later OR MIT
- alpine 3.24: liburing-doc 2.14-r0 Β· LGPL-2.1-or-later OR MIT
- arch rolling: liburing 2.15-1 Β· GPL-2.0-only WITH Linux-syscall-note OR MIT AND LGPL-2.0-or-later AND MIT
- centos-stream 10: liburing-devel 2.12-1.el10 Β· (GPLv2 with exceptions and LGPLv2+) or MIT
- centos-stream 9: liburing-devel 2.12-1.el9 Β· (GPLv2 with exceptions and LGPLv2+) or MIT
- centos-stream 9: liburing-devel 2.12-1.el9 Β· (GPLv2 with exceptions and LGPLv2+) or MIT
- debian trixie: liburing-dev 2.9-1
- fedora 43: liburing-devel 2.9-2.fc43 Β· (GPL-2.0-only WITH Linux-syscall-note OR MIT) AND (LGPL-2.0-or-later OR MIT)
- fedora 43: liburing-devel 2.9-2.fc43 Β· (GPL-2.0-only WITH Linux-syscall-note OR MIT) AND (LGPL-2.0-or-later OR MIT)
- fedora 44: liburing-devel 2.13-2.fc44 Β· (GPL-2.0-only WITH Linux-syscall-note OR MIT) AND (LGPL-2.0-or-later OR MIT)
- fedora 44: liburing-devel 2.13-2.fc44 Β· (GPL-2.0-only WITH Linux-syscall-note OR MIT) AND (LGPL-2.0-or-later OR MIT)
- nixpkgs unstable: liburing 2.14
- opensuse-leap 16.0: liburing-devel 2.8-160000.3.1 Β· (GPL-2.0-only AND LGPL-2.1-or-later) OR MIT
- opensuse-leap 16.0: liburing-devel 2.8-160000.3.1 Β· (GPL-2.0-only AND LGPL-2.1-or-later) OR MIT
- opensuse-leap 16.0: liburing-devel 2.8-160000.3.1 Β· (GPL-2.0-only AND LGPL-2.1-or-later) OR MIT
- opensuse-leap 16.0: liburing-devel 2.8-160000.3.1 Β· (GPL-2.0-only AND LGPL-2.1-or-later) OR MIT
- ubuntu questing: liburing-dev 2.11-1
- ubuntu resolute: liburing-dev 2.14-1
- ubuntu stonking: liburing-dev 2.15-1
- π the page's license: LGPL-2.0-or-later
- Copyright (C) 2022 Stefan Roesch <shr@devkernel.io>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms