Skip to content

Commit

Permalink
man/io_uring_register.2: improve IORING_REGISTER_BUFFERS2 description
Browse files Browse the repository at this point in the history
The section on IORING_REGISTER_BUFFERS_UPDATE mentions sparse entries,
so described how they can be registered.

Also improved formatting.

Signed-off-by: Wojciech Łukowicz <[email protected]>
  • Loading branch information
wlukowicz committed Dec 1, 2024
1 parent dbe9fbf commit 416d96c
Showing 1 changed file with 23 additions and 8 deletions.
31 changes: 23 additions & 8 deletions man/io_uring_register.2
Original file line number Diff line number Diff line change
Expand Up @@ -113,27 +113,25 @@ but aims to have a more extensible ABI.

.I arg
points to a
.IR struct io_uring_rsrc_register ,
.I struct
.IR io_uring_rsrc_register ,
and
.I nr_args
should be set to the number of bytes in the structure.

.PP
.in +8n
.IP
.in +4n
.EX
struct io_uring_rsrc_register {
__u32 nr;
__u32 resv;
__u32 flags;
__u64 resv2;
__aligned_u64 data;
__aligned_u64 tags;
};
.EE
.in
.PP

.in +8n
.IP

The
.I data
Expand All @@ -154,6 +152,23 @@ posted with
.I user_data
set to the specified tag and all other fields zeroed.

The
.I flags
field supports the following flags:

.IP
.in +4n
.B IORING_RSRC_REGISTER_SPARSE
If set, io_uring will register
.I nr
empty buffers, which need to be updated before use. When this flag is set,
.I data
and
.I tags
must be NULL. Available since 5.19.
.in
.IP

Note that resource updates, e.g.
.BR IORING_REGISTER_BUFFERS_UPDATE ,
don't necessarily deallocate resources by the time it returns, but they might
Expand Down

0 comments on commit 416d96c

Please sign in to comment.