Bounding UDP payload size to 1200 and renaming - #1156
Merged
Conversation
BiagioFesta
force-pushed
the
wip/bfesta/min-mtu-as-dgram-size
branch
from
July 7, 2021 08:45
cdc87ec to
52a42c8
Compare
Member
|
Just need to fix up the formatting a bit, then I'm happy to merge this. |
Contributor
Author
I guess a |
Member
|
Would you mind squashing the formatting fixes into the first commit? Should be easy with an interactive rebase. |
BiagioFesta
force-pushed
the
wip/bfesta/min-mtu-as-dgram-size
branch
from
July 7, 2021 10:18
b34e0f8 to
2543c47
Compare
djc
approved these changes
Jul 7, 2021
Closed
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
As mentioned in #1154, it seems quinn sends UDP datagrams with a payload 1232 bytes by default.
This is easily reproducible with the client.rs/server.rs quinn example, making a GET request and serve a reasonable big file.
Looking at the QUIC spec, (quic-draft-32 #14) , it seems the protocol should supports networks where the maximum UDP payload is 1200 bytes.
Any larger value should be discovered using PMTUD.
This PR contains two changes:
const MIN_MTU: u16 = 1232;intoMAX_INITIAL_UDP_PAYLOAD_SIZE. This change has no impact from the semantic point of view. The rationale behind this change is because that value seems to be used across the code to compute what in QUIC is defined as "the maximum datagram size" (i.e., the UDP datagram payload).1232to1200and avoid quinn assembles packets (UDP datagrams) with a payload greater than this value.