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

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

Issue 1531543004: Fix a bug protected by gfe2_reloadable_flag_quic_respect_send_alarm where acks would not be sent im… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@110021608
Patch Set: Created 5 years 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
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_bytes_sender.cc ('k') | net/quic/quic_connection.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.h" 5 #include "net/quic/congestion_control/tcp_cubic_sender.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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 largest_sent_packet_number_ = packet_number; 224 largest_sent_packet_number_ = packet_number;
225 hybrid_slow_start_.OnPacketSent(packet_number); 225 hybrid_slow_start_.OnPacketSent(packet_number);
226 return true; 226 return true;
227 } 227 }
228 228
229 QuicTime::Delta TcpCubicSender::TimeUntilSend( 229 QuicTime::Delta TcpCubicSender::TimeUntilSend(
230 QuicTime /* now */, 230 QuicTime /* now */,
231 QuicByteCount bytes_in_flight, 231 QuicByteCount bytes_in_flight,
232 HasRetransmittableData has_retransmittable_data) const { 232 HasRetransmittableData has_retransmittable_data) const {
233 if (has_retransmittable_data == NO_RETRANSMITTABLE_DATA) { 233 if (has_retransmittable_data == NO_RETRANSMITTABLE_DATA) {
234 DCHECK(!FLAGS_quic_respect_send_alarm2);
234 // For TCP we can always send an ACK immediately. 235 // For TCP we can always send an ACK immediately.
235 return QuicTime::Delta::Zero(); 236 return QuicTime::Delta::Zero();
236 } 237 }
237 if (InRecovery()) { 238 if (InRecovery()) {
238 // PRR is used when in recovery. 239 // PRR is used when in recovery.
239 return prr_.TimeUntilSend(GetCongestionWindow(), bytes_in_flight, 240 return prr_.TimeUntilSend(GetCongestionWindow(), bytes_in_flight,
240 slowstart_threshold_ * kDefaultTCPMSS); 241 slowstart_threshold_ * kDefaultTCPMSS);
241 } 242 }
242 if (GetCongestionWindow() > bytes_in_flight) { 243 if (GetCongestionWindow() > bytes_in_flight) {
243 return QuicTime::Delta::Zero(); 244 return QuicTime::Delta::Zero();
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 slowstart_threshold_ = initial_max_tcp_congestion_window_; 375 slowstart_threshold_ = initial_max_tcp_congestion_window_;
375 last_cutback_exited_slowstart_ = false; 376 last_cutback_exited_slowstart_ = false;
376 max_tcp_congestion_window_ = initial_max_tcp_congestion_window_; 377 max_tcp_congestion_window_ = initial_max_tcp_congestion_window_;
377 } 378 }
378 379
379 CongestionControlType TcpCubicSender::GetCongestionControlType() const { 380 CongestionControlType TcpCubicSender::GetCongestionControlType() const {
380 return reno_ ? kReno : kCubic; 381 return reno_ ? kReno : kCubic;
381 } 382 }
382 383
383 } // namespace net 384 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_bytes_sender.cc ('k') | net/quic/quic_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698