Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* 'Pr1' of https://github.com/romange/liburing:
  man/io_uring_prep_recv: expand on how to handle bundles
  • Loading branch information
axboe committed Feb 3, 2025
2 parents 6c509e2 + 73bb0ac commit 08468cc
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions man/io_uring_prep_recv.3
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,18 @@ field indicates the total number of bytes received, and the buffer ID returned
in the CQE
.I flags
field indicates the first buffer in the receive operation. The application must
iterate from the indicated initial buffer ID and until all
process the indicated initial buffer ID and until all
.I res
bytes have been seen to know which is the last buffer in the receive operation.
The buffer IDs consumed will be contiguous from the starting ID, in the order
in which they were added to the buffer ring used. Receiving in bundles can
improve performance when more than one chunk of data is available to receive,
The buffers consumed will be contiguous from the initial buffer, in the order
in which they appear in the buffer ring. The CQE struct does not contain
the position of the buffer in the buffer ring, therefore in order to identify
buffers contained by the bundle, it is advised to maintain the cached head
index per buffer ring. This uint16_t index represents the position of the next
buffer to be consumed within the ring. Upon completion of a receive operation,
the cached head index should be incremented accordingly.
Receiving in bundles can improve performance when more than one chunk of
data is available to receive,
by eliminating redundant round trips through the networking stack. Receive
bundles may be used by both single shot and multishot receive operations. Note
that, internally, bundles rely on the networking stack passing back how much
Expand Down

0 comments on commit 08468cc

Please sign in to comment.