Skip to content

[GIT PULL] src/register: add query/zcrx_ctrl helpers and document them#1559

Open
wokron wants to merge 4 commits intoaxboe:masterfrom
wokron:register-zcrx-ctrl-and-query
Open

[GIT PULL] src/register: add query/zcrx_ctrl helpers and document them#1559
wokron wants to merge 4 commits intoaxboe:masterfrom
wokron:register-zcrx-ctrl-and-query

Conversation

@wokron
Copy link
Copy Markdown
Contributor

@wokron wokron commented Mar 26, 2026

IORING_REGISTER_ZCRX_CTRL and IORING_REGISTER_QUERY have been synced to liburing but lacked wrapper functions. This series adds:

  • io_uring_register_zcrx_ctrl() to wrap IORING_REGISTER_ZCRX_CTRL
  • io_uring_register_query() and io_uring_register_query_task() to wrap IORING_REGISTER_QUERY, and
  • Man pages for both APIs

git request-pull output:

The following changes since commit 18c41594671ea5f5bde0f1b853a8e5fcf09e7efc:

  Merge branch 'buf-upgrade' (2026-03-26 06:26:19 -0600)

are available in the Git repository at:

  https://github.com/wokron/liburing register-zcrx-ctrl-and-query

for you to fetch changes up to afb0923962a0be01e117db875e16be02fa419b91:

  man: add io_uring_register_query.3 man page (2026-03-26 21:25:41 +0800)

----------------------------------------------------------------
Yitang Yang (4):
      src/register: add io_uring_register_zcrx_ctrl() helper
      man: add io_uring_register_zcrx_ctrl.3 man page
      src/register: add io_uring_register_query wrappers
      man: add io_uring_register_query.3 man page

 man/io_uring_register_query.3      | 130 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 man/io_uring_register_query_task.3 |   1 +
 man/io_uring_register_zcrx_ctrl.3  |  84 +++++++++++++++++++++++++++++++++++++++++
 src/include/liburing.h             |   6 +++
 src/liburing-ffi.map               |   3 ++
 src/liburing.map                   |   3 ++
 src/register.c                     |  15 ++++++++
 7 files changed, 242 insertions(+)
 create mode 100644 man/io_uring_register_query.3
 create mode 120000 man/io_uring_register_query_task.3
 create mode 100644 man/io_uring_register_zcrx_ctrl.3

Click to show/hide pull request guidelines

Pull Request Guidelines

  1. To make everyone easily filter pull request from the email
    notification, use [GIT PULL] as a prefix in your PR title.
[GIT PULL] Your Pull Request Title
  1. Follow the commit message format rules below.
  2. Follow the Linux kernel coding style (see: https://github.com/torvalds/linux/blob/master/Documentation/process/coding-style.rst).

Commit message format rules:

  1. The first line is title (don't be more than 72 chars if possible).
  2. Then an empty line.
  3. Then a description (may be omitted for truly trivial changes).
  4. Then an empty line again (if it has a description).
  5. Then a Signed-off-by tag with your real name and email. For example:
Signed-off-by: Foo Bar <foo.bar@gmail.com>

The description should be word-wrapped at 72 chars. Some things should
not be word-wrapped. They may be some kind of quoted text - long
compiler error messages, oops reports, Link, etc. (things that have a
certain specific format).

Note that all of this goes in the commit message, not in the pull
request text. The pull request text should introduce what this pull
request does, and each commit message should explain the rationale for
why that particular change was made. The git tree is canonical source
of truth, not github.

Each patch should do one thing, and one thing only. If you find yourself
writing an explanation for why a patch is fixing multiple issues, that's
a good indication that the change should be split into separate patches.

If the commit is a fix for an issue, add a Fixes tag with the issue
URL.

Don't use GitHub anonymous email like this as the commit author:

123456789+username@users.noreply.github.com

Use a real email address!

Commit message example:

src/queue: don't flush SQ ring for new wait interface

If we have IORING_FEAT_EXT_ARG, then timeouts are done through the
syscall instead of by posting an internal timeout. This was done
to be both more efficient, but also to enable multi-threaded use
the wait side. If we touch the SQ state by flushing it, that isn't
safe without synchronization.

Fixes: https://github.com/axboe/liburing/issues/402
Signed-off-by: Jens Axboe <axboe@kernel.dk>

By submitting this pull request, I acknowledge that:

  1. I have followed the above pull request guidelines.
  2. I have the rights to submit this work under the same license.
  3. I agree to a Developer Certificate of Origin (see https://developercertificate.org for more information).

wokron added 4 commits March 26, 2026 21:25
IORING_REGISTER_ZCRX_CTRL has been synced to liburing without a
helper. Add io_uring_register_zcrx_ctrl() to wrap it.

This helper handles registered ring fd cases via do_register() and
provides easier access for FFI bindings.

Signed-off-by: Yitang Yang <yi1tang.yang@gmail.com>
Add documentation for io_uring_register_zcrx_ctrl() function, which
provides control operations for managing zero-copy receive contexts
that were previously registered via io_uring_register_ifq().

Signed-off-by: Yitang Yang <yi1tang.yang@gmail.com>
Add wrapper functions for IORING_REGISTER_QUERY. Provide both a
ring-based variant and a task-level variant for queries that don't
need a specific ring. These make the query API easier to use from FFI.

Signed-off-by: Yitang Yang <yi1tang.yang@gmail.com>
Add comprehensive documentation for io_uring_register_query() and
io_uring_register_query_task() functions, which provide a unified
interface for querying io_uring capabilities and feature support.

Signed-off-by: Yitang Yang <yi1tang.yang@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant