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

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

Issue 1003863006: Rollback of merge internal change: 87346681. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Make_SentPacketManager_remove_pending_88507368
Patch Set: Created 5 years, 9 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_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;
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_bytes_sender.h ('k') | net/quic/congestion_control/tcp_cubic_bytes_sender_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698