Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1/* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) OR MIT */
2/*
3 * Header file for the io_uring query interface.
4 *
5 * Copyright (C) 2026 Pavel Begunkov <asml.silence@gmail.com>
6 * Copyright (C) Meta Platforms, Inc.
7 */
8#ifndef LINUX_IO_URING_QUERY_H
9#define LINUX_IO_URING_QUERY_H
10
11#include <linux/types.h>
12
13struct io_uring_query_hdr {
14 __u64 next_entry;
15 __u64 query_data;
16 __u32 query_op;
17 __u32 size;
18 __s32 result;
19 __u32 __resv[3];
20};
21
22enum {
23 IO_URING_QUERY_OPCODES = 0,
24 IO_URING_QUERY_ZCRX = 1,
25 IO_URING_QUERY_SCQ = 2,
26
27 __IO_URING_QUERY_MAX,
28};
29
30/* Doesn't require a ring */
31struct io_uring_query_opcode {
32 /* The number of supported IORING_OP_* opcodes */
33 __u32 nr_request_opcodes;
34 /* The number of supported IORING_[UN]REGISTER_* opcodes */
35 __u32 nr_register_opcodes;
36 /* Bitmask of all supported IORING_FEAT_* flags */
37 __u64 feature_flags;
38 /* Bitmask of all supported IORING_SETUP_* flags */
39 __u64 ring_setup_flags;
40 /* Bitmask of all supported IORING_ENTER_** flags */
41 __u64 enter_flags;
42 /* Bitmask of all supported IOSQE_* flags */
43 __u64 sqe_flags;
44 /* The number of available query opcodes */
45 __u32 nr_query_opcodes;
46 __u32 __pad;
47};
48
49struct io_uring_query_zcrx {
50 /* Bitmask of supported ZCRX_REG_* flags, */
51 __u64 register_flags;
52 /* Bitmask of all supported IORING_ZCRX_AREA_* flags */
53 __u64 area_flags;
54 /* The number of supported ZCRX_CTRL_* opcodes */
55 __u32 nr_ctrl_opcodes;
56 /* Bitmask of ZCRX_FEATURE_* indicating which features are available */
57 __u32 features;
58 /* The refill ring header size */
59 __u32 rq_hdr_size;
60 /* The alignment for the header */
61 __u32 rq_hdr_alignment;
62 __u64 __resv2;
63};
64
65struct io_uring_query_scq {
66 /* The SQ/CQ rings header size */
67 __u64 hdr_size;
68 /* The alignment for the header */
69 __u64 hdr_alignment;
70};
71
72#endif