Skip to content

Commit 08468cc

Browse files
committed
* 'Pr1' of https://github.com/romange/liburing: man/io_uring_prep_recv: expand on how to handle bundles
2 parents 6c509e2 + 73bb0ac commit 08468cc

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

man/io_uring_prep_recv.3

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,18 @@ field indicates the total number of bytes received, and the buffer ID returned
9494
in the CQE
9595
.I flags
9696
field indicates the first buffer in the receive operation. The application must
97-
iterate from the indicated initial buffer ID and until all
97+
process the indicated initial buffer ID and until all
9898
.I res
9999
bytes have been seen to know which is the last buffer in the receive operation.
100-
The buffer IDs consumed will be contiguous from the starting ID, in the order
101-
in which they were added to the buffer ring used. Receiving in bundles can
102-
improve performance when more than one chunk of data is available to receive,
100+
The buffers consumed will be contiguous from the initial buffer, in the order
101+
in which they appear in the buffer ring. The CQE struct does not contain
102+
the position of the buffer in the buffer ring, therefore in order to identify
103+
buffers contained by the bundle, it is advised to maintain the cached head
104+
index per buffer ring. This uint16_t index represents the position of the next
105+
buffer to be consumed within the ring. Upon completion of a receive operation,
106+
the cached head index should be incremented accordingly.
107+
Receiving in bundles can improve performance when more than one chunk of
108+
data is available to receive,
103109
by eliminating redundant round trips through the networking stack. Receive
104110
bundles may be used by both single shot and multishot receive operations. Note
105111
that, internally, bundles rely on the networking stack passing back how much

0 commit comments

Comments
 (0)