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

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

Issue 2002103002: Implement a QUIC No PRR connection option, NPRR. Protected by FLAGS_quic_allow_no_prr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@122422703
Patch Set: Created 4 years, 7 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_sender_packets.h" 5 #include "net/quic/congestion_control/tcp_cubic_sender_packets.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/metrics/histogram_macros.h" 9 #include "base/metrics/histogram_macros.h"
10 #include "net/quic/congestion_control/prr_sender.h" 10 #include "net/quic/congestion_control/prr_sender.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 DVLOG(1) << "Ignoring loss for largest_missing:" << packet_number 111 DVLOG(1) << "Ignoring loss for largest_missing:" << packet_number
112 << " because it was sent prior to the last CWND cutback."; 112 << " because it was sent prior to the last CWND cutback.";
113 return; 113 return;
114 } 114 }
115 ++stats_->tcp_loss_events; 115 ++stats_->tcp_loss_events;
116 last_cutback_exited_slowstart_ = InSlowStart(); 116 last_cutback_exited_slowstart_ = InSlowStart();
117 if (InSlowStart()) { 117 if (InSlowStart()) {
118 ++stats_->slowstart_packets_lost; 118 ++stats_->slowstart_packets_lost;
119 } 119 }
120 120
121 prr_.OnPacketLost(bytes_in_flight); 121 if (!no_prr_) {
122 prr_.OnPacketLost(bytes_in_flight);
123 }
122 124
123 // TODO(jri): Separate out all of slow start into a separate class. 125 // TODO(jri): Separate out all of slow start into a separate class.
124 if (slow_start_large_reduction_ && InSlowStart()) { 126 if (slow_start_large_reduction_ && InSlowStart()) {
125 DCHECK_LT(1u, congestion_window_); 127 DCHECK_LT(1u, congestion_window_);
126 if (FLAGS_quic_sslr_limit_reduction && 128 if (FLAGS_quic_sslr_limit_reduction &&
127 congestion_window_ >= 2 * initial_tcp_congestion_window_) { 129 congestion_window_ >= 2 * initial_tcp_congestion_window_) {
128 min_slow_start_exit_window_ = congestion_window_ / 2; 130 min_slow_start_exit_window_ = congestion_window_ / 2;
129 } 131 }
130 congestion_window_ = congestion_window_ - 1; 132 congestion_window_ = congestion_window_ - 1;
131 } else if (reno_) { 133 } else if (reno_) {
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 congestion_window_ = initial_tcp_congestion_window_; 216 congestion_window_ = initial_tcp_congestion_window_;
215 slowstart_threshold_ = initial_max_tcp_congestion_window_; 217 slowstart_threshold_ = initial_max_tcp_congestion_window_;
216 max_tcp_congestion_window_ = initial_max_tcp_congestion_window_; 218 max_tcp_congestion_window_ = initial_max_tcp_congestion_window_;
217 } 219 }
218 220
219 CongestionControlType TcpCubicSenderPackets::GetCongestionControlType() const { 221 CongestionControlType TcpCubicSenderPackets::GetCongestionControlType() const {
220 return reno_ ? kReno : kCubic; 222 return reno_ ? kReno : kCubic;
221 } 223 }
222 224
223 } // namespace net 225 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698