From 3dd78e03e577ebda0c39a6a00a78b961d82b3f2f Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 6 Oct 2022 15:32:19 -0600 Subject: [PATCH] man/io_uring_prep_accept.3: add note on multishot and addr/addrlen Link: https://github.com/axboe/liburing/issues/672 Signed-off-by: Jens Axboe --- man/io_uring_prep_accept.3 | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/man/io_uring_prep_accept.3 b/man/io_uring_prep_accept.3 index 3800ccb7..1b0c840e 100644 --- a/man/io_uring_prep_accept.3 +++ b/man/io_uring_prep_accept.3 @@ -102,7 +102,17 @@ look at the CQE and see if .B IORING_CQE_F_MORE is set on completion as an indication of whether or not the accept request -will generate further CQEs. The multishot variants are available since 5.19. +will generate further CQEs. Note that for the multishot variants, setting +.B addr +and +.B addrlen +may not make a lot of sense, as the same value would be used for every +accepted connection. This means that the data written to +.B addr +may be overwritten by a new connection before the application has had time +to process a past connection. If the application knows that a new connection +cannot come in before a previous one has been processed, it may be used as +expected. The multishot variants are available since 5.19. For multishot with direct descriptors, .B IORING_FILE_INDEX_ALLOC