Skip to content

Add test and man page updates for non-iopoll uring_cmds on IORING_SETUP_IOPOLL rings#1552

Merged
axboe merged 3 commits intoaxboe:masterfrom
calebsander:feature/mixed-iopoll
Mar 19, 2026
Merged

Add test and man page updates for non-iopoll uring_cmds on IORING_SETUP_IOPOLL rings#1552
axboe merged 3 commits intoaxboe:masterfrom
calebsander:feature/mixed-iopoll

Conversation

@calebsander
Copy link
Copy Markdown
Contributor

@calebsander calebsander commented Mar 18, 2026

As requested...

Add a test (iopoll-sync) issuing non-iopoll SOCKET_URING_OP_{GET,SET}SOCKOPT uring_cmds to an IORING_SETUP_IOPOLL io_uring.

Update various man pages to reflect the current set of opcodes supported by the kernel with IORING_SETUP_IOPOLL.


git request-pull output:

The following changes since commit 1e9a937e10e892595ad09faeec3e5ee79646135e:

  test/fdinfo: don't use io_uring_submit() return value for SQPOLL (2026-03-17 14:51:26 -0600)

are available in the Git repository at:

  git@calebsander-github:calebsander/liburing.git feature/mixed-iopoll

for you to fetch changes up to e20dcbba7897b14058635b343ac31dc84396b1d9:

  man: update comments about non-polled requests with IORING_SETUP_IOPOLL (2026-03-18 18:54:42 -0600)

----------------------------------------------------------------
Caleb Sander Mateos (3):
      test: test non-iopoll uring_cmds on IORING_SETUP_IOPOLL rings
      man: remove note about IORING_SETUP_IOPOLL + IORING_OP_NOP
      man: update comments about non-polled requests with IORING_SETUP_IOPOLL

 man/io_uring_enter.2       |   7 -------
 man/io_uring_setup.2       |  12 +++++++++---
 man/io_uring_setup_flags.7 |  29 +++++++++++++++++++++++++----
 test/Makefile              |   1 +
 test/iopoll-sync.c         | 129 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 164 insertions(+), 14 deletions(-)
 create mode 100644 test/iopoll-sync.c

@axboe
Copy link
Copy Markdown
Owner

axboe commented Mar 18, 2026

Looks good outside of:

iopoll-sync.c:13:9: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
   13 | int main()
      |         ^
      |          void
1 error generated.

Can you fix that one up?

Kernel commit 23475637b0c4 ("io_uring/uring_cmd: allow non-iopoll cmds
with IORING_SETUP_IOPOLL") queued for 7.1 will allow uring_cmds for
files that don't support iopoll to be issued to IORING_SETUP_IOPOLL
io_urings. Add a test iopoll-sync for this. It sets up an io_uring with
IORING_SETUP_IOPOLL and issues linked SOCKET_URING_OP_{GET,SET}SOCKOPT
uring_cmds.

Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
Since kernel commit 73911426aaaa ("io_uring: check IOPOLL/ioprio support
upfront"), IORING_OP_NOP is supported with IORING_SETUP_IOPOLL. Remove
the outdated note from the io_uring_enter() man page that it would
result in EINVAL.

Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
Kernel commit 23475637b0c4 ("io_uring/uring_cmd: allow non-iopoll cmds
with IORING_SETUP_IOPOLL") queued for 7.1 will allow uring_cmds for
files that don't support iopoll to be issued to IORING_SETUP_IOPOLL
io_urings. Update the io_uring_setup_flags man page to clarify exactly
which opcodes are allowed on IORING_SETUP_IOPOLL io_urings. Update the
io_uring_setup man page to say most non-polled I/O is disallowed, with a
reference to the io_uring_setup_flags page. Also clarify that O_DIRECT
is only required for read and write opcodes.

Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
@calebsander calebsander force-pushed the feature/mixed-iopoll branch from d3259ac to e20dcbb Compare March 19, 2026 00:54
@axboe axboe merged commit 1b9d216 into axboe:master Mar 19, 2026
18 of 19 checks passed
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.

2 participants