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

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

Issue 2962033002: Add a new connection option(BBRR) to enable BBR's rate based recovery. Protected by FLAGS_quic_rel… (Closed)
Patch Set: Rebase Created 3 years, 6 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 | « net/quic/core/congestion_control/bbr_sender.h ('k') | net/quic/core/crypto/crypto_protocol.h » ('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 fb02690df2c09e47daeb4051b413be3b429cfa45..3f3714ef14c8ace3d0a3af5d543f2d4f6a202c51 100644
--- a/net/quic/core/congestion_control/bbr_sender.cc
+++ b/net/quic/core/congestion_control/bbr_sender.cc
@@ -119,7 +119,8 @@ BbrSender::BbrSender(const RttStats* rtt_stats,
recovery_state_(NOT_IN_RECOVERY),
end_recovery_at_(0),
recovery_window_(max_congestion_window_),
- bytes_recently_acked_(0) {
+ bytes_recently_acked_(0),
+ rate_based_recovery_(false) {
EnterStartupMode();
}
@@ -204,7 +205,7 @@ QuicByteCount BbrSender::GetCongestionWindow() const {
return kMinimumCongestionWindow;
}
- if (InRecovery()) {
+ if (InRecovery() && !rate_based_recovery_) {
return std::min(congestion_window_, recovery_window_);
}
@@ -227,6 +228,10 @@ void BbrSender::SetFromConfig(const QuicConfig& config,
if (config.HasClientRequestedIndependentOption(k2RTT, perspective)) {
num_startup_rtts_ = 2;
}
+ if (FLAGS_quic_reloadable_flag_quic_bbr_rate_recovery &&
+ config.HasClientRequestedIndependentOption(kBBRR, perspective)) {
+ rate_based_recovery_ = true;
+ }
}
void BbrSender::ResumeConnectionState(
@@ -610,6 +615,10 @@ void BbrSender::CalculatePacingRate() {
}
QuicBandwidth target_rate = pacing_gain_ * BandwidthEstimate();
+ if (rate_based_recovery_ && InRecovery()) {
+ QUIC_FLAG_COUNT(quic_reloadable_flag_quic_bbr_rate_recovery);
+ pacing_rate_ = pacing_gain_ * max_bandwidth_.GetThirdBest();
+ }
if (is_at_full_bandwidth_) {
pacing_rate_ = target_rate;
return;
@@ -680,6 +689,9 @@ void BbrSender::CalculateCongestionWindow(QuicByteCount bytes_acked) {
void BbrSender::CalculateRecoveryWindow(QuicByteCount bytes_acked,
QuicByteCount bytes_lost) {
+ if (rate_based_recovery_) {
+ return;
+ }
if (FLAGS_quic_reloadable_flag_quic_bbr_fix_conservation2) {
if (recovery_state_ == NOT_IN_RECOVERY) {
return;
« no previous file with comments | « net/quic/core/congestion_control/bbr_sender.h ('k') | net/quic/core/crypto/crypto_protocol.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698