public inbox for [email protected]
 help / color / mirror / Atom feed
From: Pavel Begunkov <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: [PATCH liburing 1/8] queue: break reg wait setup
Date: Fri, 15 Nov 2024 21:33:48 +0000	[thread overview]
Message-ID: <ddc75fc65ec8dc7ef0e8a681888266d2d8e9669f.1731705935.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>

We're changing the registration and kernel api, kill reg wait
registration but leave definitions so that tests build.

Signed-off-by: Pavel Begunkov <[email protected]>
---
 src/register.c |  9 +--------
 src/setup.c    | 19 -------------------
 2 files changed, 1 insertion(+), 27 deletions(-)

diff --git a/src/register.c b/src/register.c
index aef5baf..d566f5c 100644
--- a/src/register.c
+++ b/src/register.c
@@ -468,12 +468,5 @@ out:
 int io_uring_register_wait_reg(struct io_uring *ring,
 			       struct io_uring_reg_wait *reg, int nr)
 {
-	struct io_uring_cqwait_reg_arg arg = {
-		.flags		= 0,
-		.struct_size	= sizeof(*reg),
-		.nr_entries	= nr,
-		.user_addr	= (unsigned long) (uintptr_t) reg,
-	};
-
-	return do_register(ring, IORING_REGISTER_CQWAIT_REG, &arg, 1);
+	return -EINVAL;
 }
diff --git a/src/setup.c b/src/setup.c
index 073de50..7c0cfab 100644
--- a/src/setup.c
+++ b/src/setup.c
@@ -689,29 +689,10 @@ int io_uring_free_buf_ring(struct io_uring *ring, struct io_uring_buf_ring *br,
 
 void io_uring_free_reg_wait(struct io_uring_reg_wait *reg, unsigned nentries)
 {
-	__sys_munmap(reg, nentries * sizeof(struct io_uring_reg_wait));
 }
 
 struct io_uring_reg_wait *io_uring_setup_reg_wait(struct io_uring *ring,
 						  unsigned nentries, int *err)
 {
-	struct io_uring_reg_wait *reg;
-	size_t size = nentries * sizeof(*reg);
-	int ret;
-
-	reg = __sys_mmap(NULL, size, PROT_READ | PROT_WRITE,
-			MAP_SHARED|MAP_POPULATE|MAP_ANONYMOUS, -1, 0);
-	if (IS_ERR(reg)) {
-		*err = PTR_ERR(reg);
-		return NULL;
-	}
-
-	memset(reg, 0, size);
-	ret = io_uring_register_wait_reg(ring, reg, nentries);
-	if (!ret)
-		return reg;
-
-	__sys_munmap(reg, size);
-	*err = ret;
 	return NULL;
 }
-- 
2.46.0


  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 ` Pavel Begunkov [this message]
2024-11-15 21:33 ` [PATCH liburing 2/8] Update io_uring.h Pavel Begunkov
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=ddc75fc65ec8dc7ef0e8a681888266d2d8e9669f.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