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

Unified Diff: net/quic/congestion_control/tcp_cubic_sender_bytes.cc

Issue 1918953003: Landing Recent QUIC changes until 4/22/2016 14:55 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Deleted SpdyFramerTests missed while mergeing 120451808 Created 4 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
Index: net/quic/congestion_control/tcp_cubic_sender_bytes.cc
diff --git a/net/quic/congestion_control/tcp_cubic_sender_bytes.cc b/net/quic/congestion_control/tcp_cubic_sender_bytes.cc
index 863def3b366bd2b7bbf3576ef47e94fe1914c74c..7b0341d720f8acfa4ea693613cc1ee48671fe84d 100644
--- a/net/quic/congestion_control/tcp_cubic_sender_bytes.cc
+++ b/net/quic/congestion_control/tcp_cubic_sender_bytes.cc
@@ -42,18 +42,25 @@ TcpCubicSenderBytes::TcpCubicSenderBytes(
initial_tcp_congestion_window_(initial_tcp_congestion_window *
kDefaultTCPMSS),
initial_max_tcp_congestion_window_(max_congestion_window *
- kDefaultTCPMSS) {}
+ kDefaultTCPMSS),
+ min_slow_start_exit_window_(min_congestion_window_) {}
TcpCubicSenderBytes::~TcpCubicSenderBytes() {}
void TcpCubicSenderBytes::SetCongestionWindowFromBandwidthAndRtt(
QuicBandwidth bandwidth,
QuicTime::Delta rtt) {
- // Make sure CWND is in appropriate range (in case of bad data).
QuicByteCount new_congestion_window = bandwidth.ToBytesPerPeriod(rtt);
- congestion_window_ =
- max(min(new_congestion_window, kMaxCongestionWindow * kDefaultTCPMSS),
- kMinCongestionWindowForBandwidthResumption * kDefaultTCPMSS);
+ if (FLAGS_quic_no_lower_bw_resumption_limit) {
+ // Limit new CWND if needed.
+ congestion_window_ =
+ max(min_congestion_window_,
+ min(new_congestion_window, kMaxCongestionWindow * kDefaultTCPMSS));
+ } else {
+ congestion_window_ =
+ max(min(new_congestion_window, kMaxCongestionWindow * kDefaultTCPMSS),
+ kMinCongestionWindowForBandwidthResumption * kDefaultTCPMSS);
+ }
}
void TcpCubicSenderBytes::SetCongestionWindowInPackets(
@@ -92,7 +99,7 @@ void TcpCubicSenderBytes::OnPacketLost(QuicPacketNumber packet_number,
if (slow_start_large_reduction_) {
// Reduce congestion window by lost_bytes for every loss.
congestion_window_ =
- max(congestion_window_ - lost_bytes, min_congestion_window_);
+ max(congestion_window_ - lost_bytes, min_slow_start_exit_window_);
slowstart_threshold_ = congestion_window_;
}
}
@@ -111,6 +118,10 @@ void TcpCubicSenderBytes::OnPacketLost(QuicPacketNumber packet_number,
// TODO(jri): Separate out all of slow start into a separate class.
if (slow_start_large_reduction_ && InSlowStart()) {
DCHECK_LT(kDefaultTCPMSS, congestion_window_);
+ if (FLAGS_quic_sslr_limit_reduction &&
+ congestion_window_ >= 2 * initial_tcp_congestion_window_) {
+ min_slow_start_exit_window_ = congestion_window_ / 2;
+ }
congestion_window_ = congestion_window_ - kDefaultTCPMSS;
} else if (reno_) {
congestion_window_ = congestion_window_ * RenoBeta();
@@ -118,7 +129,6 @@ void TcpCubicSenderBytes::OnPacketLost(QuicPacketNumber packet_number,
congestion_window_ =
cubic_.CongestionWindowAfterPacketLoss(congestion_window_);
}
- // Enforce TCP's minimum congestion window of 2*MSS.
if (congestion_window_ < min_congestion_window_) {
congestion_window_ = min_congestion_window_;
}
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_sender_bytes.h ('k') | net/quic/congestion_control/tcp_cubic_sender_bytes_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698