| Index: net/quic/congestion_control/tcp_cubic_bytes_sender.cc
|
| diff --git a/net/quic/congestion_control/tcp_cubic_bytes_sender.cc b/net/quic/congestion_control/tcp_cubic_bytes_sender.cc
|
| index c92da79735b7e60ce38382eece3bc03afc2be6b2..64737226f8c0faa95a256a0ff75399461cefb8b0 100644
|
| --- a/net/quic/congestion_control/tcp_cubic_bytes_sender.cc
|
| +++ b/net/quic/congestion_control/tcp_cubic_bytes_sender.cc
|
| @@ -31,6 +31,7 @@ TcpCubicBytesSender::TcpCubicBytesSender(
|
| const RttStats* rtt_stats,
|
| bool reno,
|
| QuicPacketCount initial_tcp_congestion_window,
|
| + QuicPacketCount max_congestion_window,
|
| QuicConnectionStats* stats)
|
| : hybrid_slow_start_(clock),
|
| cubic_(clock),
|
| @@ -44,6 +45,7 @@ TcpCubicBytesSender::TcpCubicBytesSender(
|
| largest_sent_at_last_cutback_(0),
|
| congestion_window_(initial_tcp_congestion_window * kMaxSegmentSize),
|
| min_congestion_window_(kDefaultMinimumCongestionWindow),
|
| + max_congestion_window_(max_congestion_window * kMaxSegmentSize),
|
| slowstart_threshold_(std::numeric_limits<uint64>::max()),
|
| last_cutback_exited_slowstart_(false),
|
| clock_(clock) {
|
| @@ -92,8 +94,7 @@ bool TcpCubicBytesSender::ResumeConnectionState(
|
| // Make sure CWND is in appropriate range (in case of bad data).
|
| QuicByteCount new_congestion_window = bandwidth.ToBytesPerPeriod(rtt_ms);
|
| congestion_window_ =
|
| - max(min(new_congestion_window,
|
| - kMaxCongestionWindowForBandwidthResumption * kMaxSegmentSize),
|
| + max(min(new_congestion_window, kMaxTcpCongestionWindow * kMaxSegmentSize),
|
| kMinCongestionWindowForBandwidthResumption * kMaxSegmentSize);
|
|
|
| // TODO(rjshade): Set appropriate CWND when previous connection was in slow
|
| @@ -304,6 +305,9 @@ void TcpCubicBytesSender::MaybeIncreaseCwnd(
|
| // window we have available.
|
| return;
|
| }
|
| + if (congestion_window_ >= max_congestion_window_) {
|
| + return;
|
| + }
|
| if (InSlowStart()) {
|
| // TCP slow start, exponential growth, increase by one for each ACK.
|
| congestion_window_ += kMaxSegmentSize;
|
|
|