wire / wire-format / io-uring-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).
aka: io_uring Completion Queue Entry (CQE)
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).
| field | size | meaning |
|---|---|---|
| user_data | 8 bytes (__u64) | Echoed from the SQE; identifies which operation completed. |
| res | 4 bytes (__s32) | Result: bytes transferred on success, negative errno on failure (-EINVAL, -EAGAIN, ...). |
| flags | 4 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
agent: curl -H 'accept: application/json' wire.phall.io/wire-format/io-uring-cqe
or /wire-format/io-uring-cqe.json