io\_uring\_register\_napi(3) liburing Manual io\_uring\_register\_napi(3)

# [NAME](#NAME)

io\_uring\_register\_napi - register NAPI busy poll settings

# [SYNOPSIS](#SYNOPSIS)

```
#include <liburing.h>
```

```
int io_uring_register_napi(struct io_uring *ring,
                           struct io_uring_napi *napi)
```

```

```

# [DESCRIPTION](#DESCRIPTION)

The [**io\_uring\_register\_napi**(3)](/man/os/liburing/io_uring_register_napi.3) function registers the NAPI settings for subsequent operations. The NAPI settings are specified in the structure that is passed in the *napi* parameter. The structure consists of the napi timeout *busy\_poll\_to* (napi busy poll timeout in us) and *prefer\_busy\_poll*.

Registering a NAPI settings sets the mode when calling the function napi\_busy\_loop and corresponds to the SO\_PREFER\_BUSY\_POLL socket option.

NAPI busy poll can reduce the network roundtrip time.

# [RETURN VALUE](#RETURN_VALUE)

On success [**io\_uring\_register\_napi**(3)](/man/os/liburing/io_uring_register_napi.3) return 0. On failure they return **-errno**. It also updates the napi structure with the current values.

November 16, 2022 liburing-2.4

---

Document: io_uring_register_napi(3) from liburing 2.15-r5 (Chainguard OS)
Source: https://github.com/axboe/liburing.git
