wire / wire-format / io-uring-cqe

io_uring Completion Queue Entry (CQE)

An io_uring CQE is a 16-byte (or 32-byte with CQE32) structure written by the kernel into the completion queue ring. It carries the user_data from the SQE, the result (bytes transferred or negative errno), and flags (more completions pending, buffer id used).

wire-format kind wire-format status standard verification verified tier B wire-format@1

aka: io_uring Completion Queue Entry (CQE)

wire format

spec: Linux kernel (io_uring)

An io_uring CQE is a 16-byte (or 32-byte with CQE32) structure written by the kernel into the completion queue ring. It carries the user_data from the SQE, the result (bytes transferred or negative errno), and flags (more completions pending, buffer id used).

fieldsizemeaning
user_data8 bytes (__u64)Echoed from the SQE; identifies which operation completed.
res4 bytes (__s32)Result: bytes transferred on success, negative errno on failure (-EINVAL, -EAGAIN, ...).
flags4 bytes (__u32)IORING_CQE_F_BUFFER (buffer id in bits 16-31), IORING_CQE_F_MORE (more completions coming), IORING_CQE_F_SOCK_NONEMPTY.

example:

00 00 00 00 00 00 00 00 05 00 00 00 00 00 00 00

CQE: user_data=0, res=5 (5 bytes read), no flags


provenance

agent: curl -H 'accept: application/json' wire.phall.io/wire-format/io-uring-cqe or /wire-format/io-uring-cqe.json