This repository has been archived by the owner on Jan 13, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Flip iter operations to keep associated address/header/packets together #22245
Merged
Conversation
This file contains 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
Before this change, if cast_socket_addr() returned a None for any address/header pair, the subsequent zip() would misalign the address/header pair and packet. So, this change zips all three together, then does filter_map() so keep things aligned. Additionally, compute total_size inline to avoid running through packets a second time.
behzadnouri
previously approved these changes
Jan 3, 2022
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.
thanks for spotting this.
mergify
bot
dismissed
behzadnouri’s stale review
January 3, 2022 20:33
Pull request has been modified.
Codecov Report
@@ Coverage Diff @@
## master #22245 +/- ##
=========================================
- Coverage 81.0% 81.0% -0.1%
=========================================
Files 523 523
Lines 146529 146528 -1
=========================================
- Hits 118769 118767 -2
- Misses 27760 27761 +1 |
mergify bot
pushed a commit
that referenced
this pull request
Jan 3, 2022
…er (#22245) Flip iter operations to keep associated address/header/packets together Before this change, if cast_socket_addr() returned a None for any address/header pair, the subsequent zip() would misalign the address/header pair and packet. So, this change zips all three together, then does filter_map() so keep things aligned. Additionally, compute total_size inline to avoid running through packets a second time. (cherry picked from commit 20b61e2) # Conflicts: # streamer/src/recvmmsg.rs
mergify bot
pushed a commit
that referenced
this pull request
Jan 3, 2022
…er (#22245) Flip iter operations to keep associated address/header/packets together Before this change, if cast_socket_addr() returned a None for any address/header pair, the subsequent zip() would misalign the address/header pair and packet. So, this change zips all three together, then does filter_map() so keep things aligned. Additionally, compute total_size inline to avoid running through packets a second time. (cherry picked from commit 20b61e2)
mergify bot
added a commit
that referenced
this pull request
Jan 4, 2022
…er (#22245) (#22257) Flip iter operations to keep associated address/header/packets together Before this change, if cast_socket_addr() returned a None for any address/header pair, the subsequent zip() would misalign the address/header pair and packet. So, this change zips all three together, then does filter_map() so keep things aligned. Additionally, compute total_size inline to avoid running through packets a second time. (cherry picked from commit 20b61e2) Co-authored-by: steviez <[email protected]>
mergify bot
added a commit
that referenced
this pull request
Jan 4, 2022
…er (backport #22245) (#22256) * Flip iter operations to keep associated address/header/packets together (#22245) Flip iter operations to keep associated address/header/packets together Before this change, if cast_socket_addr() returned a None for any address/header pair, the subsequent zip() would misalign the address/header pair and packet. So, this change zips all three together, then does filter_map() so keep things aligned. Additionally, compute total_size inline to avoid running through packets a second time. (cherry picked from commit 20b61e2) # Conflicts: # streamer/src/recvmmsg.rs * removes backport merge conflicts Co-authored-by: steviez <[email protected]> Co-authored-by: behzad nouri <[email protected]>
Closed
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.
Problem
Before this change, if cast_socket_addr() returned a None for any
address/header pair, the subsequent zip() would misalign the
address/header pair and packet.
Summary of Changes
So, this change zips all three together,
then does filter_map() so keep things aligned.
Additionally, compute
total_size
inline to avoid running through packetsa second time.