Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

patches bug in recv_mmsg when npkts != nrecv (backport #22276)#22280

Merged
mergify[bot] merged 2 commits intov1.9from
mergify/bp/v1.9/pr-22276
Jan 4, 2022
Merged

patches bug in recv_mmsg when npkts != nrecv (backport #22276)#22280
mergify[bot] merged 2 commits intov1.9from
mergify/bp/v1.9/pr-22276

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify Bot commented Jan 4, 2022

This is an automatic backport of pull request #22276 done by Mergify.


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

If recv_mmsg receives 2 packets where the first one is filtered out,
then it returns npkts == 1:
https://github.com/solana-labs/solana/blob/01a096adc/streamer/src/recvmmsg.rs#L104-L115

But then streamer::packet::recv_from will erroneously keep the 1st
packet and drop the 2nd one:
https://github.com/solana-labs/solana/blob/01a096adc/streamer/src/packet.rs#L34-L49

To avoid this bug, this commit updates recv_mmsg to always return total
number of received packets. If socket address cannot be correctly
obtained, it is left as the default value which is UNSPECIFIED:
https://github.com/solana-labs/solana/blob/01a096adc/sdk/src/packet.rs#L145

(cherry picked from commit 379feec)
@mergify mergify Bot added the automerge Merge this Pull Request automatically once CI passes label Jan 4, 2022
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 4, 2022

Codecov Report

Merging #22280 (f4da586) into v1.9 (9764d43) will decrease coverage by 0.0%.
The diff coverage is 100.0%.

@@            Coverage Diff            @@
##             v1.9   #22280     +/-   ##
=========================================
- Coverage    81.1%    81.1%   -0.1%     
=========================================
  Files         518      518             
  Lines      145062   145060      -2     
=========================================
- Hits       117661   117649     -12     
- Misses      27401    27411     +10     

@mergify mergify Bot merged commit fb0e5ad into v1.9 Jan 4, 2022
@mergify mergify Bot deleted the mergify/bp/v1.9/pr-22276 branch January 4, 2022 23:43
@brooksprumo brooksprumo mentioned this pull request Jan 5, 2022
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 2, 2022

This PR has been automatically locked since there has not been any activity in past 14 days after it was merged.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

automerge Merge this Pull Request automatically once CI passes locked PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant