From: Jens Axboe <axboe@kernel.dk>
To: io-uring@vger.kernel.org
Cc: Jens Axboe <axboe@kernel.dk>
Subject: [PATCH 02/12] io_uring/net: don't use io_net_kbuf_recyle() for non-provided cases
Date: Wed, 20 Aug 2025 20:03:31 -0600 [thread overview]
Message-ID: <20250821020750.598432-4-axboe@kernel.dk> (raw)
In-Reply-To: <20250821020750.598432-2-axboe@kernel.dk>
A previous commit used io_net_kbuf_recyle() for any network helper that
did IO and needed partial retry. However, that's only needed if the
opcode does buffer selection, which isnt support for sendzc, sendmsg_zc,
or sendmsg. Just remove them - they don't do any harm, but it is a bit
confusing when reading the code.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
io_uring/net.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/io_uring/net.c b/io_uring/net.c
index 3da253b80332..a8a6586bc416 100644
--- a/io_uring/net.c
+++ b/io_uring/net.c
@@ -570,7 +570,7 @@ int io_sendmsg(struct io_kiocb *req, unsigned int issue_flags)
kmsg->msg.msg_controllen = 0;
kmsg->msg.msg_control = NULL;
sr->done_io += ret;
- return io_net_kbuf_recyle(req, kmsg, ret);
+ return -EAGAIN;
}
if (ret == -ERESTARTSYS)
ret = -EINTR;
@@ -1503,7 +1503,7 @@ int io_send_zc(struct io_kiocb *req, unsigned int issue_flags)
zc->len -= ret;
zc->buf += ret;
zc->done_io += ret;
- return io_net_kbuf_recyle(req, kmsg, ret);
+ return -EAGAIN;
}
if (ret == -ERESTARTSYS)
ret = -EINTR;
@@ -1573,7 +1573,7 @@ int io_sendmsg_zc(struct io_kiocb *req, unsigned int issue_flags)
if (ret > 0 && io_net_retry(sock, flags)) {
sr->done_io += ret;
- return io_net_kbuf_recyle(req, kmsg, ret);
+ return -EAGAIN;
}
if (ret == -ERESTARTSYS)
ret = -EINTR;
--
2.50.1
next prev parent reply other threads:[~2025-08-21 2:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-21 2:03 [PATCHSET v2 0/12] Move io_buffer_list out of struct io_kiocb Jens Axboe
2025-08-21 2:03 ` [PATCH 01/12] io_uring/kbuf: drop 'issue_flags' from io_put_kbuf(s)() arguments Jens Axboe
2025-08-21 2:03 ` Jens Axboe [this message]
2025-08-21 2:03 ` [PATCH 03/12] io_uring/net: clarify io_recv_buf_select() return value Jens Axboe
2025-08-21 2:03 ` [PATCH 04/12] io_uring/kbuf: pass in struct io_buffer_list to commit/recycle helpers Jens Axboe
2025-08-21 2:03 ` [PATCH 05/12] io_uring/kbuf: introduce struct io_br_sel Jens Axboe
2025-08-21 2:03 ` [PATCH 06/12] io_uring/rw: recycle buffers manually for non-mshot reads Jens Axboe
2025-08-21 2:03 ` [PATCH 07/12] io_uring/kbuf: use struct io_br_sel for multiple buffers picking Jens Axboe
2025-08-21 2:03 ` [PATCH 08/12] io_uring/net: use struct io_br_sel->val as the recv finish value Jens Axboe
2025-08-21 2:03 ` [PATCH 09/12] io_uring/net: use struct io_br_sel->val as the send " Jens Axboe
2025-08-21 2:03 ` [PATCH 10/12] io_uring/kbuf: switch to storing struct io_buffer_list locally Jens Axboe
2025-08-21 2:03 ` [PATCH 11/12] io_uring: remove async/poll related provided buffer recycles Jens Axboe
2025-08-21 2:03 ` [PATCH 12/12] io_uring/kbuf: check for ring provided buffers first in recycling 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=20250821020750.598432-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