NAME | SYNOPSIS | DESCRIPTION | RETURN VALUE | ERRORS | COLOPHON |
|
|
io_uring_prep_msg_ring(3) liburing Manual io_uring_prep_msg_ring(3)
io_uring_prep_msg_ring - send a message to another ring
#include <liburing.h> void io_uring_prep_msg_ring(struct io_uring_sqe *sqe, int fd, unsigned int len, __u64 data, unsigned int flags); void io_uring_prep_msg_ring_cqe_flags(struct io_uring_sqe *sqe, int fd, unsigned int len, __u64 data, unsigned int flags, unsigned int cqe_flags);
io_uring_prep_msg_ring(3) prepares to send a CQE to an io_uring file descriptor. The submission queue entry sqe is setup to use the file descriptor fd, which must identify a io_uring context, to post a CQE on that ring where the target CQE res field will contain the content of len and the user_data of data with the request modifier flags set by flags. Currently there are no valid flag modifiers, this field must contain 0. The targeted ring may be any ring that the user has access to, even the ring itself. This request can be used for simple message passing to another ring, allowing 32+64 bits of data to be transferred through the len and data fields. The use case may be anything from simply waking up someone waiting on the targeted ring, or it can be used to pass messages between the two rings. io_uring_prep_msg_ring_cqe_flags(3) is similar to io_uring_prep_msg_ring(3). But has an addition cqe_flags parameter, which is used to set flags field on CQE side. That way, you can set the CQE flags field cqe->flags when sending a message. Be aware that io_uring could potentially set additional bits into this field.
None
These are the errors that are reported in the CQE res field. -ENOMEM The kernel was unable to allocate memory for the request. -EINVAL One of the fields set in the SQE was invalid. -EBADFD The descriptor passed in fd does not refer to an io_uring file descriptor, or the ring is in a disabled state. -EOVERFLOW The kernel was unable to fill a CQE on the target ring. This can happen if the target CQ ring is in an overflow state and the kernel wasn't able to allocate memory for a new CQE entry.
This page is part of the liburing (A library for io_uring)
project. Information about the project can be found at
⟨https://github.com/axboe/liburing⟩. If you have a bug report for
this manual page, send it to [email protected]. This page
was obtained from the project's upstream Git repository
⟨https://github.com/axboe/liburing⟩ on 2024-06-14. (At that
time, the date of the most recent commit that was found in the
repository was 2024-06-03.) If you discover any rendering
problems in this HTML version of the page, or you believe there
is a better or more up-to-date source for the page, or you have
corrections or improvements to the information in this COLOPHON
(which is not part of the original manual page), send a mail to
[email protected]
liburing-2.2 March 10, 2022 io_uring_prep_msg_ring(3)
Pages that refer to this page: io_uring_prep_msg_ring(3), io_uring_prep_msg_ring_cqe_flags(3)