linux/io_uring
Jens Axboe 6e92c646f5 io_uring/net: don't clear msg_inq before io_recv_buf_select() needs it
For bundle receives to function properly, the previous iteration msg_inq
value is needed to make a judgement call on how much data there is to
receive. A previous fix ended up clearing it earlier as an error case
would potentially errantly set IORING_CQE_F_SOCK_NONEMPTY if the request
got failed.

Move the assignment to post assigning buffers for the receive, but
ensure that it's cleared for the buffer selection error case. With that,
buffer selection has the right msg_inq value and can correctly bundle
receives as designed.

Noticed while testing where it was apparent than more than 1 buffer was
never received. After fix was in place, multiple buffers are correctly
picked for receive. This provides a 10x speedup for the test case, as
the buffer size used was 64b.

Fixes: 18414a4a2e ("io_uring/net: assign kmsg inq/flags before buffer selection")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-07-02 09:42:10 -06:00
..
Makefile
advise.c
advise.h
alloc_cache.h
cancel.c
cancel.h io_uring: fix cancellation overwriting req->flags 2024-06-13 19:25:28 -06:00
epoll.c
epoll.h
fdinfo.c
fdinfo.h
filetable.c
filetable.h
fs.c
fs.h
futex.c
futex.h
io-wq.c io_uring/io-wq: avoid garbage value of 'match' in io_wq_enqueue() 2024-06-04 07:39:00 -06:00
io-wq.h
io_uring.c io_uring: signal SQPOLL task_work with TWA_SIGNAL_NO_IPI 2024-06-24 19:46:15 -06:00
io_uring.h io_uring: check for non-NULL file pointer in io_file_can_poll() 2024-06-01 12:25:35 -06:00
kbuf.c
kbuf.h
memmap.c io_uring: don't attempt to mmap larger than what the user asks for 2024-05-29 09:53:14 -06:00
memmap.h
msg_ring.c
msg_ring.h
napi.c io_uring/napi: fix timeout calculation 2024-06-04 07:32:45 -06:00
napi.h
net.c io_uring/net: don't clear msg_inq before io_recv_buf_select() needs it 2024-07-02 09:42:10 -06:00
net.h
nop.c
nop.h
notif.c
notif.h
opdef.c io_uring/rw: Free iovec before cleaning async data 2024-05-30 08:33:01 -06:00
opdef.h
openclose.c
openclose.h
poll.c
poll.h
refs.h
register.c io_uring: fix possible deadlock in io_register_iowq_max_workers() 2024-06-04 07:39:17 -06:00
register.h
rsrc.c io_uring/rsrc: fix incorrect assignment of iter->nr_segs in io_import_fixed 2024-06-20 06:51:56 -06:00
rsrc.h
rw.c Assorted commits that had missed the last merge window... 2024-05-21 13:11:44 -07:00
rw.h
slist.h
splice.c
splice.h
sqpoll.c io_uring/sqpoll: ensure that normal task_work is also run timely 2024-05-21 13:41:14 -06:00
sqpoll.h
statx.c
statx.h
sync.c
sync.h
tctx.c
tctx.h
timeout.c
timeout.h
truncate.c
truncate.h
uring_cmd.c
uring_cmd.h
waitid.c
waitid.h
xattr.c
xattr.h