Skip to content

Commit

Permalink
Ensure pacer state is reset when bbr2 is initialized
Browse files Browse the repository at this point in the history
Summary:
As title.

Without resetting the pacer, bbr2 inherits the pacer state that was active on the connection until it starts to receive acks. This can happen when bbr2 is enabled using a knob which arrives after another congestion controller was already active.

Reviewed By: ritengupta

Differential Revision: D65922676

fbshipit-source-id: e798eaaa9e1bba4b2e23f9edcac0181eb5d4a4c7
  • Loading branch information
jbeshay authored and facebook-github-bot committed Nov 16, 2024
1 parent 51c7964 commit 348ed57
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion quic/congestion_control/Bbr2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,15 @@ Bbr2CongestionController::Bbr2CongestionController(
conn_.udpSendPacketLen * conn_.transportSettings.initCwndInMss) {
resetCongestionSignals();
resetLowerBounds();
// Start with the default pacing settings.
// If we explicitly don't want to pace the init cwnd, reset the pacing rate.
// Otherwise, leave it to the pacer's initial state.
if (!conn_.transportSettings.ccaConfig.paceInitCwnd) {
if (conn_.pacer) {
conn_.pacer->refreshPacingRate(cwndBytes_, 0us);
} else {
LOG(WARNING) << "BBR2 was initialized on a connection without a pacer";
}
}
enterStartup();
}

Expand Down

0 comments on commit 348ed57

Please sign in to comment.