Skip to content

feat(driver): force OpCode support#690

Merged
George-Miao merged 1 commit intocompio-rs:masterfrom
George-Miao:feat/driver/force-op-support
Feb 15, 2026
Merged

feat(driver): force OpCode support#690
George-Miao merged 1 commit intocompio-rs:masterfrom
George-Miao:feat/driver/force-op-support

Conversation

@George-Miao
Copy link
Member

@George-Miao George-Miao commented Feb 14, 2026

Closes #504

cc @inklesspen1rus

Copilot AI review requested due to automatic review settings February 14, 2026 20:44
@George-Miao George-Miao self-assigned this Feb 14, 2026
@George-Miao George-Miao added enhancement New feature or request driver: io-uring About the io-uring driver driver: fusion About the fusion driver package: driver Related to compio-driver labels Feb 14, 2026
@George-Miao George-Miao force-pushed the feat/driver/force-op-support branch from fa1b034 to def83d6 Compare February 14, 2026 20:47
@George-Miao George-Miao force-pushed the feat/driver/force-op-support branch from def83d6 to eb888e4 Compare February 14, 2026 20:48
Copy link
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 support for enforcing specific io-uring OpCode requirements when building a Proactor. The feature allows users to specify which opcodes must be supported by the kernel, failing early with a clear error or falling back to the polling driver on the fusion backend.

Changes:

  • Introduced OpCodeFlag bitflags to represent io-uring opcodes
  • Added detect_opcode_support() method to ProactorBuilder for specifying required opcodes
  • Modified DriverType::suggest() to consider additional opcode requirements when choosing between io-uring and polling
  • Enhanced io-uring driver initialization to validate required opcodes before proceeding

Reviewed changes

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

Show a summary per file
File Description
compio-driver/src/op.rs Defines OpCodeFlag bitflags and implements get_codes() method to map flags to io-uring opcode values
compio-driver/src/lib.rs Adds op_flags field to ProactorBuilder and detect_opcode_support() configuration method
compio-driver/src/sys/iour/mod.rs Adds opcode support validation during driver initialization
compio-driver/src/sys/fusion/mod.rs Passes opcode flags to DriverType::suggest() for driver selection
compio-driver/src/driver_type.rs Refactors driver selection to use OpCodeFlag::basic() combined with user-specified flags
compio-driver/Cargo.toml Adds bitflags 2.11.0 dependency

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

@George-Miao George-Miao force-pushed the feat/driver/force-op-support branch from eb888e4 to fa5968d Compare February 14, 2026 21:15
Copy link
Member

@Berrysoft Berrysoft left a comment

Choose a reason for hiding this comment

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

LGTM. I like it.

@George-Miao
Copy link
Member Author

Let's wait for @inklesspen1rus

@Berrysoft
Copy link
Member

@inklesspen1rus what's your opinion to this PR? Does the new API detect_opcode_support fit your usage?

@inklesspen1rus
Copy link

@Berrysoft Can't check now(
Probably in 0-3 days

@Berrysoft
Copy link
Member

No problem:)

@George-Miao
Copy link
Member Author

@Berrysoft Can't check now( Probably in 0-3 days

I'll merge it for now. If you have anything that want to change, feel free to re-open the issue or submit a PR.

@George-Miao George-Miao merged commit c712a5b into compio-rs:master Feb 15, 2026
54 checks passed
@George-Miao George-Miao deleted the feat/driver/force-op-support branch February 15, 2026 19:50
@github-actions github-actions bot mentioned this pull request Feb 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

driver: fusion About the fusion driver 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.

Should iour driver panic when not all USER_OPs supported?

4 participants