io_uring: add UAPI definitions for mixed CQE postings
authorJens Axboe <axboe@kernel.dk>
Thu, 7 Aug 2025 20:08:14 +0000 (14:08 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 8 Aug 2025 15:24:47 +0000 (09:24 -0600)
This adds the CQE flags related to supporting a mixed CQ ring mode, where
both normal (16b) and big (32b) CQEs may be posted.

No functional changes in this patch.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/uapi/linux/io_uring.h

index 6957dc539d83b43bdfd860b7ec17e64cdd91616f..69337eb1db334510e5e8db669bfb6559dc1fdb84 100644 (file)
@@ -487,12 +487,22 @@ struct io_uring_cqe {
  *                     other provided buffer type, all completions with a
  *                     buffer passed back is automatically returned to the
  *                     application.
+ * IORING_CQE_F_SKIP   If set, then the application/liburing must ignore this
+ *                     CQE. It's only purpose is to fill a gap in the ring,
+ *                     if a large CQE is attempted posted when the ring has
+ *                     just a single small CQE worth of space left before
+ *                     wrapping.
+ * IORING_CQE_F_32     If set, this is a 32b/big-cqe posting. Use with rings
+ *                     setup in a mixed CQE mode, where both 16b and 32b
+ *                     CQEs may be posted to the CQ ring.
  */
 #define IORING_CQE_F_BUFFER            (1U << 0)
 #define IORING_CQE_F_MORE              (1U << 1)
 #define IORING_CQE_F_SOCK_NONEMPTY     (1U << 2)
 #define IORING_CQE_F_NOTIF             (1U << 3)
 #define IORING_CQE_F_BUF_MORE          (1U << 4)
+#define IORING_CQE_F_SKIP              (1U << 5)
+#define IORING_CQE_F_32                        (1U << 15)
 
 #define IORING_CQE_BUFFER_SHIFT                16