io_uring/net: support multishot for send
authorJens Axboe <axboe@kernel.dk>
Tue, 20 Feb 2024 04:42:08 +0000 (21:42 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 1 Mar 2024 13:29:39 +0000 (06:29 -0700)
commitbb45afd9ea60b49df7bc398b1a856f904741f96c
tree5442444199b0be3c30bd53d40889e0943d2b50a1
parent8dfcd10075b549ffc854ad1c7c2a89fc0e8c7820
io_uring/net: support multishot for send

This works very much like the receive side, except for sends. The idea
is that an application can fill outgoing buffers in a provided buffer
group, and then arm a single send that will service them all. For now
this variant just terminates when we are out of buffers to send, and
hence the application needs to re-arm it if IORING_CQE_F_MORE isn't
set, as per usual for multishot requests.

This only enables it for IORING_OP_SEND, IORING_OP_SENDMSG is coming
in a separate patch. However, this patch does do a lot of the prep
work that makes wiring up the sendmsg variant pretty trivial. They
share the prep side.

Enabling multishot for sends is, again, identical to the receive side.
The app sets IORING_SEND_MULTISHOT in sqe->ioprio. This flag is also
the same as IORING_RECV_MULTISHOT.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/uapi/linux/io_uring.h
io_uring/net.c