liburing
liburing copied to clipboard
io_uring_prep_send_bundle should not have len argument
For some reason io_uring_prep_send_bundle accepts len argument, however io_sendmsg_prep in kernel returns -EINVAL for non-zero len.
I guess io_uring_prep_send_bundle should not have len as an argument since 0 is the only valid value.
Or is it something that might be implemented in the future to send bundles with a partially full final buffer? At the moment there does not seem to be a way to do that.
It has 'len' as an argument to avoid the inevitable need to add another helper just to pass in the length as well. And yes, partial send would be the use case, or capping the send at least.
Intent of the future use of len argument makes sense but as of today it does not actually work because of https://github.com/torvalds/linux/blob/b446a2dae984fa5bd56dd7c3a02a426f87e05813/io_uring/net.c#L437C1-L439C1
Do I get that correct?
Right, it's not currently supported, which is why it returns -EINVAL right now.
Would be great to update man that len is for future use and must be currently set to 0.
Agree, I can do that. FWIW, we do accept patches and contributions.