| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |