io_uring/net: support bundles for recv io_uring-recvsend-bundle
authorJens Axboe <axboe@kernel.dk>
Tue, 5 Mar 2024 23:22:04 +0000 (16:22 -0700)
committerJens Axboe <axboe@kernel.dk>
Sat, 20 Apr 2024 15:47:51 +0000 (09:47 -0600)
commite9a38a0230d05cfa90202d5e62b566e3cdd0b4a2
treee49693a8d1ef64b4fb5b7f498362f13a4cfc9a84
parentbe6c58d858be3d41e33b98a46bd1ce2e3e7d4e92
io_uring/net: support bundles for recv

If IORING_OP_RECV is used with provided buffers, the caller may also set
IORING_RECVSEND_BUNDLE to turn it into a multi-buffer recv. This grabs
buffers available and receives into them, posting a single completion for
all of it.

This can be used with multishot receive as well, or without it.

Now that both send and receive support bundles, add a feature flag for
it as well. If IORING_FEAT_RECVSEND_BUNDLE is set after registering the
ring, then the kernel supports bundles for recv and send.

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