Increase the control message size#19516
Merged
yashykt merged 7 commits intogrpc:masterfrom Jul 1, 2019
Merged
Conversation
4bddc55 to
8db4b2e
Compare
soheilhy
reviewed
Jul 1, 2019
Contributor
soheilhy
left a comment
There was a problem hiding this comment.
Thank you for doing this. I have a few small nits.
src/core/lib/iomgr/tcp_posix.cc
Outdated
| struct iovec iov[MAX_READ_IOVEC]; | ||
| char cmsgbuf[24 /*CMSG_SPACE(sizeof(int))*/]; | ||
| char cmsgbuf | ||
| [128 /*CMSG_SPACE(sizeof(grpc_core::scm_timestamping)) + CMSG_SPACE(sizeof(int))*/ |
Contributor
There was a problem hiding this comment.
The sum in front of it should end up being 88 right? Should we use 88 instead?
| char cmsgbuf | ||
| [128 /*CMSG_SPACE(sizeof(grpc_core::scm_timestamping)) + CMSG_SPACE(sizeof(int))*/ | ||
| ]; | ||
| ssize_t read_bytes; |
Contributor
There was a problem hiding this comment.
can you please pull read_bytes, total_read_bytes, and iov_len before cmsgbuf so that we don't have to skip a few cache lines on the stack to reach them?
src/core/lib/iomgr/tcp_posix.cc
Outdated
| ]; | ||
| ssize_t read_bytes; | ||
| size_t total_read_bytes = 0; | ||
|
|
Contributor
There was a problem hiding this comment.
github doesn't let me add comments below. Would you be able to add a break right after line 528 so that we don't waste cycles on receive timestamps at least for now?
soheilhy
approved these changes
Jul 1, 2019
Contributor
soheilhy
left a comment
There was a problem hiding this comment.
Thanks! one tiny nit :-)
src/core/lib/iomgr/tcp_posix.cc
Outdated
| struct msghdr msg; | ||
| struct iovec iov[MAX_READ_IOVEC]; | ||
| char cmsgbuf[24 /*CMSG_SPACE(sizeof(int))*/]; | ||
| constexpr size_t cmsg_alloc_space = |
Contributor
There was a problem hiding this comment.
nit: maybe also move this down below?
soheilhy
approved these changes
Jul 1, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.