Skip to content

Commit

Permalink
Do not update short-term model when probing for bandwidth
Browse files Browse the repository at this point in the history
Summary: As title.

Reviewed By: sharmafb

Differential Revision: D68845837

fbshipit-source-id: bac4561ffa804b4976978d02351b00a8a886dbb2
  • Loading branch information
jbeshay authored and facebook-github-bot committed Jan 30, 2025
1 parent e232035 commit 2ba5e91
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
15 changes: 10 additions & 5 deletions quic/congestion_control/Bbr2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ void Bbr2CongestionController::setAppLimited() noexcept {
void Bbr2CongestionController::resetCongestionSignals() {
lossBytesInRound_ = 0;
lossEventsInRound_ = 0;
largestLostPacketNumInRound_ = 0;
bandwidthLatest_ = Bandwidth();
inflightLatest_ = 0;
}
Expand Down Expand Up @@ -407,11 +408,7 @@ void Bbr2CongestionController::updateCongestionSignals(
if (!lossRoundStart_) {
return; // we're still within the same round
}
// AdaptLowerBoundsFromCongestion - once per round-trip
if (state_ == State::ProbeBw_Up) {
return;
}
if (lossBytesInRound_ > 0) {
if (lossBytesInRound_ > 0 && !isProbingBandwidth(state_)) {
// InitLowerBounds
if (!bandwidthLo_.has_value()) {
bandwidthLo_ = maxBwFilter_.GetBest();
Expand Down Expand Up @@ -908,6 +905,14 @@ bool Bbr2CongestionController::isProbeBwState(
state == Bbr2CongestionController::State::ProbeBw_Up);
}

bool Bbr2CongestionController::isProbingBandwidth(
const Bbr2CongestionController::State state) {
return (
state == Bbr2CongestionController::State::ProbeBw_Up ||
state == Bbr2CongestionController::State::ProbeBw_Refill ||
state == Bbr2CongestionController::State::Startup);
}

Bandwidth Bbr2CongestionController::getBandwidthSampleFromAck(
const AckEvent& ackEvent) {
auto ackTime = ackEvent.adjustedAckTime;
Expand Down
1 change: 1 addition & 0 deletions quic/congestion_control/Bbr2.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ class Bbr2CongestionController : public CongestionController {
[[nodiscard]] uint64_t addQuantizationBudget(uint64_t input) const;

bool isProbeBwState(const Bbr2CongestionController::State state);
bool isProbingBandwidth(const Bbr2CongestionController::State state);
Bandwidth getBandwidthSampleFromAck(const AckEvent& ackEvent);
bool isRenoCoexistenceProbeTime();

Expand Down

0 comments on commit 2ba5e91

Please sign in to comment.