Skip to content
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

IORING_OP_RECVMSG fails when msg_control is set #220

Closed
romange opened this issue Oct 3, 2020 · 9 comments
Closed

IORING_OP_RECVMSG fails when msg_control is set #220

romange opened this issue Oct 3, 2020 · 9 comments

Comments

@romange
Copy link
Contributor

romange commented Oct 3, 2020

struct msghdr has msg_control and msg_controllen fields that could be set before calling recvmsg().
recvmsg returns successfully with those fields set.

IORING_OP_RECVMSG, on the other hand fails with 22/Invalid argument.

To reproduce, see https://github.com/romange/liburing/commit/fd9c810c6cf6c73c7f3b27aacf144a229ee56313

@axboe
Copy link
Owner

axboe commented Oct 3, 2020

This is known, cmsg is currently disabled through io_uring. This will be relaxed or 5.10.

@isilence
Copy link
Collaborator

isilence commented Oct 4, 2020

Do we really need this? Is there a user for whom SCM*
are performance critical?

I guess they would require one by one handling in io_uring
with a swtich or something + extra resources. ->files for
SCM_RIGHTS who knows what else for others.

@axboe
Copy link
Owner

axboe commented Oct 5, 2020

Taking a closer look, I don't think we do.

@isilence
Copy link
Collaborator

isilence commented Oct 5, 2020

#128, but don't know their use case and how critical to do that via io_uring.

@axboe
Copy link
Owner

axboe commented Oct 5, 2020

I don't think we need it for SCM_RIGHTS, I don't view that as performance critical. But other uses cases of cmsg are useful and we do need, like MSG_ERRQUEUE. I'd be quite content to leave SCM_RIGHTS disabled forever.

@axboe
Copy link
Owner

axboe commented Oct 5, 2020

Above is queued for 5.10 in net-next

@romange
Copy link
Contributor Author

romange commented Oct 5, 2020

I wanted to use cmsg in order to timestamp RX packets and to see how much my application layer/io_uring contributes to the latency tail.

@axboe
Copy link
Owner

axboe commented Nov 24, 2020

Closing this one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants