-
Notifications
You must be signed in to change notification settings - Fork 9
Add missing ops up to Linux 6.15 #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
a96a854
to
fb85b91
Compare
@sunfishcode I think this is ready for review. This has dependencies on the upstream PRs linked in the OP. In addition to defining the missing ops, I've included at least one test for each of them, with the exception of The Kernel Recipes 2024 - Efficient zero-copy networking using io_uring
EDIT: I was able to implement a test for ZCRX and verify that it works on an NVIDIA ConnectX-7.
|
I unfortunately don't have the bandwidth to review this right now. @silvanshade Would you be interested in helping maintain rustix-uring? @jordanisaacs What would you think about adding a new maintainer here? |
@sunfishcode Sure. I would be willing to help as a maintainer. |
Hey @silvanshade. Thanks for helping! I invited you to the repo & crates.io so you can publish new releases. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this! Looks good thanks for the tests. My main comment is around WaitId
and the crates (patched rustix/a the linux sys).
pub const CODE = sys::IoringOp::Waitid; | ||
|
||
pub fn build(self) -> Entry { | ||
use ::linux_raw_sys::general::{P_ALL, P_PGID, P_PID, P_PIDFD}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the only use of linux_raw_sys? We shouldn't introduce a new crate, instead first upstream the missing components to rustix and then use those types.
@@ -676,6 +679,29 @@ impl FutexWaitV { | |||
} | |||
} | |||
|
|||
#[non_exhaustive] | |||
pub enum WaitId { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to earlier, not sure why we can't use the rustix WaitId
.
@@ -19,11 +19,16 @@ members = [ "io-uring-test", "io-uring-bench" ] | |||
|
|||
[dependencies] | |||
bitflags = { version = "2.4.0", default-features = false } | |||
rustix = { version = "1.0.2", default-features = false, features = ["io_uring", "mm", "thread"] } | |||
linux-raw-sys = { version = "0.10.0", default-features = false } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets try and avoid adding any dependencies. This should really just be rustix + any supporting helpers.
|
||
[patch.crates-io] | ||
linux-raw-sys = { git = "https://github.com/silvanshade/linux-raw-sys", branch = "io_uring-zcrx" } | ||
rustix = { git = "https://github.com/silvanshade/rustix", branch = "linux-6.15-io_uring" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also lets only land this when there is a release we can point to.
This PR adds missing ops for io_uring up to Linux 6.15.
Related:
Opening as a Draft since there's still some remaining changes to make.