Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(232)

Unified Diff: net/quic/core/congestion_control/bbr_sender.cc

Issue 2823083004: Base QUIC BBR's CWND on SRTT instead of min_rtt. Protected by FLAGS_quic_reloadable_flag_quic_base… (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/quic/core/congestion_control/bbr_sender_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « no previous file | net/quic/core/congestion_control/bbr_sender_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698