---
name: "io_uring_register_query"
section: "3"
platform: "linux"
package: "liburing"
version: "2.15-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/io_uring_register_query"
---

# io\_uring\_register\_query(3)

query io\_uring capabilities and feature support

## NAME

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

## SYNOPSIS

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

**int io\_uring\_register\_query(struct io\_uring\_query\_hdr \****query***);**

## DESCRIPTION

The [**io\_uring\_register\_query**(3)](/io_uring_register_query/3.md) 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**

  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**

  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**

  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

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

## 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

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