1io_uring_prep_msg_ring(3) liburing Manual io_uring_prep_msg_ring(3)
2
3
4
6 io_uring_prep_msg_ring - send a message to another ring
7
9 #include <liburing.h>
10
11 void io_uring_prep_msg_ring(struct io_uring_sqe *sqe,
12 int fd,
13 unsigned int len,
14 __u64 data,
15 unsigned int flags);
16
18 io_uring_prep_msg_ring(3) prepares a to send a CQE to an io_uring file
19 descriptor. The submission queue entry sqe is setup to use the file de‐
20 scriptor fd, which must identify a io_uring context, to post a CQE on
21 that ring where the target CQE res field will contain the content of
22 len and the user_data of data with the request modifier flags set by
23 flags. Currently there are no valid flag modifiers, this field must
24 contain 0.
25
26 The targeted ring may be any ring that the user has access to, even the
27 ring itself. This request can be used for simple message passing to an‐
28 other ring, allowing 32+64 bits of data to be transferred through the
29 len and data fields. The use case may be anything from simply waking up
30 someone waiting on the targeted ring, or it can be used to pass mes‐
31 sages between the two rings.
32
33
35 None
36
37
39 These are the errors that are reported in the CQE res field.
40
41 -ENOMEM
42 The kernel was unable to allocate memory for the request.
43
44 -EINVAL
45 One of the fields set in the SQE was invalid.
46
47 -EBADFD
48 The descriptor passed in fd does not refer to an io_uring file
49 descriptor.
50
51 -EOVERFLOW
52 The kernel was unable to fill a CQE on the target ring. This can
53 happen if the target CQ ring is in an overflow state and the
54 kernel wasn't able to allocate memory for a new CQE entry.
55
56
57
58liburing-2.2 March 10, 2022 io_uring_prep_msg_ring(3)