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

# [NAME](#NAME)

io\_uring\_register\_query - query io\_uring capabilities and feature support

# [SYNOPSIS](#SYNOPSIS)

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

```
int io_uring_register_query(struct io_uring_query_hdr *query);
```

# [DESCRIPTION](#DESCRIPTION)

The [**io\_uring\_register\_query**(3)](/man/os/liburing/io_uring_register_query.3) function queries io\_uring capabilities and feature support. It provides information about supported opcodes, flags, and subsystem-specific capabilities.

The *query* argument must point to a *struct io\_uring\_query\_hdr* structure that describes the query to perform:

```
struct io_uring_query_hdr {


    __u64 next_entry;


    __u64 query_data;


    __u32 query_op;


    __u32 size;


    __s32 result;


    __u32 __resv[3];
};
```

The *next\_entry* field can be used to chain multiple queries together. It should point to the next *struct io\_uring\_query\_hdr* structure, or be set to 0 for the last entry in the chain.

The *query\_data* field must point to a data structure appropriate for the query type specified in *query\_op*.

The *query\_op* field specifies the type of query to perform and can be one of:

[**IO\_URING\_QUERY\_OPCODES**](#IO_URING_QUERY_OPCODES)

Returns information about supported opcodes and flags. The *query\_data* field must point to a *struct io\_uring\_query\_opcode* structure, which will be filled with information about supported request opcodes, register opcodes, feature flags, setup flags, enter flags, and SQE flags.

[**IO\_URING\_QUERY\_ZCRX**](#IO_URING_QUERY_ZCRX)

Returns information about zero-copy receive support. The *query\_data* field must point to a *struct io\_uring\_query\_zcrx* structure, which will be filled with information about supported zero-copy receive flags, features, and configuration details.

[**IO\_URING\_QUERY\_SCQ**](#IO_URING_QUERY_SCQ)

Returns information about the SQ/CQ ring layout. The *query\_data* field must point to a *struct io\_uring\_query\_scq* structure, which will be filled with information about ring header size and alignment requirements.

The *size* field should be set to the size of the data structure pointed to by *query\_data*.

Upon return, the *result* field will contain 0 on success, or a negative error code on failure.

The reserved *\_\_resv* fields must be cleared to zero.

# [RETURN VALUE](#RETURN_VALUE)

Returns 0 on success. On error, a negative errno value is returned.

# [NOTES](#NOTES)

This function is available since Linux kernel 6.15.

Multiple queries can be efficiently performed in a single system call by chaining them together using the *next\_entry* field.

# [SEE ALSO](#SEE_ALSO)

[**io\_uring\_register**(2)](/man/os/liburing/io_uring_register.2), [**io\_uring\_setup**(2)](/man/os/liburing/io_uring_setup.2)

March 26, 2026 liburing-2.15

---

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