Index: net/quic/core/congestion_control/bbr_sender.cc |
diff --git a/net/quic/core/congestion_control/bbr_sender.cc b/net/quic/core/congestion_control/bbr_sender.cc |
index d02ab68e1e2b4388d7506fa41465deab59ce56ad..c6e89c9df9f87ad91c1fea1767c2e11f420c9f28 100644 |
--- a/net/quic/core/congestion_control/bbr_sender.cc |
+++ b/net/quic/core/congestion_control/bbr_sender.cc |
@@ -154,7 +154,11 @@ QuicBandwidth BbrSender::PacingRate(QuicByteCount bytes_in_flight) const { |
mode_ == PROBE_BW && bytes_in_flight > congestion_window_) { |
QUIC_FLAG_COUNT_N(quic_reloadable_flag_quic_bbr_keep_sending_at_recent_rate, |
1, 2); |
- return max_bandwidth_.GetThirdBest(); |
+ if (pacing_gain_ > 1) { |
+ return max_bandwidth_.GetBest(); |
+ } else { |
+ return max_bandwidth_.GetThirdBest(); |
+ } |
} |
return pacing_rate_; |
} |
@@ -173,7 +177,7 @@ QuicByteCount BbrSender::GetCongestionWindow() const { |
} |
if (FLAGS_quic_reloadable_flag_quic_bbr_keep_sending_at_recent_rate && |
- mode_ == PROBE_BW) { |
+ mode_ == PROBE_BW && pacing_gain_ >= 1) { |
QUIC_FLAG_COUNT_N(quic_reloadable_flag_quic_bbr_keep_sending_at_recent_rate, |
2, 2); |
// Send for another SRTT at a more recently measured bandwidth. |
@@ -294,6 +298,10 @@ QuicTime::Delta BbrSender::GetMinRtt() const { |
QuicByteCount BbrSender::GetTargetCongestionWindow(float gain) const { |
QuicByteCount bdp = GetMinRtt() * BandwidthEstimate(); |
+ if (FLAGS_quic_reloadable_flag_quic_bbr_base_cwnd_on_srtt && |
+ mode_ == PROBE_BW && gain >= 1 && !rtt_stats_->smoothed_rtt().IsZero()) { |
+ bdp = rtt_stats_->smoothed_rtt() * BandwidthEstimate(); |
+ } |
QuicByteCount congestion_window = gain * bdp; |
// BDP estimate will be zero if no bandwidth samples are available yet. |