io-uring-provided-buffers · shipping · also io_uring buffer selection, io_uring provided-buffer ring

io_uring provided buffers

io_uring provided buffers are application-supplied buffers grouped for kernel selection by supported I/O requests.

Related Observatory article: io_uring provided buffers on hesela.com

Selection: IOSQE_BUFFER_SELECT and buf_group choose a supplied group. Supported read or receive requests select a destination; supported sends can instead select outgoing data. If IORING_CQE_F_BUFFER is set, the upper 16 CQE flag bits give the application buffer ID, not a fixed-buffer index. [1] [10] [11]

Ring publication: io_uring_buf_ring_add writes a descriptor; io_uring_buf_ring_advance publishes previously added descriptors for kernel consumption. The insertion offset is relative to the ring tail, not the application buffer ID. Keep the ID-to-address mapping correct for each provisioning cycle. [2] [3]

Replenishment: io_uring_cqe_seen releases a completion slot, not a payload buffer back to its pool. For ordinary non-incremental buffers, finish processing a returned payload before adding and publishing that buffer again. The combined io_uring_buf_ring_cq_advance helper publishes previously added buffers while advancing the CQ; it does not populate their descriptors. [4] [5]

Continuation: in the Linux v6.16 ABI, IORING_CQE_F_MORE concerns additional completions from the request. IORING_CQE_F_BUF_MORE instead means an incrementally consumed buffer remains in use by the kernel. Do not recycle that entire buffer merely because one completion arrived; ordinary non-incremental buffer return is a different case. [6]

Relations

related
io_uring, io_uring registered buffers, io_uring completion queue entry

Advantages

  • Lets supported operations select from a supplied group instead of requiring a separate preselected payload buffer for each request. [1]

Limitations

  • Publishing a buffer transfers it to the ring; do not republish memory while the application or kernel still needs its contents. [3, 6]
  • For multishot receive, check IORING_CQE_F_MORE on every completion, including nonnegative results; replenishing buffers does not restart a terminated request. [8]
  • Multishot read requires a pollable file type; ordinary regular files fail with -EBADFD in the reviewed API. [9]
  • IORING_FEAT_RECVSEND_BUNDLE in the features returned at ring setup reports the reviewed send-buffer capability; it is not an SQE flag. Supported requests still use IOSQE_BUFFER_SELECT with buf_group. [12, 13]

Citations

  1. liburing 2.8: buffer groups and selected IDs (accessed 2026-11-08)
  2. liburing 2.8: ring offsets and application buffer IDs (accessed 2026-11-08)
  3. liburing 2.8: publishing buffers and ownership (accessed 2026-11-08)
  4. liburing 2.8: completion-slot consumption (accessed 2026-11-08)
  5. liburing 2.8: combined CQ and buffer publication (accessed 2026-11-08)
  6. Linux v6.16: CQE buffer-selection and continuation flags (accessed 2026-11-08)
  7. liburing 2.8: receive termination and resubmission (accessed 2026-11-08)
  8. liburing 2.8: pollable-file requirement for multishot read (accessed 2026-11-08)
  9. liburing 2.8: provided buffers for supported send operations (accessed 2026-11-08)
  10. Linux v6.16: SEND opcode supports buffer selection (accessed 2026-11-08)
  11. liburing 2.8: reported send-buffer capability at ring setup (accessed 2026-11-08)
  12. Linux v6.10: separate setup feature bits and SQE selection flags (accessed 2026-11-08)

Further reading

  1. Hesela: fixed buffers and provided-buffer ownership (accessed 2026-11-08)
Sources & caveats
  • Primary documentation and pinned Linux v6.16 ABI review; no native kernel execution, performance benchmark or durability experiment.

JSON: /data/terms/io-uring-provided-buffers.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. io_uring provided buffers. Hesela. 2026-11-08. https://hesela.dev/terms/io-uring-provided-buffers/