io_uring/zcrx: add support for IORING_SETUP_CQE_MIXED io_uring-cqe-mix
authorJens Axboe <axboe@kernel.dk>
Thu, 7 Aug 2025 20:25:50 +0000 (14:25 -0600)
committerJens Axboe <axboe@kernel.dk>
Wed, 20 Aug 2025 19:04:27 +0000 (13:04 -0600)
zcrx currently requires the ring to be set up with fixed 32b CQEs,
allow it to use IORING_SETUP_CQE_MIXED as well.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Documentation/networking/iou-zcrx.rst
io_uring/zcrx.c

index 0127319b30bb6aea62273d81e1880bb427e79aa6..54a72e172bdc5c35718eae82b167622d5a013346 100644 (file)
@@ -75,7 +75,7 @@ Create an io_uring instance with the following required setup flags::
 
   IORING_SETUP_SINGLE_ISSUER
   IORING_SETUP_DEFER_TASKRUN
-  IORING_SETUP_CQE32
+  IORING_SETUP_CQE32 or IORING_SETUP_CQE_MIXED
 
 Create memory area
 ------------------
index e5ff49f3425e0752909deec2e87992b575848416..f1da852c496b79d2680aab326d209a175c4fe683 100644 (file)
@@ -554,8 +554,9 @@ int io_register_zcrx_ifq(struct io_ring_ctx *ctx,
                return -EPERM;
 
        /* mandatory io_uring features for zc rx */
-       if (!(ctx->flags & IORING_SETUP_DEFER_TASKRUN &&
-             ctx->flags & IORING_SETUP_CQE32))
+       if (!(ctx->flags & IORING_SETUP_DEFER_TASKRUN))
+               return -EINVAL;
+       if (!(ctx->flags & (IORING_SETUP_CQE32|IORING_SETUP_CQE_MIXED)))
                return -EINVAL;
        if (copy_from_user(&reg, arg, sizeof(reg)))
                return -EFAULT;