io-uring-cqe · shipping · also io_uring CQE

io_uring completion queue entry

An io_uring completion queue entry is a result record containing an operation result, flags and application-provided identification data.

Related Observatory article: Read on hesela.com

For ordinary one-shot writes, inspect res for the transferred byte count or a negative error number; a delivered entry alone does not mean success. A submission function's return value is a different result. [1] [2]

In the Linux v6.16 ABI an entry is 16 bytes, a 64-bit user_data copied from the submission, a signed 32-bit res and 32-bit flags. Rings created with IORING_SETUP_CQE32 use 32-byte entries, available since Linux 5.19 and required for passthrough commands. When IORING_CQE_F_BUFFER is set, the upper 16 bits of flags carry the selected buffer ID, and IORING_CQE_F_MORE means the request will post further entries. [5] [6]

With IORING_FEAT_NODROP, available since Linux 5.5, completions that find the ring full are held by the kernel until space frees up. An entry is lost only when the kernel cannot allocate memory to hold it, which shows as a higher overflow counter. [6]

IORING_FEAT_CQE_SKIP reports support for IOSQE_CQE_SKIP_SUCCESS, documented since Linux 5.17. It is a setup capability, not the request flag itself. [8]

With that SQE flag, opcode-specific success suppresses reporting; the criterion matches normal link continuation, not merely res >= 0. A short read can remain reportable. Do not combine it with IO_DRAIN anywhere in the ring. [7] Application inference: an empty completion queue alone establishes neither completion nor safe buffer reuse.

Relations

related
io_uring, io_uring linked requests, Completion latency (fio), fsync, Short read, io_uring registered buffers, io_uring provided buffers, io_uring zero-copy send

Advantages

  • Lets an application associate completion information with the submitted operation. [1]

Limitations

  • A successful ordinary buffered write is not itself a power-loss durability guarantee. [3]
  • Applications must reap entries promptly, because older kernels can reject new submissions with EBUSY while completions overflow. [6]
  • For SEND_ZC, F_NOTIF identifies a buffer-release notification; with REPORT_USAGE its res is a bitfield, so bit 31 must not be decoded as an ordinary negative errno. [7, 5]

Citations

  1. liburing: io_uring(7), result reporting and shared rings. (accessed 2026-10-14)
  2. liburing: io_uring_submit(3), submission return value. (accessed 2026-10-14)
  3. Linux man-pages: fsync(2), error and directory persistence boundaries. (accessed 2026-10-14)
  4. Linux v6.16 include/uapi/linux/io_uring.h: struct io_uring_cqe and CQE flags (accessed 2026-10-22)
  5. Linux man-pages, io_uring_setup(2): CQE size and overflow behaviour (accessed 2026-10-22)
  6. liburing 2.11: io_uring_enter(2), IOSQE_CQE_SKIP_SUCCESS and link/timeout exceptions (accessed 2026-11-12)
  7. liburing 2.11: io_uring_setup(2), IORING_FEAT_CQE_SKIP capability (accessed 2026-11-12)

Further reading

  1. io_uring: completion is not a durable commit (accessed 2026-10-14)
Sources & caveats
  • overview is the io_uring(7) page and submit the io_uring_submit(3) page, both kept from the earlier version.
  • uapi-header is include/uapi/linux/io_uring.h at tag v6.16, read on the access date in struct io_uring_cqe and the IORING_CQE_F_* definitions.
  • setup is the Linux man-pages io_uring_setup(2) page, read in IORING_SETUP_CQE32 and IORING_FEAT_NODROP.
  • 16 bytes, 64-bit, 32-bit and 16 bits come from uapi-header. 32 bytes, 5.19 and 5.5 come from setup.

JSON: /data/terms/io-uring-cqe.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. io_uring completion queue entry. Hesela. 2026-11-29. https://hesela.dev/terms/io-uring-cqe/