diff options
Diffstat (limited to 'include/uapi/linux/io_uring.h')
| -rw-r--r-- | include/uapi/linux/io_uring.h | 38 | 
1 files changed, 28 insertions, 10 deletions
diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h index 7bd10201a02b..994bf7af0efe 100644 --- a/include/uapi/linux/io_uring.h +++ b/include/uapi/linux/io_uring.h @@ -72,6 +72,7 @@ struct io_uring_sqe {  		__u32		waitid_flags;  		__u32		futex_flags;  		__u32		install_fd_flags; +		__u32		nop_flags;  	};  	__u64	user_data;	/* data to be passed back at completion time */  	/* pack this to avoid bogus arm OABI complaints */ @@ -115,7 +116,7 @@ struct io_uring_sqe {   */  #define IORING_FILE_INDEX_ALLOC		(~0U) -enum { +enum io_uring_sqe_flags_bit {  	IOSQE_FIXED_FILE_BIT,  	IOSQE_IO_DRAIN_BIT,  	IOSQE_IO_LINK_BIT, @@ -351,11 +352,20 @@ enum io_uring_op {   *				0 is reported if zerocopy was actually possible.   *				IORING_NOTIF_USAGE_ZC_COPIED if data was copied   *				(at least partially). + * + * IORING_RECVSEND_BUNDLE	Used with IOSQE_BUFFER_SELECT. If set, send or + *				recv will grab as many buffers from the buffer + *				group ID given and send them all. The completion + *				result 	will be the number of buffers send, with + *				the starting buffer ID in cqe->flags as per + *				usual for provided buffer usage. The buffers + *				will be	contigious from the starting buffer ID.   */  #define IORING_RECVSEND_POLL_FIRST	(1U << 0)  #define IORING_RECV_MULTISHOT		(1U << 1)  #define IORING_RECVSEND_FIXED_BUF	(1U << 2)  #define IORING_SEND_ZC_REPORT_USAGE	(1U << 3) +#define IORING_RECVSEND_BUNDLE		(1U << 4)  /*   * cqe.res for IORING_CQE_F_NOTIF if @@ -370,11 +380,13 @@ enum io_uring_op {   * accept flags stored in sqe->ioprio   */  #define IORING_ACCEPT_MULTISHOT	(1U << 0) +#define IORING_ACCEPT_DONTWAIT	(1U << 1) +#define IORING_ACCEPT_POLL_FIRST	(1U << 2)  /*   * IORING_OP_MSG_RING command types, stored in sqe->addr   */ -enum { +enum io_uring_msg_ring_flags {  	IORING_MSG_DATA,	/* pass sqe->len as 'res' and off as user_data */  	IORING_MSG_SEND_FD,	/* send a registered fd to another ring */  }; @@ -397,6 +409,13 @@ enum {  #define IORING_FIXED_FD_NO_CLOEXEC	(1U << 0)  /* + * IORING_OP_NOP flags (sqe->nop_flags) + * + * IORING_NOP_INJECT_RESULT	Inject result from sqe->result + */ +#define IORING_NOP_INJECT_RESULT	(1U << 0) + +/*   * IO completion data structure (Completion Queue Entry)   */  struct io_uring_cqe { @@ -425,9 +444,7 @@ struct io_uring_cqe {  #define IORING_CQE_F_SOCK_NONEMPTY	(1U << 2)  #define IORING_CQE_F_NOTIF		(1U << 3) -enum { -	IORING_CQE_BUFFER_SHIFT		= 16, -}; +#define IORING_CQE_BUFFER_SHIFT		16  /*   * Magic offsets for the application to mmap the data it needs @@ -522,11 +539,12 @@ struct io_uring_params {  #define IORING_FEAT_CQE_SKIP		(1U << 11)  #define IORING_FEAT_LINKED_FILE		(1U << 12)  #define IORING_FEAT_REG_REG_RING	(1U << 13) +#define IORING_FEAT_RECVSEND_BUNDLE	(1U << 14)  /*   * io_uring_register(2) opcodes and arguments   */ -enum { +enum io_uring_register_op {  	IORING_REGISTER_BUFFERS			= 0,  	IORING_UNREGISTER_BUFFERS		= 1,  	IORING_REGISTER_FILES			= 2, @@ -583,7 +601,7 @@ enum {  };  /* io-wq worker categories */ -enum { +enum io_wq_type {  	IO_WQ_BOUND,  	IO_WQ_UNBOUND,  }; @@ -688,7 +706,7 @@ struct io_uring_buf_ring {   *			IORING_OFF_PBUF_RING | (bgid << IORING_OFF_PBUF_SHIFT)   *			to get a virtual mapping for the ring.   */ -enum { +enum io_uring_register_pbuf_ring_flags {  	IOU_PBUF_RING_MMAP	= 1,  }; @@ -719,7 +737,7 @@ struct io_uring_napi {  /*   * io_uring_restriction->opcode values   */ -enum { +enum io_uring_register_restriction_op {  	/* Allow an io_uring_register(2) opcode */  	IORING_RESTRICTION_REGISTER_OP		= 0, @@ -775,7 +793,7 @@ struct io_uring_recvmsg_out {  /*   * Argument for IORING_OP_URING_CMD when file is a socket   */ -enum { +enum io_uring_socket_op {  	SOCKET_URING_OP_SIOCINQ		= 0,  	SOCKET_URING_OP_SIOCOUTQ,  	SOCKET_URING_OP_GETSOCKOPT,  |