1io_uring_sqe_set_flags(3)       liburing Manual      io_uring_sqe_set_flags(3)
2
3
4

NAME

6       io_uring_sqe_set_flags - set flags for submission queue entry
7

SYNOPSIS

9       #include <liburing.h>
10
11       void io_uring_sqe_set_flags(struct io_uring_sqe *sqe,
12                                   unsigned flags);
13

DESCRIPTION

15       The  io_uring_sqe_set_flags(3) function allows the caller to change the
16       behavior of the submission queue entry by specifying flags. It  enables
17       the flags belonging to the sqe submission queue entry param.
18
19       flags is a bit mask of 0 or more of the following values ORed together:
20
21       IOSQE_FIXED_FILE
22              The  file  descriptor in the SQE refers to the index of a previ‐
23              ously registered file or direct file descriptor,  not  a  normal
24              file descriptor.
25
26       IOSQE_ASYNC
27              Normal operation for io_uring is to try and issue an sqe as non-
28              blocking first, and if that fails, execute it in an  async  man‐
29              ner.  To support more efficient overlapped operation of requests
30              that the application knows/assumes will always (or most  of  the
31              time)  block,  the  application  can ask for an sqe to be issued
32              async from the start. Note that this flag immediately causes the
33              SQE  to  be  offloaded to an async helper thread with no initial
34              non-blocking attempt.  This may be less efficient and should not
35              be  used  liberally or without understanding the performance and
36              efficiency tradeoffs.
37
38       IOSQE_IO_LINK
39              When this flag is specified, the SQE forms a link with the  next
40              SQE  in  the  submission ring. That next SQE will not be started
41              before the previous request completes. This, in effect, forms  a
42              chain  of  SQEs,  which can be arbitrarily long. The tail of the
43              chain is denoted by the first SQE that does not have  this  flag
44              set. Chains are not supported across submission boundaries. Even
45              if the last SQE in a submission has this flag set, it will still
46              terminate the current chain. This flag has no effect on previous
47              SQE submissions, nor does it impact SQEs that are outside of the
48              chain  tail. This means that multiple chains can be executing in
49              parallel, or chains and individual SQEs. Only members inside the
50              chain  are serialized. A chain of SQEs will be broken if any re‐
51              quest in that chain ends in error.
52
53       IOSQE_IO_HARDLINK
54              Like IOSQE_IO_LINK , except the links aren't severed if an error
55              or unexpected result occurs.
56
57       IOSQE_IO_DRAIN
58              When  this flag is specified, the SQE will not be started before
59              previously submitted SQEs have completed, and new SQEs will  not
60              be started before this one completes.
61
62       IOSQE_CQE_SKIP_SUCCESS
63              Request  that  no  CQE be generated for this request, if it com‐
64              pletes successfully.  This can be useful in cases where the  ap‐
65              plication  doesn't  need  to  know  when a specific request com‐
66              pleted, if it completed successfully.
67
68       IOSQE_BUFFER_SELECT
69              If set, and if the request types supports it, select an IO  buf‐
70              fer  from  the indicated buffer group. This can be used with re‐
71              quests that read or receive data from a file  or  socket,  where
72              buffer selection is deferred until the kernel is ready to trans‐
73              fer data, instead of when the IO is  originally  submitted.  The
74              application  must also set the buf_group field in the SQE, indi‐
75              cating which previously registered buffer group to select a buf‐
76              fer from.
77
78

RETURN VALUE

80       None
81

SEE ALSO

83       io_uring_submit(3),  io_uring_register(3)  io_uring_register_buffers(3)
84       io_uring_register_buf_ring(3)
85
86
87
88liburing-2.1                   January 25, 2022      io_uring_sqe_set_flags(3)
Impressum