From: David Wei <dw@davidwei.uk>
To: io-uring@vger.kernel.org, netdev@vger.kernel.org
Cc: Jens Axboe <axboe@kernel.dk>, Pavel Begunkov <asml.silence@gmail.com>
Subject: [PATCH v4 4/8] io_uring/zcrx: add io_zcrx_ifq arg to io_zcrx_free_area()
Date: Tue, 28 Oct 2025 10:46:35 -0700 [thread overview]
Message-ID: <20251028174639.1244592-5-dw@davidwei.uk> (raw)
In-Reply-To: <20251028174639.1244592-1-dw@davidwei.uk>
Add io_zcrx_ifq arg to io_zcrx_free_area(). A QOL change to reduce line
widths.
Signed-off-by: David Wei <dw@davidwei.uk>
---
io_uring/zcrx.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c
index 30d3a7b3c407..5c90404283ff 100644
--- a/io_uring/zcrx.c
+++ b/io_uring/zcrx.c
@@ -383,9 +383,10 @@ static void io_free_rbuf_ring(struct io_zcrx_ifq *ifq)
ifq->rqes = NULL;
}
-static void io_zcrx_free_area(struct io_zcrx_area *area)
+static void io_zcrx_free_area(struct io_zcrx_ifq *ifq,
+ struct io_zcrx_area *area)
{
- io_zcrx_unmap_area(area->ifq, area);
+ io_zcrx_unmap_area(ifq, area);
io_release_area_mem(&area->mem);
if (area->mem.account_pages)
@@ -464,7 +465,7 @@ static int io_zcrx_create_area(struct io_zcrx_ifq *ifq,
return 0;
err:
if (area)
- io_zcrx_free_area(area);
+ io_zcrx_free_area(ifq, area);
return ret;
}
@@ -523,7 +524,7 @@ static void io_zcrx_ifq_free(struct io_zcrx_ifq *ifq)
io_close_queue(ifq);
if (ifq->area)
- io_zcrx_free_area(ifq->area);
+ io_zcrx_free_area(ifq, ifq->area);
if (ifq->dev)
put_device(ifq->dev);
--
2.47.3
next prev parent reply other threads:[~2025-10-28 17:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-28 17:46 [PATCH v4 0/8] io_uring zcrx ifq sharing David Wei
2025-10-28 17:46 ` [PATCH v4 1/8] io_uring/memmap: remove unneeded io_ring_ctx arg David Wei
2025-10-28 17:46 ` [PATCH v4 2/8] io_uring/memmap: refactor io_free_region() to take user_struct param David Wei
2025-10-28 17:46 ` [PATCH v4 3/8] io_uring/rsrc: refactor io_{un}account_mem() to take {user,mm}_struct param David Wei
2025-10-28 17:46 ` David Wei [this message]
2025-10-28 17:46 ` [PATCH v4 5/8] io_uring/zcrx: add user_struct and mm_struct to io_zcrx_ifq David Wei
2025-10-28 17:46 ` [PATCH v4 6/8] io_uring/zcrx: move io_unregister_zcrx_ifqs() down David Wei
2025-10-28 17:46 ` [PATCH v4 7/8] io_uring/zcrx: add refcount to ifq and remove ifq->ctx David Wei
2025-10-29 15:22 ` Pavel Begunkov
2025-10-29 16:16 ` Pavel Begunkov
2025-10-30 15:24 ` Pavel Begunkov
2025-10-28 17:46 ` [PATCH v4 8/8] io_uring/zcrx: share an ifq between rings David Wei
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=20251028174639.1244592-5-dw@davidwei.uk \
--to=dw@davidwei.uk \
--cc=asml.silence@gmail.com \
--cc=axboe@kernel.dk \
--cc=io-uring@vger.kernel.org \
--cc=netdev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox