Skip to content
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

refactor(udp): define const for receive buffer size #1709

Merged
merged 1 commit into from
Mar 5, 2024

Conversation

mxinden
Copy link
Collaborator

@mxinden mxinden commented Mar 5, 2024

Follow up to #1707 (comment).

Reading multiple datagrams in single Socket::recv call will happen with #1708.

Copy link

codecov bot commented Mar 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.97%. Comparing base (78919a5) to head (0a878b3).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1709   +/-   ##
=======================================
  Coverage   92.97%   92.97%           
=======================================
  Files         120      120           
  Lines       37342    37342           
=======================================
  Hits        34718    34718           
  Misses       2624     2624           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@larseggert
Copy link
Collaborator

Does quinn-udp maybe already define a constant for max. GSO size?

@mxinden
Copy link
Collaborator Author

mxinden commented Mar 5, 2024

quinn-udp exposes the system dependent GSO and GRO max:

https://github.com/quinn-rs/quinn/blob/9611c5ef6932781eb84bc775e7f008474531b20e/quinn-udp/src/unix.rs#L166-L183

quinn itself relies on the system dependent GRO max segments and the recvmmsg batch size to determine its receive buffer size.

https://github.com/quinn-rs/quinn/blob/9611c5ef6932781eb84bc775e7f008474531b20e/quinn/src/endpoint.rs#L685-L690

I suggest we introduce this logic once we introduce proper GSO and GRO support (#1693). I see this pull request and #1708 as bug fixes only.

@larseggert larseggert added this pull request to the merge queue Mar 5, 2024
Merged via the queue into mozilla:main with commit 1ec476e Mar 5, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants