All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: io-uring@vger.kernel.org
Cc: Jens Axboe <axboe@kernel.dk>
Subject: [PATCH 8/8] io_uring/zcrx: add support for IORING_SETUP_CQE_MIXED
Date: Thu, 21 Aug 2025 08:18:08 -0600	[thread overview]
Message-ID: <20250821141957.680570-9-axboe@kernel.dk> (raw)
In-Reply-To: <20250821141957.680570-1-axboe@kernel.dk>

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 | 2 +-
 io_uring/zcrx.c                       | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/Documentation/networking/iou-zcrx.rst b/Documentation/networking/iou-zcrx.rst
index 0127319b30bb..54a72e172bdc 100644
--- a/Documentation/networking/iou-zcrx.rst
+++ b/Documentation/networking/iou-zcrx.rst
@@ -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
 ------------------
diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c
index e5ff49f3425e..f1da852c496b 100644
--- a/io_uring/zcrx.c
+++ b/io_uring/zcrx.c
@@ -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;
-- 
2.50.1


  parent reply	other threads:[~2025-08-21 14:20 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-21 14:18 [PATCHSET v2 0/8] Add support for mixed sized CQEs Jens Axboe
2025-08-21 14:18 ` [PATCH 1/8] io_uring: remove io_ctx_cqe32() helper Jens Axboe
2025-08-21 14:18 ` [PATCH 2/8] io_uring: add UAPI definitions for mixed CQE postings Jens Axboe
2025-08-21 14:18 ` [PATCH 3/8] io_uring/fdinfo: handle mixed sized CQEs Jens Axboe
2025-08-21 14:18 ` [PATCH 4/8] io_uring/trace: support completion tracing of mixed 32b CQEs Jens Axboe
2025-08-21 14:18 ` [PATCH 5/8] io_uring: add support for IORING_SETUP_CQE_MIXED Jens Axboe
2025-08-21 14:18 ` [PATCH 6/8] io_uring/nop: " Jens Axboe
2025-08-21 14:18 ` [PATCH 7/8] io_uring/uring_cmd: " Jens Axboe
2025-08-21 14:18 ` Jens Axboe [this message]
2025-08-21 17:02 ` [PATCHSET v2 0/8] Add support for mixed sized CQEs Caleb Sander Mateos
2025-08-21 17:12   ` Jens Axboe
2025-08-21 17:40     ` Keith Busch
2025-08-21 17:47       ` Jens Axboe
2025-08-21 17:41     ` Caleb Sander Mateos
2025-08-21 17:46       ` Jens Axboe
2025-08-21 18:19         ` Caleb Sander Mateos
  -- strict thread matches above, loose matches on Subject: below --
2025-08-08 17:03 [PATCHSET RFC " Jens Axboe
2025-08-08 17:03 ` [PATCH 8/8] io_uring/zcrx: add support for IORING_SETUP_CQE_MIXED Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250821141957.680570-9-axboe@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.