Skip to content

Commit 81ed180

Browse files
isilenceaxboe
authored andcommitted
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 <asml.silence@gmail.com> Link: https://lore.kernel.org/r/9b2de1a50844f848f62c8de609b494971033a6b9.1743437358.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent a1fbe0a commit 81ed180

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

io_uring/net.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,8 @@ static int io_send_setup(struct io_kiocb *req, const struct io_uring_sqe *sqe)
359359
kmsg->msg.msg_name = &kmsg->addr;
360360
kmsg->msg.msg_namelen = addr_len;
361361
}
362+
if (sr->flags & IORING_RECVSEND_FIXED_BUF)
363+
return 0;
362364
if (!io_do_buffer_select(req)) {
363365
ret = import_ubuf(ITER_SOURCE, sr->buf, sr->len,
364366
&kmsg->msg.msg_iter);

0 commit comments

Comments
 (0)