Remove the wait register opcode and add region registration bits. Signed-off-by: Pavel Begunkov <asml.silence@xxxxxxxxx> --- src/include/liburing/io_uring.h | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/src/include/liburing/io_uring.h b/src/include/liburing/io_uring.h index 20bc570..b2adc3f 100644 --- a/src/include/liburing/io_uring.h +++ b/src/include/liburing/io_uring.h @@ -615,7 +615,7 @@ enum io_uring_register_op { IORING_REGISTER_RESIZE_RINGS = 33, - IORING_REGISTER_CQWAIT_REG = 34, + IORING_REGISTER_MEM_REGION = 34, /* this goes last */ IORING_REGISTER_LAST, @@ -637,6 +637,31 @@ struct io_uring_files_update { __aligned_u64 /* __s32 * */ fds; }; +enum { + /* initialise with user provided memory pointed by user_addr */ + IORING_MEM_REGION_TYPE_USER = 1, +}; + +struct io_uring_region_desc { + __u64 user_addr; + __u64 size; + __u32 flags; + __u32 id; + __u64 mmap_offset; + __u64 __resv[4]; +}; + +enum { + /* expose the region as registered wait arguments */ + IORING_MEM_REGION_REG_WAIT_ARG = 1, +}; + +struct io_uring_mem_region_reg { + __u64 region_uptr; /* struct io_uring_region_desc * */ + __u64 flags; + __u64 __resv[2]; +}; + /* * Register a fully sparse file space, rather than pass in an array of all * -1 file descriptors. -- 2.46.0