-
Notifications
You must be signed in to change notification settings - Fork 153
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
Feature request: Export io_uring_buf_ring
#1143
Comments
First, this is cool, thanks for working on this! Currently rustix's io_uring API uses zero-length arrays, such as here. That is simple, however, that's not ergonomic as it requires users to use I think it might be better to add a type like bindgen's |
Adding an Was going to ask about updating that |
io_uring utilizes a struct called
io_uring_buf_ring
to register a ring buffer ofio_uring_buf
structs that contain a reference to slices of buffers that can be filled in certain operations. One operation that can utilize this isIoringOp::Recv
with theIoringRecvFlags::MULTISHOT
flag set. This can make for much more performant operations, especially for those using direct io, as the kernel can choose a buffer to utilize, allowing the application to have many morerecv
operations in flight than available buffers.This struct was added to linux 5.19, and is defined here.
linux_raw_sys
0.4 exports this struct here, which contains an anonymous union and C flexible array member.libc
does not export this type.I see we hand-code structs instead of re-exporting them, seemingly because
libc
doesn't export those structs. So, I'm primarily looking for guidance on how to define the flexible array member. I'd be happy to contribute this struct if someone doesn't go for it first.The text was updated successfully, but these errors were encountered: