io_uring/net: Support multishot receive len cap
authorNorman Maurer <norman_maurer@apple.com>
Tue, 15 Jul 2025 14:02:50 +0000 (16:02 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 16 Jul 2025 14:28:11 +0000 (08:28 -0600)
commit0ebc9a7ecf6acecf8bdf3a3cb02b6073df4a2288
tree868b1faaae1da4206568ae785d3e59c5dd32c162
parent8723c146ad4ca17d340213f3676ce1829668b79b
io_uring/net: Support multishot receive len cap

At the moment its very hard to do fine grained backpressure when using
multishot as the kernel might produce a lot of completions before the
user has a chance to cancel a previous submitted multishot recv.

This change adds support to issue a multishot recv that is capped by a
len, which means the kernel will only rearm until X amount of data is
received. When the limit is reached the completion will signal to the
user that a re-arm needs to happen manually by not setting the IORING_CQE_F_MORE
flag.

Signed-off-by: Norman Maurer <norman_maurer@apple.com>
Link: https://lore.kernel.org/r/20250715140249.31186-1-norman_maurer@apple.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/net.c