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

Side by Side Diff: net/quic/congestion_control/tcp_cubic_sender_bytes.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) 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_sender_bytes.h" 5 #include "net/quic/congestion_control/tcp_cubic_sender_bytes.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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 DVLOG(1) << "Ignoring loss for largest_missing:" << packet_number 109 DVLOG(1) << "Ignoring loss for largest_missing:" << packet_number
110 << " because it was sent prior to the last CWND cutback."; 110 << " because it was sent prior to the last CWND cutback.";
111 return; 111 return;
112 } 112 }
113 ++stats_->tcp_loss_events; 113 ++stats_->tcp_loss_events;
114 last_cutback_exited_slowstart_ = InSlowStart(); 114 last_cutback_exited_slowstart_ = InSlowStart();
115 if (InSlowStart()) { 115 if (InSlowStart()) {
116 ++stats_->slowstart_packets_lost; 116 ++stats_->slowstart_packets_lost;
117 } 117 }
118 118
119 prr_.OnPacketLost(bytes_in_flight); 119 if (!no_prr_) {
120 prr_.OnPacketLost(bytes_in_flight);
121 }
120 122
121 // TODO(jri): Separate out all of slow start into a separate class. 123 // TODO(jri): Separate out all of slow start into a separate class.
122 if (slow_start_large_reduction_ && InSlowStart()) { 124 if (slow_start_large_reduction_ && InSlowStart()) {
123 DCHECK_LT(kDefaultTCPMSS, congestion_window_); 125 DCHECK_LT(kDefaultTCPMSS, congestion_window_);
124 if (FLAGS_quic_sslr_limit_reduction && 126 if (FLAGS_quic_sslr_limit_reduction &&
125 congestion_window_ >= 2 * initial_tcp_congestion_window_) { 127 congestion_window_ >= 2 * initial_tcp_congestion_window_) {
126 min_slow_start_exit_window_ = congestion_window_ / 2; 128 min_slow_start_exit_window_ = congestion_window_ / 2;
127 } 129 }
128 congestion_window_ = congestion_window_ - kDefaultTCPMSS; 130 congestion_window_ = congestion_window_ - kDefaultTCPMSS;
129 } else if (reno_) { 131 } else if (reno_) {
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 congestion_window_ = initial_tcp_congestion_window_; 215 congestion_window_ = initial_tcp_congestion_window_;
214 max_congestion_window_ = initial_max_tcp_congestion_window_; 216 max_congestion_window_ = initial_max_tcp_congestion_window_;
215 slowstart_threshold_ = initial_max_tcp_congestion_window_; 217 slowstart_threshold_ = initial_max_tcp_congestion_window_;
216 } 218 }
217 219
218 CongestionControlType TcpCubicSenderBytes::GetCongestionControlType() const { 220 CongestionControlType TcpCubicSenderBytes::GetCongestionControlType() const {
219 return reno_ ? kRenoBytes : kCubicBytes; 221 return reno_ ? kRenoBytes : kCubicBytes;
220 } 222 }
221 223
222 } // namespace net 224 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_sender_base.cc ('k') | net/quic/congestion_control/tcp_cubic_sender_bytes_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698