1io_uring_prep_msg_ring(3) liburing Manual io_uring_prep_msg_ring(3)
2
3
4
6 io_uring_prep_msg_ring_fd - send a direct descriptor to another ring
7
9 #include <liburing.h>
10
11 void io_uring_prep_msg_ring_fd(struct io_uring_sqe *sqe,
12 int fd,
13 int source_fd,
14 int target_fd,
15 __u64 data,
16 unsigned int flags);
17
18 void io_uring_prep_msg_ring_fd_alloc(struct io_uring_sqe *sqe,
19 int fd,
20 int source_fd,
21 __u64 data,
22 unsigned int flags);
23
25 io_uring_prep_msg_ring_fd(3) prepares an SQE to send a direct file de‐
26 scriptor to another ring. The submission queue entry sqe is setup to
27 use the file descriptor fd, which must identify a target io_uring con‐
28 text, to send the locally registered file descriptor with value
29 source_fd to the destination ring into index target_fd and passing data
30 as the user data in the target CQE with the request modifier flags set
31 by flags. Currently there are no valid flag modifiers, this field must
32 contain 0.
33
34 io_uring_prep_msg_ring_fd_alloc(3) is similar to io_ur‐
35 ing_prep_msg_ring_fd(3), but doesn't specify a target index for the di‐
36 rect descriptor. Instead, this index is allocated in the target ring
37 and returned in the CQE res field.
38
39
41 None
42
43
45 These are the errors that are reported in the CQE res field.
46
47 -ENOMEM
48 The kernel was unable to allocate memory for the request.
49
50 -EINVAL
51 One of the fields set in the SQE was invalid.
52
53 -EINVAL
54 Target ring is identical to the source ring.
55
56 -EBADFD
57 The descriptor passed in fd does not refer to an io_uring file
58 descriptor, or the ring is in a disabled state.
59
60 -EOVERFLOW
61 The kernel was unable to fill a CQE on the target ring. This can
62 happen if the target CQ ring is in an overflow state and the
63 kernel wasn't able to allocate memory for a new CQE entry.
64
65 -ENFILE
66 The direct descriptor table in the target ring was full, no new
67 descriptors could be successfully allocated.
68
69
70
71liburing-2.4 Mar 16, 2023 io_uring_prep_msg_ring(3)