Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

man/io_uring_prep_recv: expand on how to handle bundles #1328

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions man/io_uring_prep_recv.3
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,11 @@ field indicates the first buffer in the receive operation. The application must
iterate from 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
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 bufring, therefore in order to identify buffers contained by the bundle,
it is advised to maintain the cached head index per bufring. This uint16_t index represents the position of the next buffer to be consumed within the ring. Upon completion of a receive operation on a buffer ring, the cached head index should be incremented accordingly.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please break lines at 80 chars. And use "buffer ring" rather than "bufring", generally that's the term used in man pages.

Outside of that, looks fine to me.

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
Expand Down