From: Pavel Begunkov <asml.silence@gmail.com>
To: io-uring@vger.kernel.org
Cc: asml.silence@gmail.com
Subject: [PATCH 1/5] io_uring/net: avoid import_ubuf for regvec send
Date: Mon, 31 Mar 2025 17:17:58 +0100 [thread overview]
Message-ID: <9b2de1a50844f848f62c8de609b494971033a6b9.1743437358.git.asml.silence@gmail.com> (raw)
In-Reply-To: <cover.1743437358.git.asml.silence@gmail.com>
With registered buffers we set up iterators in helpers like
io_import_fixed(), and there is no need for a import_ubuf() before that.
It was fine as we used real pointers for offset calculation, but that's
not the case anymore since introduction of ublk kernel buffers.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
---
io_uring/net.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/io_uring/net.c b/io_uring/net.c
index f8dfa6166e3c..3b50151577be 100644
--- a/io_uring/net.c
+++ b/io_uring/net.c
@@ -359,6 +359,8 @@ static int io_send_setup(struct io_kiocb *req, const struct io_uring_sqe *sqe)
kmsg->msg.msg_name = &kmsg->addr;
kmsg->msg.msg_namelen = addr_len;
}
+ if (sr->flags & IORING_RECVSEND_FIXED_BUF)
+ return 0;
if (!io_do_buffer_select(req)) {
ret = import_ubuf(ITER_SOURCE, sr->buf, sr->len,
&kmsg->msg.msg_iter);
--
2.48.1
next prev parent reply other threads:[~2025-03-31 16:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-31 16:17 [PATCH 0/5] various net improvements Pavel Begunkov
2025-03-31 16:17 ` Pavel Begunkov [this message]
2025-03-31 16:17 ` [PATCH 2/5] io_uring/net: don't use io_do_buffer_select at prep Pavel Begunkov
2025-03-31 16:18 ` [PATCH 3/5] io_uring: set IMPORT_BUFFER in generic send setup Pavel Begunkov
2025-03-31 16:18 ` [PATCH 4/5] io_uring/kbuf: pass bgid to io_buffer_select() Pavel Begunkov
2025-03-31 16:18 ` [PATCH 5/5] io_uring: don't store bgid in req->buf_index Pavel Begunkov
2025-03-31 19:06 ` [PATCH 0/5] various net improvements Jens Axboe
2025-03-31 19:07 ` 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=9b2de1a50844f848f62c8de609b494971033a6b9.1743437358.git.asml.silence@gmail.com \
--to=asml.silence@gmail.com \
--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