quiche icon indicating copy to clipboard operation
quiche copied to clipboard

PMTUD Tests and Updates

Open cf-rhett opened this issue 7 months ago • 5 comments

In attempts to use PMTUD I found a number of issues with the existing implementation. This PR attempts to address the following

  1. ~~PMTUD probes were only sent when handshake_done_sent was true. As this will only be true for the server implementation, I've changed this to handshake_completed which I believe conforms to original intent~~
  2. ~~If I do not limit the number of probes being sent at once, then they are not consistently acked/dropped so PMTUD cannot function. Additionally, the algorithm did not take into account the sized of the failed probes so many 100s/1000s of probes would be sent at the initial probe size and if the PMTU was less than the probe size this would cause the PMTU to be calculated to always be 1200 (minimum supported MTU)~~

1 & 2 were handled by @rushilmehra in #2084

  1. PMTUD was stopped at the first acked probe. e.g if the the PMTU was 1349 the prior implementation would calculate the PMTU to be 1275 with minimum MTU of 1200 and maximum of 1350.

I've additionally modified some of the function names to be more readable

#1635 Original PR #372 Initial never merged PR

cf-rhett avatar May 08 '25 14:05 cf-rhett

Recommend viewing this with whitespace changes disabled

cf-rhett avatar May 22 '25 20:05 cf-rhett

Not familiar with what this implementation is based on but have we considered aligning to DPLPMTUD?

I didn't see references to a RFC from my quick scan but possibly missed something.

toidiu avatar May 23 '25 20:05 toidiu

Not familiar with what this implementation is based on but have we considered aligning to DPLPMTUD?

I didn't see references to a RFC from my quick scan but possibly missed something.

@toidiu this is an implementation of DPLPMTUD. The original PR, #1635, just referred to it as PMTUD so I continued using the naming convention. There are aspects of this that are QUICHE specific such as having some knowledge of dropped probes so we don't rely on timers

If the timer expires before a probe packet is acknowledged, the probe has failed to confirm the PROBED_SIZE. Each time the PROBE_TIMER expires, the PROBE_COUNT is incremented, the PROBE_TIMER is reinitialized, and a new probe of the same size or any other size (determined by the search algorithm) can be sent. The maximum number of consecutive failed probes is configured (MAX_PROBES). If the value of the PROBE_COUNT reaches MAX_PROBES, probing will stop, and the PL sender enters the SEARCH_COMPLETE state.

If there are specific aspects you would like to see from the RFC that aren't here I'm happy to look into adding them and I'm also happy to include references to the RFC here as well

cf-rhett avatar May 27 '25 15:05 cf-rhett

I'm currently investigating an issue on Windows where if PMTUD finds the PMTU to be <= 1325 everything breaks. This can be recreated without PMTUD by setting max_send_udp_payload_size on the QUIC Settings that manage the initial connection to the same range

cf-rhett avatar Jun 02 '25 13:06 cf-rhett

See #2074 for a related fix on handling low MTU environments on macOS

cf-rhett avatar Jun 02 '25 17:06 cf-rhett

Thanks for your patience on this one @cf-rhett, merged

rushilmehra avatar Jul 04 '25 18:07 rushilmehra