io_uring_submit - Man Page
submit requests to the submission queue
Synopsis
#include <liburing.h> int io_uring_submit(struct io_uring *ring);
Description
The io_uring_submit(3) function submits the next events to the submission queue belonging to the ring.
After the caller retrieves a submission queue entry (SQE) with io_uring_get_sqe(3) and prepares the SQE using one of the provided helpers, it can be submitted with io_uring_submit(3).
Return Value
On success io_uring_submit(3) returns the number of submitted submission queue entries, if SQPOLL is not used. If SQPOLL is used, the return value may report a higher number of submitted entries than actually submitted. If the user requires accurate information about how many submission queue entries have been successfully submitted, while using SQPOLL, the user must fall back to repeatedly submitting a single submission queue entry. On failure it returns -errno.
Notes
For any request that passes in data in a struct, that data must remain valid until the request has been successfully submitted. It need not remain valid until completion. Once a request has been submitted, the in-kernel state is stable. Very early kernels (5.4 and earlier) required state to be stable until the completion occurred. Applications can test for this behavior by inspecting the IORING_FEAT_SUBMIT_STABLE flag passed back from io_uring_queue_init_params(3). In general, the man pages for the individual prep helpers will have a note mentioning this fact as well, if required for the given command.
See Also
io_uring_get_sqe(3), io_uring_submit_and_wait(3), io_uring_submit_and_wait_timeout(3)
Referenced By
io_uring_cq_advance(3), io_uring_cqe_seen(3), io_uring_cq_ready(3), io_uring_get_sqe(3), io_uring_peek_cqe(3), io_uring_prep_accept(3), io_uring_prep_bind(3), io_uring_prep_cancel(3), io_uring_prep_close(3), io_uring_prep_cmd(3), io_uring_prep_cmd_discard(3), io_uring_prep_connect(3), io_uring_prep_fadvise(3), io_uring_prep_fallocate(3), io_uring_prep_files_update(3), io_uring_prep_fixed_fd_install(3), io_uring_prep_fsync(3), io_uring_prep_ftruncate(3), io_uring_prep_futex_wait(3), io_uring_prep_futex_waitv(3), io_uring_prep_futex_wake(3), io_uring_prep_linkat(3), io_uring_prep_listen(3), io_uring_prep_madvise(3), io_uring_prep_mkdirat(3), io_uring_prep_nop(3), io_uring_prep_openat(3), io_uring_prep_openat2(3), io_uring_prep_poll_add(3), io_uring_prep_poll_remove(3), io_uring_prep_poll_update(3), io_uring_prep_provide_buffers(3), io_uring_prep_read(3), io_uring_prep_read_multishot(3), io_uring_prep_readv(3), io_uring_prep_readv2(3), io_uring_prep_recv(3), io_uring_prep_recvmsg(3), io_uring_prep_remove_buffers(3), io_uring_prep_renameat(3), io_uring_prep_send(3), io_uring_prep_sendmsg(3), io_uring_prep_send_zc(3), io_uring_prep_shutdown(3), io_uring_prep_socket(3), io_uring_prep_splice(3), io_uring_prep_statx(3), io_uring_prep_symlinkat(3), io_uring_prep_sync_file_range(3), io_uring_prep_tee(3), io_uring_prep_timeout(3), io_uring_prep_timeout_update(3), io_uring_prep_unlinkat(3), io_uring_prep_waitid(3), io_uring_prep_write(3), io_uring_prep_writev(3), io_uring_prep_writev2(3), io_uring_setup(2), io_uring_sqe_set_flags(3), io_uring_sqring_wait(3), io_uring_submit_and_get_events(3), io_uring_submit_and_wait(3), io_uring_submit_and_wait_min_timeout(3), io_uring_submit_and_wait_timeout(3), io_uring_wait_cqe(3), io_uring_wait_cqe_nr(3), io_uring_wait_cqes(3), io_uring_wait_cqe_timeout(3).