From: "Clément Léger" <cleger@meta.com>
To: <io-uring@vger.kernel.org>
Cc: "Clément Léger" <cleger@meta.com>,
"Juanlu Herrero" <jlhe0197@meta.com>,
"Jens Axboe" <axboe@kernel.dk>
Subject: [PATCH liburing 2/2] man/io_uring_prep_recvmsg.3: document recvmsg bundles
Date: Mon, 23 Nov 2026 13:48:59 -0800 [thread overview]
Message-ID: <20261123214924.921732-3-cleger@meta.com> (raw)
In-Reply-To: <20261123214924.921732-1-cleger@meta.com>
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 <cleger@meta.com>
---
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
prev parent reply other threads:[~2026-11-23 21:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 21:48 [PATCH liburing 0/2] Add recvmsg bundle test and man documentation Clément Léger
2026-11-23 21:48 ` [PATCH liburing 1/2] test: add recvmsg bundle test Clément Léger
2026-11-23 21:53 ` Clément Léger
2026-11-23 21:48 ` Clément Léger [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261123214924.921732-3-cleger@meta.com \
--to=cleger@meta.com \
--cc=axboe@kernel.dk \
--cc=io-uring@vger.kernel.org \
--cc=jlhe0197@meta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox