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 22 __IO_URING_QUERY_MAX, 23 }; 24 25 /* Doesn't require a ring */ 26 struct io_uring_query_opcode { 27 /* The number of supported IORING_OP_* opcodes */ 28 __u32 nr_request_opcodes; 29 /* The number of supported IORING_[UN]REGISTER_* opcodes */ 30 __u32 nr_register_opcodes; 31 /* Bitmask of all supported IORING_FEAT_* flags */ 32 __u64 feature_flags; 33 /* Bitmask of all supported IORING_SETUP_* flags */ 34 __u64 ring_setup_flags; 35 /* Bitmask of all supported IORING_ENTER_** flags */ 36 __u64 enter_flags; 37 /* Bitmask of all supported IOSQE_* flags */ 38 __u64 sqe_flags; 39 /* The number of available query opcodes */ 40 __u32 nr_query_opcodes; 41 __u32 __pad; 42 }; 43 44 #endif 45