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 #ifndef LINUX_IO_URING_QUERY_H 6 #define LINUX_IO_URING_QUERY_H 7 8 #include <linux/types.h> 9 10 struct io_uring_query_hdr { 11 __u64 next_entry; 12 __u64 query_data; 13 __u32 query_op; 14 __u32 size; 15 __s32 result; 16 __u32 __resv[3]; 17 }; 18 19 enum { 20 IO_URING_QUERY_OPCODES = 0, 21 IO_URING_QUERY_ZCRX = 1, 22 IO_URING_QUERY_SCQ = 2, 23 24 __IO_URING_QUERY_MAX, 25 }; 26 27 /* Doesn't require a ring */ 28 struct io_uring_query_opcode { 29 /* The number of supported IORING_OP_* opcodes */ 30 __u32 nr_request_opcodes; 31 /* The number of supported IORING_[UN]REGISTER_* opcodes */ 32 __u32 nr_register_opcodes; 33 /* Bitmask of all supported IORING_FEAT_* flags */ 34 __u64 feature_flags; 35 /* Bitmask of all supported IORING_SETUP_* flags */ 36 __u64 ring_setup_flags; 37 /* Bitmask of all supported IORING_ENTER_** flags */ 38 __u64 enter_flags; 39 /* Bitmask of all supported IOSQE_* flags */ 40 __u64 sqe_flags; 41 /* The number of available query opcodes */ 42 __u32 nr_query_opcodes; 43 __u32 __pad; 44 }; 45 46 struct io_uring_query_zcrx { 47 /* Bitmask of supported ZCRX_REG_* flags, */ 48 __u64 register_flags; 49 /* Bitmask of all supported IORING_ZCRX_AREA_* flags */ 50 __u64 area_flags; 51 /* The number of supported ZCRX_CTRL_* opcodes */ 52 __u32 nr_ctrl_opcodes; 53 __u32 __resv1; 54 /* The refill ring header size */ 55 __u32 rq_hdr_size; 56 /* The alignment for the header */ 57 __u32 rq_hdr_alignment; 58 __u64 __resv2; 59 }; 60 61 struct io_uring_query_scq { 62 /* The SQ/CQ rings header size */ 63 __u64 hdr_size; 64 /* The alignment for the header */ 65 __u64 hdr_alignment; 66 }; 67 68 #endif 69