io_uring_register_sync_msg(3) — Linux manual page

NAME | SYNOPSIS | DESCRIPTION | RETURN VALUE | SEE ALSO | COLOPHON

io_uring_re...er_sync_msg(3) liburing Manual io_uring_re...er_sync_msg(3)

NAME         top

       io_uring_register_sync_msg - send a synchronous message to another
       ring

SYNOPSIS         top

       #include <liburing.h>

       int io_uring_register_sync_msg(struct io_uring_sqe *sqe);

DESCRIPTION         top

       io_uring_register_sync_msg(3) issues a synchronous MSG_RING
       request. The sqe parameter must have been cleared and initialized
       with io_uring_prep_msg_ring(3).

       Normally message requests are sent from one ring to another ring.
       But there are also cases where a source ring is not available, yet
       it would be convenient to send a message to a destination ring.
       io_uring_register_sync_msg(3) exists for that purpose. A source
       ring is not required to send a message to another ring, instead
       the sqe parameter can be placed on the stack and filled in using
       the normal message helpers, and then io_uring_register_sync_msg(3)
       can be called. Since a source ring does not exist, the results of
       the operation is returned directly rather than via a CQE. On the
       destination/receiving end, a CQE is posted, as it would have been
       with a non-sync request.

       Only data request are supported, sending files such as setup by
       io_uring_prep_msg_ring_fd(3) is not supported. The given SQE
       should be initialized by io_uring_prep_msg_ring(3) or
       io_uring_prep_msg_ring_cqe_flags(3), or any other helper that sets
       up a non-fd message request.

       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.

       Available since kernel 6.13.

RETURN VALUE         top

       Returns 0 on success, or -errno on error.

SEE ALSO         top

       io_uring_prep_msg_ring_cqe_flags(3), io_uring_prep_msg_ring(3)

COLOPHON         top

       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 io-uring@vger.kernel.org.  This page
       was obtained from the project's upstream Git repository
       ⟨https://github.com/axboe/liburing⟩ on 2025-08-11.  (At that time,
       the date of the most recent commit that was found in the
       repository was 2025-08-02.)  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
       man-pages@man7.org

liburing-2.11                 July 10, 2025  io_uring_re...er_sync_msg(3)

Pages that refer to this page: io_uring_register_sync_msg(3)