-
Notifications
You must be signed in to change notification settings - Fork 132
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
opcode Read misses IOSQE_BUFFER_SELECT flag? #202
Comments
Do so with the let read = opcode::Read::new(fd, std::ptr::null_mut(), 0)
.buf_group(bgid)
.build()
.flags(squeue::Flags::BUFFER_SELECT); // here |
It looks like a viable workaround, but I'd expect |
The |
I looked into this and while we can add a check for a null pointer in Read, doing it for Readv and RecvMsg becomes more complicated as you have to actually read the iovec pointers which means the build method would have to become unsafe. So I think this isn't worth it. |
Looks like it is required to set
IOSQE_BUFFER_SELECT
flag when to make use of provided group at thesqe->buf_group
https://github.com/axboe/liburing/blob/241bbfafe437b8b161d25be81d677f6ba109ea44/test/read-write.c#L148-L149
Kernel code also suggests it is required: https://github.com/torvalds/linux/blob/5e725d112e1a54c2611d5dffd124a79415d0f0de/io_uring/io_uring.c#L2130-L2134
Currently Read opcode neither sets it at
build()
time nor exposes flags for users to set.The text was updated successfully, but these errors were encountered: