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 623cfb78337ba35687af39a48cccec3a37ad2e64..d02ab68e1e2b4388d7506fa41465deab59ce56ad 100644 |
--- a/net/quic/core/congestion_control/bbr_sender.cc |
+++ b/net/quic/core/congestion_control/bbr_sender.cc |
@@ -145,11 +145,17 @@ QuicTime::Delta BbrSender::TimeUntilSend(QuicTime /* now */, |
return QuicTime::Delta::Infinite(); |
} |
-QuicBandwidth BbrSender::PacingRate(QuicByteCount /*bytes_in_flight*/) const { |
+QuicBandwidth BbrSender::PacingRate(QuicByteCount bytes_in_flight) const { |
if (pacing_rate_.IsZero()) { |
return kHighGain * QuicBandwidth::FromBytesAndTimeDelta( |
initial_congestion_window_, GetMinRtt()); |
} |
+ if (FLAGS_quic_reloadable_flag_quic_bbr_keep_sending_at_recent_rate && |
+ 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(); |
+ } |
return pacing_rate_; |
} |
@@ -166,6 +172,15 @@ QuicByteCount BbrSender::GetCongestionWindow() const { |
return std::min(congestion_window_, recovery_window_); |
} |
+ if (FLAGS_quic_reloadable_flag_quic_bbr_keep_sending_at_recent_rate && |
+ mode_ == PROBE_BW) { |
+ 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. |
+ return congestion_window_ + |
+ max_bandwidth_.GetThirdBest() * rtt_stats_->smoothed_rtt(); |
+ } |
+ |
return congestion_window_; |
} |