-
Notifications
You must be signed in to change notification settings - Fork 673
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
Fix recvmmsg(2) implementation #1341
Conversation
I don't quite understand why the CI didn't pass on stable. On my Linux machine, the |
Do you know of any way to force the condition described in #1325, so we can test for it? |
BTW, the failure of test-aio-drop is not related to this PR. I suspect it's due to a bug in glibc. But I've never been able to reproduce it locally, so I'm not sure. |
Re: testing: as far as the actual problem that existed prior to this PR, you should be able to:
I can add a test for that to this PR if that seems acceptable. |
Added a test for short reads when using |
There were two problems discovered with the `recvmmsg(2)` implementation that this changeset attempts to fix: 1. As mentioned in /issues/1325, `recvmmsg(2)` can return fewer messages than requested, and 2. Passing the return value of `recvmmsg(2)` as the number of bytes in the messages received is incorrect. This changeset incorporates the proposed fix from /issues/1325, as well as passing the correct value (`mmsghdr.msg_len`) for the number of bytes in a given message.
Looks good! Could you also please add a CHANGELOG entry? |
Actually, in the interest of expediency, I'm going to merge this now and add a CHANGELOG entry later. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bors r+
Build succeeded: |
There were two problems discovered with the
recvmmsg(2)
implementationthat this changeset attempts to fix:
recvmmsg(2)
can return fewermessages than requested, and
recvmmsg(2)
as the number of bytes inthe messages received is incorrect.
This changeset incorporates the proposed fix from /issues/1325,
as well as passing the correct value (
mmsghdr.msg_len
) for the numberof bytes in a given message.