Skip to content

Implement PKTS_BETWEEN_PROBES for PMTUD#2514

Open
jeniksv wants to merge 2 commits into
cloudflare:masterfrom
jeniksv:jeniksv/pmtud
Open

Implement PKTS_BETWEEN_PROBES for PMTUD#2514
jeniksv wants to merge 2 commits into
cloudflare:masterfrom
jeniksv:jeniksv/pmtud

Conversation

@jeniksv

@jeniksv jeniksv commented Jun 19, 2026

Copy link
Copy Markdown

Add configurable spacing between PMTUD probes. When configured, PMTUD waits until the given number of non-probe packets has been sent before allowing the next probe.

This prevents lost probes on idle connections from inflating the in-flight byte count, triggering PTO, and causing further probes. Without spacing, this can create a self-reinforcing loop that escalates the PTO exponent and generates unnecessary traffic.

@jeniksv
jeniksv requested a review from a team as a code owner June 19, 2026 10:44
Add configurable spacing between PMTUD probes. When configured, PMTUD
waits until the given number of non-probe packets has been sent before
allowing the next probe.

When configured, this prevents lost probes on idle connections from
inflating the in-flight byte count, triggering PTO, and causing further
probes. Without spacing, this can create a self-reinforcing loop that
escalates the PTO exponent and generates unnecessary traffic.
Comment thread quiche/src/lib.rs
/// PMTUD probes.
///
/// The default value is `0`.
pub fn set_pmtud_pkts_between_probes(&mut self, pkts: usize) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why default 0? If lost probes really escalate into a self-reinforcing PTO loop, opt-in-off means nobody's protected unless they know to flip it. Is 0 just conservatism, or is the loop rare enough in practice that opt-in is the right call?

@jeniksv jeniksv Jul 9, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default was chosen to preserve the existing behavior of the library.

Use case that motivated this change is a connection that sends all application data early, then stays open mostly idle until it is closed because of a long idle timeout. At that point, sending additional PMTUD probes is usually not useful, because the connection is unlikely to send more data. In that situation, continued probing can just keep exercising the PTO/loss path without providing much benefit.

Comment thread quiche/src/pmtud.rs
self.smallest_failed_probe_size != Some(MIN_PLPMTU)
self.smallest_failed_probe_size != Some(MIN_PLPMTU) &&
self.pkts_since_last_probe
.is_none_or(|n| n >= self.pkts_between_probes)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More design question than objection: RFC 8899 spaces probes by time (≥1 RTT floor, PROBE_TIMER) or the idle-inhibit MAY in §4.3 ("no app data since previous probe") — not a packet count. And §3.7 is basically this bug: "Loss of a probe packet SHOULD NOT be treated as an indication of congestion and SHOULD NOT trigger a congestion control reaction." So the spec's own remedy is to keep lost probes out of the CC/PTO reaction rather than throttling probe cadence. Was a packet count chosen over either of those on purpose? It isn't non-conformant (§3 only mandates the ≥1-RTT floor), it just feels like it's damping the symptom while probe-loss-as-data-loss stays intact.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Packet count was not chosen over either of those. The intent is to add an additional configurable condition on top of the existing PMTUD probing logic, not to replace the RFC 8899 time-based spacing or idle-inhibit behavior.

This idea is taken from Google QUICHE, where packets_between_probes exists: QuicConnectionMtuDiscoverer uses a packet-count threshold, starting from a base value and doubling it after each MTU probe attempt before scheduling the next probe.

So this should be read as an extra configurable cadence guard, not as the primary RFC 8899 remedy for probe-loss handling.

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.

2 participants