-
Notifications
You must be signed in to change notification settings - Fork 134
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
missing multishot commands #187
Comments
I was playing with this one and I have a locally working branch (on kernel 6.1), but I still need to polish and write tests before submitting. What I've found out so far is that:
|
That is great. Anytime in the next week or two is probably not a problem. I was hoping to get a |
They are all supported now. See the unit test named test_udp_recvmsg_multishot for how to use the existing opcode::RecvMsg but with proper flags for multishot and see the same test for how to use the new types::RecvMsgOut::parse function to create a RecvMsgOut with methods to access various parts of the data that was received. |
There is still one UX question open about how to expose this: io-uring/io-uring-test/src/tests/net.rs Lines 1295 to 1296 in 6785e66
On the same topic, it is also relevant to note that multishot recvmsg also needs to have the io-uring/io-uring-test/src/tests/net.rs Lines 1298 to 1304 in 6785e66
At this point, it looks like all other multishot operations have been placed behind their own |
We already have |
@lucab |
Sorry my availability is a bit spotty as I'm busy taking care of other stuff offline. No I don't have other things to merge before the next release. |
Possibly dumb question: we ran into an issue with code that used |
I'm going to be adding more multishot commands, some or all in separate PRs. But I wanted a place where we could discuss the naming of these opcodes and options. I'm going to list the names that come from the liburing API as a starting point.
The multishot version of recv should not take a buffer pointer or length so a separate opcode seems warranted to me, maybe
RecvMulti
as a convention I think we're using is to place modifiers in a name after the primary part of the name? If we wanted touse the same opcode, we could add an optional buf_group field, but a buf_group id value of 0 is allowed so we might have to wrap that optional type in an Option in that case or default it to a max value.
The multishot version of recvmsg I'm still confused about. I think parts of the msghdr are still relevant to the function even though the buffer it is designed to point to would not be. I would be tempted to tackle this one last because it's not clear to me from even the liburing documentation how it works or what it does. It might require looking through the kernel source or asking on the liburing repo.
The poll_multishot ends up taking the same arguments as the single-shot poll_add operation, so maybe that doesn't deserve its own opcode here, maybe an optional
multishot
boolean? But if you want a separate opcode, how about the namePollMulti
to go with thePollAdd
that is there now?@quininer @lucab
The text was updated successfully, but these errors were encountered: