-
Notifications
You must be signed in to change notification settings - Fork 561
Add shim for sendmmsg when sendmmsg does not exist #1896
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
Conversation
Some users have asked to build with glibc versions that do not have sendmmsg. This change checks for the existance of sendmmsg, and if its missing implements a shim version that has identical functionality
src/platform/datapath_epoll.c
Outdated
while (SuccessCount < MessageLen) { | ||
int Result = sendmsg(fd, &Messages[SuccessCount].msg_hdr, Flags); | ||
if (Result < 0) { | ||
return SuccessCount == 0 ? Result : (ssize_t)SuccessCount; |
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.
Wouldn't returning Result
incorrectly set SuccessfullySentMessages
in line 2592?
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.
No. The contract of sendmmsg is if the first message errors that return value is returned. Otherwise it returns the number of successful sends.
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.
How are you testing this?
I manually ran the test suite and enabled this flag. I also at the same time disabled the USO flag as well, which checks this even more. |
Are there benchmarking data regarding the performance degradation when sendmmsg is not available? |
We don't have current benchmarking numbers, because none of our systems support any off the offloading. However, we do have some older performance data. The red jump was adding sendmmsg. The black jump here is adding GSO, which with an older libc you also won't have. So I would expect performance to be similar to where things were before the red jump. |
Some users have asked to build with glibc versions that do not have sendmmsg. This change checks for the existance of sendmmsg, and if its missing implements a shim version that has identical functionality.
Closes #1884