Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 0 additions & 48 deletions quest/m1/bbr3-references/README.md

This file was deleted.

6 changes: 3 additions & 3 deletions quest/m3/vendor-sync/quinn.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ a rebase onto `c7b46a96` whose BBR3 commits match `01b8848d`, so it has
nothing to port; recorded in the ledger. Of the nine `main` commits since `aea1e538`, check
[`aa61ce99`](https://github.com/quinn-rs/quinn/commit/aa61ce996b97b21c63731a84fac1346c2d70852b) (late
ACK-only packets are not spurious losses) against BBR3's spurious-loss undo
first. The [BBR3 references epic](/quest/m1/bbr3-references/README.md) adds
Google Linux BBRv3, draft-ietf-ccwg-bbr, and QUICHE BBR3 heads to the ledger;
recheck them with quinn#2481 each run.
first. The ledger's `BBR3 references` entry holds the Google Linux BBRv3,
draft-ietf-ccwg-bbr, and QUICHE BBR3 heads; recheck them with quinn#2481 each
run, and record any divergence a change to them adds there.

Learned: a fix missing from the ledger is often already held, since the fork
reworked the same code (`stop` under `RESET_STREAM_AT`, the stale-accept
Expand Down
1 change: 1 addition & 0 deletions rs/moq-congestion/src/bbr3/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1168,6 +1168,7 @@ impl Bbr3 {

/// equivalent to BBRIsTimeToGoDown <https://www.ietf.org/archive/id/draft-ietf-ccwg-bbr-07.html#section-5.3.3.9>
fn maybe_go_down(&mut self, newly_acked: u64) -> bool {
// The ACK's bytes still count as in flight, as Linux's `prior_in_flight` does.
let pre_ack_inflight = self.inflight.saturating_add(newly_acked);
if self.prev_probe_too_high && pre_ack_inflight >= self.inflight_longterm {
self.prev_probe_precautionary = true;
Expand Down
15 changes: 13 additions & 2 deletions rs/moq-quic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,18 @@ Changes on top of the upstream commit, besides the renames:
- **No early data**: TLS never offers or accepts 0-RTT, and early packets are discarded without decryption. The early keys, remembered transport parameters, stream rollback, and early-session driver APIs are removed. Session tickets still resume 1-RTT handshakes. MoQ's CONNECT and authorization already wait for the handshake.
- **BBR3**, from [quinn#2481](https://github.com/quinn-rs/quinn/pull/2481) at [`55f74c0d`](https://github.com/quinn-rs/quinn/pull/2481/commits/55f74c0dd0738b5ad7d7676c0b2869a547783f83) (open upstream), rebased onto the fork point with authorship kept. It replaces quinn's BBR and is the default controller. It carries the BBR correctness fixes moq-dev/noq shipped in `moq-noq` 1.3.1, and with them the `Controller` changes BBR needs: per-packet send and loss callbacks, `on_cwnd_limited`, `on_app_limited`, `on_ack_frequency_update`, and controller-owned pacing and burst size. `Metrics` rates are bytes per second.
- **BBR3 upstream refresh**: Checked against the force-pushed [`01b8848d`](https://github.com/quinn-rs/quinn/pull/2481/commits/01b8848dcb321eb17ad4d88dd6f84f28f45a0d6a) on 2026-10-31: carry startup's per-round ACK aggregation maximum, restore the saved window once when recovery ends, preserve it through recovery into ProbeRTT, saturate probe-bound growth, and stop a probe at the previous loss bound before accelerating again on clean feedback. Spurious-loss undo also restores that probe history, and an idle ACK renews application-limited marking even when it crosses the old marker. The two-cycle bandwidth filter and transport-owned packet snapshots already cover its other fixes. Upstream's bandwidth metric conversion to bits/s does not apply: this fork's controller metrics use bytes/s. Rechecked against the force-pushed [`0ebaf7e2`](https://github.com/quinn-rs/quinn/pull/2481/commits/0ebaf7e2c9932e432ef5e7caf916291b02d8277e) on 2026-11-14: a rebase onto quinn `main` at `c7b46a96` whose BBR3 commits match `01b8848d`, so nothing to port.
- **BBR3 loss samples**: a lost packet supplies its own inflight, loss, and application-limited state without borrowing or overwriting the ACK sample, including before the first ACK observation. This follows draft-06 and Google Linux BBRv3; upstream submission waits on quinn#2481 for the same callback adaptation as packet retirement.
- **BBR3 references**: moq-congestion's BBR3 follows [draft-ietf-ccwg-bbr-07](https://www.ietf.org/archive/id/draft-ietf-ccwg-bbr-07.html) (2026-11-02, the newest) wherever it has not deliberately diverged, and cites its sections throughout. It was compared on 2026-11-14 with [Google Linux BBRv3 `90210de4`](https://github.com/google/bbr/blob/90210de4b779d40496dee0b89081780eeddf2a60/net/ipv4/tcp_bbr.c) (the `v3` branch head, unchanged since 2025-03) and [QUICHE BBR3 `51a950db`](https://github.com/google/quiche/blob/51a950dba2100da7e7977aa97759470507d1ebb8/quiche/quic/core/congestion_control/bbr3_sender.cc) (`bbr3_sender.cc` and the rest of `congestion_control` unchanged since), and rechecked against the same heads on 2026-11-16. Each quinn sync rechecks all three heads with quinn#2481. Every bug that comparison confirmed is fixed with a regression test on the seeded, bufferbloat-shaped simulation: an idle gap restarts the ACK aggregation epoch, a controller hears an ACK's losses before the ACK, Startup counts a loss event per lost packet, ProbeRTT follows draft-07's 10 s schedule, and Drain clears the congestion signals. Deliberate divergences, each with its reason in the code:
- **Application-limited senders**, where MoQ's media senders differ from the bulk flows the references measure: an application-limited, uncongested flow skips a due ProbeRTT (as QUICHE BBRv1's `kBBR8` does) and adopts the expired window's lowest RTT, a spurious loss restoring whether it was congested; the max-bandwidth window ages on application-limited samples, once per longest probe wait, where draft-07 and Linux discard those below the maximum; application-limited rounds neither reset nor advance the full-bandwidth check and are counted for the bandwidth probe; and the probe's headroom (above). A reference behavior that conflicts with one keeps ours.
- **Send quantum** floors at one datagram, where draft-07 says two, since a pair would force packet pairs at rates where earning one takes longer than the round trip.
- **Loss state** is saved once per recovery episode, where draft-07's `NoteLoss` saves it for each loss round, which contradicts its prose and Linux's `bbr_ssthresh` and would save a model the episode already cut.
- **Bandwidth growth** resets the full-bandwidth baseline on any ACK whose sample grew 25%, counting plateau rounds only at round starts, as Linux does and draft-07 does not (it checks only the ACK that starts a round), so ACK aggregation cannot fake a plateau.
- **Linux, not the draft**: an idle restart zeroes the extra-ACKed bytes with the epoch's start, Drain entry resets the congestion signals, the Reno-coexistence round count floors the BDP by the offload budget and `BBR.MinPipeCwnd`, rounds up to packets, and caps at the window, the max-bandwidth filter keeps a cycle without samples, and the precautionary stop reads inflight with the ACK's bytes still counted, as `prior_in_flight`.
- **Draft-07's text, not its pseudocode**: the Reno round bound is picked from 62 or 63 as section 5.3.3.8.2 says, where `IsRenoCoexistenceProbeTime` hardcodes 63.
- **First `BBR.min_rtt_stamp`**: stamped by the first RTT sample, not at the connection's init as draft-07 does, so no connection enters ProbeRTT on its first ACK.
- **An interrupted probe**: ProbeRTT's entry pays the max-bandwidth window advance a bandwidth probe it cuts short still owes, which the draft never does, so a flow whose every probe ProbeRTT interrupts cannot keep a stale maximum.
- **Classic ECN**, **losses before their ACK**, and **bandwidth probing**: the entries around this one.
- Not compared, since only a measurement would settle them and the study that measured them was pruned ([moq-dev/moq#8423](https://github.com/moq-dev/moq/pull/8423)): when ProbeBW\_UP and DOWN end, the minimum loss events per round, the initial window, clamping samples by receive timestamps, and a CE ratio in place of one CE.
- **BBR3 loss samples**: a lost packet supplies its own inflight, loss, and application-limited state without borrowing or overwriting the ACK sample, including before the first ACK observation. This follows draft-07 and Google Linux BBRv3; upstream submission waits on quinn#2481 for the same callback adaptation as packet retirement.
- **BBR3 packet retirement**: per-space packet lookup and round-indexed expiry retire completed snapshots incrementally, preserving the extra ACK batch of metadata for late loss callbacks. The bounded indexes handle sparse packet numbers without walking the live flight. Upstream submission is deferred while quinn#2481 remains open: this fork also carries the packet-space and loss callback adaptations, so a port needs to target that implementation after its shape settles.
- **Classic ECN for BBR3**, ported from [moq-dev/noq#12](https://github.com/moq-dev/noq/pull/12): CE exits Startup, stops a bandwidth probe, or lowers the short-term model, once per recovery episode, instead of counting as a loss.
- **Losses before their ACK**: `on_ack_received` reports the losses an ACK reveals to the controller before the ACK itself, as RFC 9002's OnAckReceived and Linux order them, where quinn reports the ACK first. A loss response, such as BBR3 leaving `ProbeBW_UP` or Cubic starting recovery, then shapes the same ACK's processing, and BBR3 cuts its short-term model once per loss round. Not offered upstream yet.
Expand Down Expand Up @@ -108,7 +119,7 @@ Changes on top of the upstream commit, besides the renames:
- **Exact anti-amplification limit**: an unvalidated path never sends past three times what it received (RFC 9000 section 8.1). quinn lets a whole path-MTU datagram through while any budget is left, the workaround for [quinn#1082](https://github.com/quinn-rs/quinn/issues/1082), which overshoots by up to a datagram; here no datagram outgrows the budget left, so a path MTU past the whole budget still sends smaller ones instead of stalling. An Initial that must be padded to 1200 bytes waits when the budget cannot carry it, and a PATH\_CHALLENGE or PATH\_RESPONSE datagram is padded only as far as the budget allows, as section 8.2.1 permits; when that leaves a challenge short of 1200 bytes, its PATH\_RESPONSE validates the address and a fresh challenge then confirms the path carries 1200 bytes, as the same section requires. A 1-RTT packet needs less room than `MIN_PACKET_SPACE` (`MIN_SHORT_PACKET_SPACE`), so a small budget still carries a close or a challenge. Not offered upstream yet.
- **ACK-only packets stay ACK-only**: a packet planned with nothing ack-eliciting skips the congestion window, so `populate_packet` writes nothing after its ACK. quinn adds an unvalidated path's repeated PATH\_CHALLENGE and a pending STREAMS\_BLOCKED to such a packet, which then counts in flight past the window (RFC 9002 section 7). A pending STREAMS\_BLOCKED now counts as something to send, and an open past the limit queues it once per limit instead of on every refusal. Not offered upstream yet.

Recheck the BBR3 changes when porting quinn#2481 updates, or if it merges.
Recheck the BBR3 changes when porting quinn#2481 updates, or if it merges, and the BBR3 reference heads above at each sync.

### ACK frequency

Expand Down