diff options
author | Jens Axboe <axboe@kernel.dk> | 2022-09-14 00:24:12 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-09-14 00:24:12 -0600 |
commit | 2a8498e90ba83125d8c305ce8c41bd7cfe5d580b (patch) | |
tree | db566dd59af9c9d9ee54f34de3cf5d0c6586b598 /man | |
parent | 2fadaf2ca667fc62f2275e21c229411d0834ec4b (diff) | |
download | liburing-2a8498e90ba83125d8c305ce8c41bd7cfe5d580b.tar.gz |
Add man page for io_uring_prep_socket_direct_alloc()
This is really just a warpper around io_uring_prep_socket(). But we have
it, so let's ensure it's documented.
Link: https://github.com/axboe/liburing/issues/655
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'man')
-rw-r--r-- | man/io_uring_prep_socket.3 | 29 | ||||
l--------- | man/io_uring_prep_socket_direct_alloc.3 | 1 |
2 files changed, 26 insertions, 4 deletions
diff --git a/man/io_uring_prep_socket.3 b/man/io_uring_prep_socket.3 index 473f2250..8c15a901 100644 --- a/man/io_uring_prep_socket.3 +++ b/man/io_uring_prep_socket.3 @@ -22,6 +22,12 @@ io_uring_prep_socket \- prepare a socket creation request .BI " int " protocol "," .BI " unsigned int " file_index "," .BI " unsigned int " flags ");" +.PP +.BI "void io_uring_prep_socket_direct_alloc(struct io_uring_sqe *" sqe "," +.BI " int " domain "," +.BI " int " type "," +.BI " int " protocol "," +.BI " unsigned int " flags ");" .fi .SH DESCRIPTION .PP @@ -41,16 +47,31 @@ argument are currently unused. The .BR io_uring_prep_socket_direct (3) -works just like +helper works just like .BR io_uring_prep_socket (3), except it maps the socket to a direct descriptor rather than return a normal file descriptor. The .I file_index -argument should be set to the slot that should be used for this socket, or +argument should be set to the slot that should be used for this socket. + +The +.BR io_uring_prep_socket_direct_alloc (3) +helper works just like +.BR io_uring_prep_socket_alloc (3), +except it allocates a new direct descriptor rather than pass a free slot in. It +is equivalent to using +.BR io_uring_prep_socket_direct (3) +with .B IORING_FILE_INDEX_ALLOC -if io_uring should allocate a free one. +as the +.I +file_index . +Upon completion, the +.I res +field of the CQE will return the direct slot that was allocated for the +socket. -If the direct variant is used, the application must first have registered +If the direct variants are used, the application must first have registered a file table using .BR io_uring_register_files (3) of the appropriate size. Once registered, a direct socket request may use any diff --git a/man/io_uring_prep_socket_direct_alloc.3 b/man/io_uring_prep_socket_direct_alloc.3 new file mode 120000 index 00000000..15d7b7f0 --- /dev/null +++ b/man/io_uring_prep_socket_direct_alloc.3 @@ -0,0 +1 @@ +io_uring_prep_socket.3
\ No newline at end of file |