IORING_RECVSEND_BUNDLE can now be used with recvmsg. Document the flag, how the multishot envelope is placed in the first buffer of the bundle and must fit in it, how single shot requests return the name and control data through the msghdr instead, and how the buffer selection is sized. Signed-off-by: Clément Léger --- man/io_uring_prep_recvmsg.3 | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/man/io_uring_prep_recvmsg.3 b/man/io_uring_prep_recvmsg.3 index 74a0c9ef..4f93d01b 100644 --- a/man/io_uring_prep_recvmsg.3 +++ b/man/io_uring_prep_recvmsg.3 @@ -89,6 +89,33 @@ or .BR recvmsg (2) operation. If set, the socket still had data to be read after the operation completed. Both these flags are available since 5.19. + +.TP +.B IORING_RECVSEND_BUNDLE +Receive into multiple buffers, as described in +.BR io_uring_prep_recv (3). +Kernels without bundle support for recvmsg fail the request with +.BR -EINVAL . +With the multishot variant, a single +.I struct io_uring_recvmsg_out +header is placed at the start of the first buffer of the bundle, and the +payload follows it, spilling over into the next buffers. The CQE +.I res +field includes the header, which must fit in the first buffer, otherwise the +request fails with +.BR -EFAULT . +With the single shot variant, there is no such header: the name and control +data are returned through the +.I struct msghdr +as for +.BR recvmsg (2), +and the payload starts at the beginning of the first buffer. +If the +.I struct msghdr +carries an iovec, its length caps the buffers selected for each completion, +including the multishot header. Otherwise, the selection is made as for +receive bundles without a length, and datagrams that don't fit in it are +truncated. .P .SH RETURN VALUE -- 2.53.1-Meta