Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(driver,iour): detect kernel version & fallback#903

Merged
Berrysoft merged 5 commits into
compio-rs:masterfrom
Berrysoft:dev/kernel-version
May 3, 2026
Merged

feat(driver,iour): detect kernel version & fallback#903
Berrysoft merged 5 commits into
compio-rs:masterfrom
Berrysoft:dev/kernel-version

Conversation

@Berrysoft
Copy link
Copy Markdown
Member

A second attempt after #837 .

@Berrysoft Berrysoft added this to the v0.19 milestone May 2, 2026
@Berrysoft Berrysoft requested a review from Copilot May 2, 2026 13:03
@Berrysoft Berrysoft self-assigned this May 2, 2026
@Berrysoft Berrysoft added the driver: io-uring About the io-uring driver label May 2, 2026
@github-actions github-actions Bot added enhancement New feature or request package: driver Related to compio-driver labels May 2, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds Linux kernel version detection for the io_uring backend and uses it to choose between multishot opcodes and fallback implementations when running on older kernels.

Changes:

  • Add KernelVersion parsing via rustix::system::uname() and an is_kernel_newer_than helper.
  • Gate AcceptMulti and RecvMulti entry creation on minimum kernel versions, falling back to non-multishot variants.
  • Rework RecvMsgMulti to select between an io_uring implementation and a fallback implementation at construction time.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
compio-driver/src/sys/pal/iour/mod.rs Adds kernel version parsing + comparison helper for runtime gating.
compio-driver/src/sys/op/multishot/iour.rs Uses kernel version gating for AcceptMulti opcode selection.
compio-driver/src/sys/op/managed/iour.rs Uses kernel version gating for RecvMulti, and adds a RecvMsgMulti fallback path.
compio-driver/Cargo.toml Enables rustix/system when the io-uring feature is on.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread compio-driver/src/sys/op/multishot/iour.rs Outdated
Comment thread compio-driver/src/sys/op/managed/iour.rs Outdated
Comment thread compio-driver/src/sys/pal/iour/mod.rs
Comment thread compio-driver/src/sys/op/managed/iour.rs
Comment thread compio-driver/src/sys/op/managed/iour.rs
Comment thread compio-driver/src/sys/pal/iour/mod.rs Outdated
@Berrysoft Berrysoft requested a review from George-Miao May 3, 2026 02:20
Copy link
Copy Markdown
Member

@George-Miao George-Miao left a comment

Choose a reason for hiding this comment

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

LGTM

@Berrysoft Berrysoft merged commit 93264c2 into compio-rs:master May 3, 2026
71 checks passed
@Berrysoft Berrysoft deleted the dev/kernel-version branch May 3, 2026 02:45
@github-actions github-actions Bot mentioned this pull request May 3, 2026
@github-actions github-actions Bot mentioned this pull request May 16, 2026
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.

3 participants