From: Pavel Begunkov Date: Mon, 31 Mar 2025 16:17:58 +0000 (+0100) Subject: io_uring/net: avoid import_ubuf for regvec send X-Git-Tag: v6.15-rc1~29^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81ed18015d65f111ddbc88599c48338a5e1927d0;p=thirdparty%2Flinux.git io_uring/net: avoid import_ubuf for regvec send 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 Link: https://lore.kernel.org/r/9b2de1a50844f848f62c8de609b494971033a6b9.1743437358.git.asml.silence@gmail.com Signed-off-by: Jens Axboe --- diff --git a/io_uring/net.c b/io_uring/net.c index eaa627eddb4a4..24040bc3916a1 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);