Skip to content

BBR3 clears congestion signals in Drain and floors its Reno probe time - #8810

Merged
kixelated merged 2 commits into
mainfrom
quest/m1/bbr3-references/transitions
Nov 15, 2026
Merged

kixelated merged 2 commits into
mainfrom
quest/m1/bbr3-references/transitions

Conversation

@kixelated

@kixelated kixelated commented Nov 15, 2026 •

Copy link
Copy Markdown
Collaborator

Finishes quest/m1/bbr3-references/transitions.md (deleted).

Summary

  • enter_drain calls reset_congestion_signals() as Linux does on Drain entry, so the loss or CE mark that ends Startup is charged once and no longer cuts bw_shortterm/inflight_shortterm again one loss round later in Drain.
  • target_inflight floors the BDP at max(bdp, offload_budget, min_pipe_cwnd) and then caps it at cwnd (Linux's bbr_target_inflight through bbr_inflight). is_reno_coexistence_probe_time rounds its packet count up, and drops its reno_rounds == 0 early return, which the floor makes unreachable.

Choices a review can undo

  • target_inflight is also read by handle_inflight_too_high (inflight_longterm = max(tx_in_flight, target * BETA)); it now sees the floored value. Linux does the same through bbr_target_inflight, so I changed the shared function rather than adding a Reno-only copy.
  • The floor uses the stored offload_budget (refreshed by every quantization_budget) rather than recomputing it, because is_reno_coexistence_probe_time takes &self. It omits ProbeBW_UP's +2 SMSS, since the check runs in Down/Cruise.
  • "Round up" is the packet-count division (div_ceil); bdp itself keeps its existing rounding to nearest.

Public API and wire impact

None. Behavior change inside moq-congestion's BBR3 only.

Validation

  • quest gate cargo test -p moq-congestion passes (377 tests); cargo clippy --all-targets and cargo fmt clean; quest check ok.
  • New drain_entry_clears_the_congestion_signals fails without the reset (bw_shortterm is 2.4 MB/s, not infinite, after the next loss round in Drain) and passes with it. New reno_probe_time_floors_a_small_bdp covers the floor, the offload budget, the cwnd cap, and round-up. The existing target_inflight assertion now expects the floored value.
  • Measurement with a temporary simulation test (not committed), 1 Mbit/s, 20 ms, 60 simulated seconds: ProbeBW Refill entries fell from 122 to 113. The simulated queue inflates the RTT, so the BDP is above the floor part of the time and the effect is small in this setup.

Caused by

  • moq-dev/moq#4921 - ported Drain entry without the signal reset and the Reno target without the floor from draft-06 (found by reference comparison).

Models

Size: XS
Implementer: Claude, claude-sonnet-5-5, unknown effort (arm A)

Follow-ups

None.

Review

Rewritten by quest review after each round.

  • Head: 60c030e

  • Base: origin/main at 23b8ba4

  • Risk: medium, the base has no RISK.md to name what is always high or customer-facing, so every change is medium

  • Classified: medium by default

  • Reviewer: Codex, gpt-6.1-sol, medium effort

  • Session: 01a1def2-bfb7-7f00-8487-1b7e1476c1d4, round 1

  • Score: 9/10, No actionable regressions were found; the changes are focused and include regression coverage, but builds and tests were not run as instructed.

  • Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0

  • Findings: none

kixelated and others added 2 commits November 15, 2026 03:20
…rs its Reno probe time

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@kixelated
kixelated marked this pull request as ready for review November 15, 2026 11:24
@coderabbitai

coderabbitai Bot commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 39 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 63e6df76-12fc-47d5-a845-9af0759b44e1
Commits

Reviewing files that changed from the base of the PR and between 64b621a and 60c030e.

Files selected for processing: 2

  • quest/m1/bbr3-references/transitions.md
  • rs/moq-congestion/src/bbr3/mod.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@pullfrog pullfrog Bot left a comment

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.

✅ No new issues found.

Reviewed changes

Reviewed BBR3's Drain entry and its Reno-coexistence target against the ACK pipeline order and Linux tcp_bbr.c.

  • Drain entry resets the congestion signals — enter_drain now calls reset_congestion_signals(). Both callers are safe. check_startup_done runs after update_congestion_signals, so the loss round that ended Startup has already run its Startup adapt step, which does nothing. handle_ce's Startup arm reads inflight_latest into inflight_longterm before the reset clears it.
  • Floored target_inflight — the target is now min(max(bdp, offload_budget, min_pipe_cwnd), cwnd), which matches bbr_target_inflight → bbr_inflight. It leaves out ProbeBW_UP's +2, which is correct because the Reno check runs in Down and Cruise. handle_inflight_too_high also sees the floored value, as it does in Linux.
  • Reno round count rounds up — the count now uses div_ceil(smss). The reno_rounds == 0 early return is gone; it can no longer be reached because min_pipe_cwnd sets a floor of at least one packet.
  • Tests — two new tests cover the Drain reset and each part of the floor: min_pipe_cwnd, the offload budget, the cwnd cap, and rounding up.

Pullfrog  | View workflow run | Using claude-opus-5-5 | 𝕏

@kixelated
kixelated added this pull request to the merge queue Nov 15, 2026
Merged via the queue into main with commit 844e8e8 Nov 15, 2026
10 checks passed
@kixelated
kixelated deleted the quest/m1/bbr3-references/transitions branch November 15, 2026 17:14
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.

1 participant