From: Jens Axboe <axboe@kernel.dk>
To: io-uring@vger.kernel.org
Cc: Jens Axboe <axboe@kernel.dk>
Subject: [PATCH 3/6] io_uring/notif: move io_notif_flush() to net.c
Date: Mon, 3 Nov 2025 11:48:00 -0700 [thread overview]
Message-ID: <20251103184937.61634-4-axboe@kernel.dk> (raw)
In-Reply-To: <20251103184937.61634-1-axboe@kernel.dk>
It's specific to the networking side, move it in there.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
io_uring/net.c | 14 +++++++++++---
io_uring/notif.h | 8 --------
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/io_uring/net.c b/io_uring/net.c
index f99b90c762fc..a786d5a01a2e 100644
--- a/io_uring/net.c
+++ b/io_uring/net.c
@@ -1303,6 +1303,14 @@ int io_recvzc(struct io_kiocb *req, unsigned int issue_flags)
return IOU_RETRY;
}
+static void io_send_notif_flush(struct io_kiocb *notif)
+ __must_hold(¬if->ctx->uring_lock)
+{
+ struct io_notif_data *nd = io_notif_to_data(notif);
+
+ io_tx_ubuf_complete(NULL, &nd->uarg, true);
+}
+
void io_send_zc_cleanup(struct io_kiocb *req)
{
struct io_sr_msg *zc = io_kiocb_to_cmd(req, struct io_sr_msg);
@@ -1311,7 +1319,7 @@ void io_send_zc_cleanup(struct io_kiocb *req)
if (req_has_async_data(req))
io_netmsg_iovec_free(io);
if (zc->notif) {
- io_notif_flush(zc->notif);
+ io_send_notif_flush(zc->notif);
zc->notif = NULL;
}
}
@@ -1512,7 +1520,7 @@ int io_send_zc(struct io_kiocb *req, unsigned int issue_flags)
* flushing notif to io_send_zc_cleanup()
*/
if (!(issue_flags & IO_URING_F_UNLOCKED)) {
- io_notif_flush(zc->notif);
+ io_send_notif_flush(zc->notif);
zc->notif = NULL;
io_req_msg_cleanup(req, 0);
}
@@ -1582,7 +1590,7 @@ int io_sendmsg_zc(struct io_kiocb *req, unsigned int issue_flags)
* flushing notif to io_send_zc_cleanup()
*/
if (!(issue_flags & IO_URING_F_UNLOCKED)) {
- io_notif_flush(sr->notif);
+ io_send_notif_flush(sr->notif);
sr->notif = NULL;
io_req_msg_cleanup(req, 0);
}
diff --git a/io_uring/notif.h b/io_uring/notif.h
index f3589cfef4a9..a8e079991997 100644
--- a/io_uring/notif.h
+++ b/io_uring/notif.h
@@ -32,14 +32,6 @@ static inline struct io_notif_data *io_notif_to_data(struct io_kiocb *notif)
return io_kiocb_to_cmd(notif, struct io_notif_data);
}
-static inline void io_notif_flush(struct io_kiocb *notif)
- __must_hold(¬if->ctx->uring_lock)
-{
- struct io_notif_data *nd = io_notif_to_data(notif);
-
- io_tx_ubuf_complete(NULL, &nd->uarg, true);
-}
-
static inline int io_notif_account_mem(struct io_kiocb *notif, unsigned len)
{
struct io_ring_ctx *ctx = notif->ctx;
--
2.51.0
next prev parent reply other threads:[~2025-11-03 18:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-03 18:47 [PATCHSET 0/6] Various minor cleanups Jens Axboe
2025-11-03 18:47 ` [PATCH 1/6] io_uring/slist: remove unused wq list splice helpers Jens Axboe
2025-11-03 18:47 ` [PATCH 2/6] io_uring/rsrc: use get/put_user() for integer copy Jens Axboe
2025-11-03 18:48 ` Jens Axboe [this message]
2025-11-04 13:05 ` [PATCH 3/6] io_uring/notif: move io_notif_flush() to net.c Pavel Begunkov
2025-11-04 16:31 ` Jens Axboe
2025-11-05 13:14 ` Pavel Begunkov
2025-11-03 18:48 ` [PATCH 4/6] io_uring/memmap: remove dead io_create_region_mmap_safe() declaration Jens Axboe
2025-11-03 18:48 ` [PATCH 5/6] io_uring/cancel: move request/task cancelation logic into cancel.c Jens Axboe
2025-11-03 18:48 ` [PATCH 6/6] io_uring/cancel: move __io_uring_cancel() " 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=20251103184937.61634-4-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox