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

Unified Diff: net/quic/congestion_control/tcp_cubic_sender_packets.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_packets.cc
diff --git a/net/quic/congestion_control/tcp_cubic_sender_packets.cc b/net/quic/congestion_control/tcp_cubic_sender_packets.cc
index aee29ba1064cdc3efa7774fc6f6c5794cd111c01..0467963c487f528dd7cc3380b09dcb36eb83a67e 100644
--- a/net/quic/congestion_control/tcp_cubic_sender_packets.cc
+++ b/net/quic/congestion_control/tcp_cubic_sender_packets.cc
@@ -41,18 +41,24 @@ TcpCubicSenderPackets::TcpCubicSenderPackets(
slowstart_threshold_(max_tcp_congestion_window),
max_tcp_congestion_window_(max_tcp_congestion_window),
initial_tcp_congestion_window_(initial_tcp_congestion_window),
- initial_max_tcp_congestion_window_(max_tcp_congestion_window) {}
+ initial_max_tcp_congestion_window_(max_tcp_congestion_window),
+ min_slow_start_exit_window_(min_congestion_window_) {}
TcpCubicSenderPackets::~TcpCubicSenderPackets() {}
void TcpCubicSenderPackets::SetCongestionWindowFromBandwidthAndRtt(
QuicBandwidth bandwidth,
QuicTime::Delta rtt) {
- // Make sure CWND is in appropriate range (in case of bad data).
QuicPacketCount new_congestion_window =
bandwidth.ToBytesPerPeriod(rtt) / kDefaultTCPMSS;
- congestion_window_ = max(min(new_congestion_window, kMaxCongestionWindow),
- kMinCongestionWindowForBandwidthResumption);
+ if (FLAGS_quic_no_lower_bw_resumption_limit) {
+ // Limit new CWND to be in the range [1, kMaxCongestionWindow].
+ congestion_window_ = max(min_congestion_window_,
+ min(new_congestion_window, kMaxCongestionWindow));
+ } else {
+ congestion_window_ = max(min(new_congestion_window, kMaxCongestionWindow),
+ kMinCongestionWindowForBandwidthResumption);
+ }
}
void TcpCubicSenderPackets::SetCongestionWindowInPackets(
@@ -94,7 +100,7 @@ void TcpCubicSenderPackets::OnPacketLost(QuicPacketNumber packet_number,
(stats_->slowstart_bytes_lost - lost_bytes) / kDefaultTCPMSS) {
// Reduce congestion window by 1 for every mss of bytes lost.
congestion_window_ =
- max(congestion_window_ - 1, min_congestion_window_);
+ max(congestion_window_ - 1, min_slow_start_exit_window_);
}
slowstart_threshold_ = congestion_window_;
}
@@ -114,6 +120,10 @@ void TcpCubicSenderPackets::OnPacketLost(QuicPacketNumber packet_number,
// TODO(jri): Separate out all of slow start into a separate class.
if (slow_start_large_reduction_ && InSlowStart()) {
DCHECK_LT(1u, 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_ - 1;
} else if (reno_) {
congestion_window_ = congestion_window_ * RenoBeta();
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_sender_packets.h ('k') | net/quic/congestion_control/tcp_cubic_sender_packets_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698