Skip to content

feat(driver,iour): expose the second half of 32-byte CQEs - #1140

Open
lexoliu wants to merge 1 commit into
compio-rs:masterfrom
lexoliu:cqe32-extra
Open

lexoliu wants to merge 1 commit into
compio-rs:masterfrom
lexoliu:cqe32-extra

Conversation

@lexoliu

@lexoliu lexoliu commented Nov 11, 2026 •

Copy link
Copy Markdown

With io-uring-cqe32 the ring is set up with IORING_SETUP_CQE32, but the driver only passes res and flags on to the op (create_entry, multishot path), so the extra 16 bytes are dropped. Ops that return data there can't be written as an OpCode on top of compio: IORING_OP_URING_CMD, and IORING_OP_RECV_ZC, whose ring has to be CQE32 in the first place (zcrx.c, v6.18).

This copies big_cqe into Extra on both paths and adds Extra::big_cqe(), which returns Unsupported when the feature is off. Without the feature nothing changes size.

The test submits a NOP with IORING_NOP_CQE32, which echoes sqe->off and sqe->addr into the big CQE (nop.c, v6.18), and checks both values come back through Extra. It passes on Linux 6.18 and skips on older kernels; the io-uring-sqe128,io-uring-cqe32 CI lane is the one that builds it.

Choosing the CQE size per ring, or IORING_SETUP_CQE_MIXED, would spare every other ring in the process the larger CQ. I left that out: the io-uring crate types its CQ by entry size and has no mixed-ring support yet.

@github-actions github-actions Bot added driver: io-uring About the io-uring driver enhancement New feature or request package: driver Related to compio-driver labels Nov 11, 2026
@lexoliu

lexoliu commented Nov 11, 2026 •

Copy link
Copy Markdown
Author

I'm building skyzen (https://github.com/zen-rs/skyzen), an HTTP server framework that runs thread-per-core on compio, with its own HTTP/1.1 and HTTP/3 over io_uring. An early review would let us build on upstream compio rather than a fork. Happy to reshape anything.

Also, thank you for building such a great library❤️.

@@ -0,0 +1,65 @@
//! The second half of a 32-byte CQE reaches the op through `Extra`.

#![cfg(all(io_uring, not(fusion), feature = "io-uring-cqe32"))]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also test fusion please. You can use IourOpCode instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

driver: io-uring About the io-uring driver enhancement New feature or request package: driver Related to compio-driver

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants