feat(driver): force OpCode support#690
Conversation
fa1b034 to
def83d6
Compare
def83d6 to
eb888e4
Compare
There was a problem hiding this comment.
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
OpCodeFlagbitflags to represent io-uring opcodes - Added
detect_opcode_support()method toProactorBuilderfor 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.
eb888e4 to
fa5968d
Compare
|
Let's wait for @inklesspen1rus |
|
@inklesspen1rus what's your opinion to this PR? Does the new API |
|
@Berrysoft Can't check now( |
|
No problem:) |
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. |
Closes #504
cc @inklesspen1rus