public inbox for [email protected]
 help / color / mirror / Atom feed
From: Pavel Begunkov <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: [PATCH liburing 2/8] Update io_uring.h
Date: Fri, 15 Nov 2024 21:33:49 +0000	[thread overview]
Message-ID: <7f84430397941168cd4237590cad20578236184b.1731705935.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>

Remove the wait register opcode and add region registration
bits.

Signed-off-by: Pavel Begunkov <[email protected]>
---
 src/include/liburing/io_uring.h | 27 ++++++++++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)

diff --git a/src/include/liburing/io_uring.h b/src/include/liburing/io_uring.h
index 20bc570..b2adc3f 100644
--- a/src/include/liburing/io_uring.h
+++ b/src/include/liburing/io_uring.h
@@ -615,7 +615,7 @@ enum io_uring_register_op {
 
 	IORING_REGISTER_RESIZE_RINGS		= 33,
 
-	IORING_REGISTER_CQWAIT_REG		= 34,
+	IORING_REGISTER_MEM_REGION		= 34,
 
 	/* this goes last */
 	IORING_REGISTER_LAST,
@@ -637,6 +637,31 @@ struct io_uring_files_update {
 	__aligned_u64 /* __s32 * */ fds;
 };
 
+enum {
+	/* initialise with user provided memory pointed by user_addr */
+	IORING_MEM_REGION_TYPE_USER		= 1,
+};
+
+struct io_uring_region_desc {
+	__u64 user_addr;
+	__u64 size;
+	__u32 flags;
+	__u32 id;
+	__u64 mmap_offset;
+	__u64 __resv[4];
+};
+
+enum {
+	/* expose the region as registered wait arguments */
+	IORING_MEM_REGION_REG_WAIT_ARG		= 1,
+};
+
+struct io_uring_mem_region_reg {
+	__u64 region_uptr; /* struct io_uring_region_desc * */
+	__u64 flags;
+	__u64 __resv[2];
+};
+
 /*
  * Register a fully sparse file space, rather than pass in an array of all
  * -1 file descriptors.
-- 
2.46.0


  parent reply	other threads:[~2024-11-15 21:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-15 21:33 [PATCH liburing 0/8] update reg-wait to use region API Pavel Begunkov
2024-11-15 21:33 ` [PATCH liburing 1/8] queue: break reg wait setup Pavel Begunkov
2024-11-15 21:33 ` Pavel Begunkov [this message]
2024-11-15 21:33 ` [PATCH liburing 3/8] queue: add region helpers and fix up wait reg kernel api Pavel Begunkov
2024-11-15 21:33 ` [PATCH liburing 4/8] examples: convert reg-wait to new api Pavel Begunkov
2024-11-15 21:33 ` [PATCH liburing 5/8] tests: convert reg-wait to regions Pavel Begunkov
2024-11-15 21:33 ` [PATCH liburing 6/8] tests: add region testing Pavel Begunkov
2024-11-15 21:33 ` [PATCH liburing 7/8] tests: test arbitrary offset reg waits Pavel Begunkov
2024-11-15 21:33 ` [PATCH liburing 8/8] Remove leftovers of old reg-wait registration api Pavel Begunkov
2024-11-16 17:07 ` [PATCH liburing 0/8] update reg-wait to use region API 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=7f84430397941168cd4237590cad20578236184b.1731705935.git.asml.silence@gmail.com \
    [email protected] \
    [email protected] \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox