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

Side by Side Diff: net/quic/congestion_control/tcp_cubic_bytes_sender.cc

Issue 1660593004: Landing Recent QUIC changes until 01/28/2016 18:41 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final_0202
Patch Set: Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/congestion_control/tcp_cubic_bytes_sender.h" 5 #include "net/quic/congestion_control/tcp_cubic_bytes_sender.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "net/quic/congestion_control/prr_sender.h" 9 #include "net/quic/congestion_control/prr_sender.h"
10 #include "net/quic/congestion_control/rtt_stats.h" 10 #include "net/quic/congestion_control/rtt_stats.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 } 176 }
177 ++stats_->tcp_loss_events; 177 ++stats_->tcp_loss_events;
178 last_cutback_exited_slowstart_ = InSlowStart(); 178 last_cutback_exited_slowstart_ = InSlowStart();
179 if (InSlowStart()) { 179 if (InSlowStart()) {
180 ++stats_->slowstart_packets_lost; 180 ++stats_->slowstart_packets_lost;
181 } 181 }
182 182
183 prr_.OnPacketLost(bytes_in_flight); 183 prr_.OnPacketLost(bytes_in_flight);
184 184
185 // TODO(jri): Separate out all of slow start into a separate class. 185 // TODO(jri): Separate out all of slow start into a separate class.
186 if (slow_start_large_reduction_) { 186 if (slow_start_large_reduction_ && InSlowStart()) {
187 DCHECK_LT(kDefaultTCPMSS, congestion_window_); 187 DCHECK_LT(kDefaultTCPMSS, congestion_window_);
188 congestion_window_ = congestion_window_ - kDefaultTCPMSS; 188 congestion_window_ = congestion_window_ - kDefaultTCPMSS;
189 } else if (reno_) { 189 } else if (reno_) {
190 congestion_window_ = congestion_window_ * RenoBeta(); 190 congestion_window_ = congestion_window_ * RenoBeta();
191 } else { 191 } else {
192 congestion_window_ = 192 congestion_window_ =
193 cubic_.CongestionWindowAfterPacketLoss(congestion_window_); 193 cubic_.CongestionWindowAfterPacketLoss(congestion_window_);
194 } 194 }
195 // Enforce TCP's minimum congestion window of 2*MSS. 195 // Enforce TCP's minimum congestion window of 2*MSS.
196 if (congestion_window_ < min_congestion_window_) { 196 if (congestion_window_ < min_congestion_window_) {
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 largest_sent_packet_number_ = 0; 380 largest_sent_packet_number_ = 0;
381 largest_acked_packet_number_ = 0; 381 largest_acked_packet_number_ = 0;
382 largest_sent_at_last_cutback_ = 0; 382 largest_sent_at_last_cutback_ = 0;
383 congestion_window_ = initial_tcp_congestion_window_; 383 congestion_window_ = initial_tcp_congestion_window_;
384 max_congestion_window_ = initial_max_tcp_congestion_window_; 384 max_congestion_window_ = initial_max_tcp_congestion_window_;
385 slowstart_threshold_ = initial_max_tcp_congestion_window_; 385 slowstart_threshold_ = initial_max_tcp_congestion_window_;
386 last_cutback_exited_slowstart_ = false; 386 last_cutback_exited_slowstart_ = false;
387 } 387 }
388 388
389 } // namespace net 389 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/congestion_control/loss_detection_interface.cc ('k') | net/quic/congestion_control/tcp_cubic_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698