diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2025-03-31 17:18:02 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2025-04-21 05:06:58 -0600 |
commit | bd32923e5f02fa7b04d487ec265dc8080d27a257 (patch) | |
tree | 0ade5ba2b5b7499cad28e50fb70be8736f219e68 /io_uring/net.c | |
parent | c0e965052149c883317774711205456d08285741 (diff) |
io_uring: don't store bgid in req->buf_index
Pass buffer group id into the rest of helpers via struct buf_sel_arg
and remove all reassignments of req->buf_index back to bgid. Now, it
only stores buffer indexes, and the group is provided by callers.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/3ea9fa08113ecb4d9224b943e7806e80a324bdf9.1743437358.git.asml.silence@gmail.com
Link: https://lore.kernel.org/io-uring/0c01d76ff12986c2f48614db8610caff8f78c869.1743500909.git.asml.silence@gmail.com/
[axboe: fold in patch from second link]
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/net.c')
-rw-r--r-- | io_uring/net.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/io_uring/net.c b/io_uring/net.c index 6314b1583c8c..5f1a519d1fc6 100644 --- a/io_uring/net.c +++ b/io_uring/net.c @@ -190,7 +190,6 @@ static inline void io_mshot_prep_retry(struct io_kiocb *req, sr->done_io = 0; sr->retry = false; sr->len = 0; /* get from the provided buffer */ - req->buf_index = sr->buf_group; } static int io_net_import_vec(struct io_kiocb *req, struct io_async_msghdr *iomsg, @@ -568,6 +567,7 @@ static int io_send_select_buffer(struct io_kiocb *req, unsigned int issue_flags, .iovs = &kmsg->fast_iov, .max_len = min_not_zero(sr->len, INT_MAX), .nr_iovs = 1, + .buf_group = sr->buf_group, }; if (kmsg->vec.iovec) { @@ -1056,6 +1056,7 @@ static int io_recv_buf_select(struct io_kiocb *req, struct io_async_msghdr *kmsg .iovs = &kmsg->fast_iov, .nr_iovs = 1, .mode = KBUF_MODE_EXPAND, + .buf_group = sr->buf_group, }; if (kmsg->vec.iovec) { |