feat(driver,iour): detect multishot support#837
feat(driver,iour): detect multishot support#837Berrysoft wants to merge 3 commits intocompio-rs:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds runtime detection for io-uring “multishot” support (e.g., RecvMulti, AcceptMulti) so the driver can decide whether to submit a multishot SQE or fall back to a non-multishot operation, addressing #831 (“no public API to probe if io-uring supports RecvMulti”).
Changes:
- Introduces
sys/iour/multishot.rswith probing logic and adetect()helper to classify SQEs as multishot-supported/unsupported. - Updates the io-uring driver submission path to use
is_entry_supported()(multishot-aware) instead of opcode-only probing. - Refactors
BufControlto exposenew_inner/release_innerAPIs that operate on anio_uring::Submitter(enabling probing code to register a buf ring without a fullDriver).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
compio-driver/src/sys/iour/multishot.rs |
Adds runtime probing + SQE inspection to infer multishot support. |
compio-driver/src/sys/iour/mod.rs |
Routes SQE support checks through multishot-aware detection before falling back. |
compio-driver/src/sys/iour/buffer_pool.rs |
Allows buf-ring register/unregister using a Submitter directly (for probes). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
This is some non-trivial task to do. I really think this detection should be an optional feature instead of default behavior... And if user choose not to detect, just let it fail. One other possibility I can think of is instead of detecting it in driver, move the logic to net: keep a global AtomicBool "not_supported" for each op, and when user calls corresponding op, if not_supported is true, use fallback op, otherwise perform the op and check results, if it's an Unsupported error, flip the flag and fallback; otherwise return. |
|
Too complex to move the code to |
Close #831
I hope the code is robust enough...