summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrishna Kanth Reddy <krish.reddy@samsung.com>2022-05-11 14:54:46 +0530
committerJens Axboe <axboe@kernel.dk>2022-05-16 09:33:26 -0600
commit707550cb0d7c60caa1f788cb416ea52c5a1a4535 (patch)
tree1bd90042db892a0a15f17298679de45aec5d7ad6
parent855ffa0d9fc7875ada65ec23a086489dac59e2c9 (diff)
downloadliburing-707550cb0d7c60caa1f788cb416ea52c5a1a4535.tar.gz
liburing-707550cb0d7c60caa1f788cb416ea52c5a1a4535.tar.bz2
liburing: Update io_uring.h
This updates the io_uring.h file with the changes in the kernel. Fixed the build issue that arises because of the updated fields. Signed-off-by: Krishna Kanth Reddy <krish.reddy@samsung.com>
-rw-r--r--src/include/liburing/io_uring.h25
1 files changed, 20 insertions, 5 deletions
diff --git a/src/include/liburing/io_uring.h b/src/include/liburing/io_uring.h
index 4e1f994..0acf05d 100644
--- a/src/include/liburing/io_uring.h
+++ b/src/include/liburing/io_uring.h
@@ -108,10 +108,25 @@ enum {
#define IORING_SETUP_ATTACH_WQ (1U << 5) /* attach to existing wq */
#define IORING_SETUP_R_DISABLED (1U << 6) /* start with ring disabled */
#define IORING_SETUP_SUBMIT_ALL (1U << 7) /* continue submit on error */
-#define IORING_SETUP_SQE128 (1U << 8) /* SQEs are 128b */
-#define IORING_SETUP_CQE32 (1U << 9) /* CQEs are 32b */
+/*
+ * Cooperative task running. When requests complete, they often require
+ * forcing the submitter to transition to the kernel to complete. If this
+ * flag is set, work will be done when the task transitions anyway, rather
+ * than force an inter-processor interrupt reschedule. This avoids interrupting
+ * a task running in userspace, and saves an IPI.
+ */
+#define IORING_SETUP_COOP_TASKRUN (1U << 8)
+/*
+ * If COOP_TASKRUN is set, get notified if task work is available for
+ * running and a kernel transition would be needed to run it. This sets
+ * IORING_SQ_TASKRUN in the sq ring flags. Not valid with COOP_TASKRUN.
+ */
+#define IORING_SETUP_TASKRUN_FLAG (1U << 9)
-enum {
+#define IORING_SETUP_SQE128 (1U << 10) /* SQEs are 128 byte */
+#define IORING_SETUP_CQE32 (1U << 11) /* CQEs are 32 byte */
+
+enum io_uring_op {
IORING_OP_NOP,
IORING_OP_READV,
IORING_OP_WRITEV,
@@ -230,8 +245,8 @@ struct io_uring_cqe {
__u32 flags;
/*
- * If the ring is initialized wit IORING_SETUP_CQE32, then this field
- * contains 16-bytes of padding, doubling the size fo the CQE.
+ * If the ring is initialized with IORING_SETUP_CQE32, then this field
+ * contains 16-bytes of padding, doubling the size of the CQE.
*/
__u64 big_cqe[];
};