gfe-relnote: In QUIC, do not inject bandwidth in BbrSender::AdjustNetworkParameters. Also use min rtt instead of srtt when calculating new cwnd. Protected by gfe2_reloadable_flag_quic_bbr_donot_inject_bandwidth.
PiperOrigin-RevId: 279119475
Change-Id: I6bca045fd27926321e1984b41849dd406f6fe6ab
diff --git a/quic/core/congestion_control/bbr_sender.cc b/quic/core/congestion_control/bbr_sender.cc
index b9a259a..478339a 100644
--- a/quic/core/congestion_control/bbr_sender.cc
+++ b/quic/core/congestion_control/bbr_sender.cc
@@ -332,7 +332,9 @@
void BbrSender::AdjustNetworkParameters(QuicBandwidth bandwidth,
QuicTime::Delta rtt,
bool allow_cwnd_to_decrease) {
- if (!bandwidth.IsZero()) {
+ if (GetQuicReloadableFlag(quic_bbr_donot_inject_bandwidth)) {
+ QUIC_RELOADABLE_FLAG_COUNT(quic_bbr_donot_inject_bandwidth);
+ } else if (!bandwidth.IsZero()) {
max_bandwidth_.Update(bandwidth, round_trip_count_);
}
if (!rtt.IsZero() && (min_rtt_ > rtt || min_rtt_.IsZero())) {
@@ -346,10 +348,13 @@
3);
return;
}
- const QuicByteCount new_cwnd =
- std::max(kMinInitialCongestionWindow * kDefaultTCPMSS,
- std::min(kMaxInitialCongestionWindow * kDefaultTCPMSS,
- bandwidth * rtt_stats_->SmoothedOrInitialRtt()));
+ const QuicByteCount new_cwnd = std::max(
+ kMinInitialCongestionWindow * kDefaultTCPMSS,
+ std::min(
+ kMaxInitialCongestionWindow * kDefaultTCPMSS,
+ bandwidth * (GetQuicReloadableFlag(quic_bbr_donot_inject_bandwidth)
+ ? GetMinRtt()
+ : rtt_stats_->SmoothedOrInitialRtt())));
if (!rtt_stats_->smoothed_rtt().IsZero()) {
QUIC_CODE_COUNT(quic_smoothed_rtt_available);
} else if (rtt_stats_->initial_rtt() !=