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

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

Issue 1313623006: relnote: Don't add burst tokens to QUIC's PacingSender when in recovery. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « no previous file | net/quic/congestion_control/pacing_sender_test.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/pacing_sender.h" 5 #include "net/quic/congestion_control/pacing_sender.h"
6 6
7 using std::min; 7 using std::min;
8 8
9 namespace net { 9 namespace net {
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 QuicByteCount bytes_in_flight, 55 QuicByteCount bytes_in_flight,
56 QuicPacketNumber packet_number, 56 QuicPacketNumber packet_number,
57 QuicByteCount bytes, 57 QuicByteCount bytes,
58 HasRetransmittableData has_retransmittable_data) { 58 HasRetransmittableData has_retransmittable_data) {
59 const bool in_flight = 59 const bool in_flight =
60 sender_->OnPacketSent(sent_time, bytes_in_flight, packet_number, bytes, 60 sender_->OnPacketSent(sent_time, bytes_in_flight, packet_number, bytes,
61 has_retransmittable_data); 61 has_retransmittable_data);
62 if (has_retransmittable_data != HAS_RETRANSMITTABLE_DATA) { 62 if (has_retransmittable_data != HAS_RETRANSMITTABLE_DATA) {
63 return in_flight; 63 return in_flight;
64 } 64 }
65 if (bytes_in_flight == 0) { 65 // If in recovery, the connection is not coming out of quiescence.
66 if (bytes_in_flight == 0 && !sender_->InRecovery()) {
66 // Add more burst tokens anytime the connection is leaving quiescence, but 67 // Add more burst tokens anytime the connection is leaving quiescence, but
67 // limit it to the equivalent of a single bulk write, not exceeding the 68 // limit it to the equivalent of a single bulk write, not exceeding the
68 // current CWND in packets. 69 // current CWND in packets.
69 burst_tokens_ = min( 70 burst_tokens_ = min(
70 initial_packet_burst_, 71 initial_packet_burst_,
71 static_cast<uint32>(sender_->GetCongestionWindow() / kDefaultTCPMSS)); 72 static_cast<uint32>(sender_->GetCongestionWindow() / kDefaultTCPMSS));
72 } 73 }
73 if (burst_tokens_ > 0) { 74 if (burst_tokens_ > 0) {
74 --burst_tokens_; 75 --burst_tokens_;
75 was_last_send_delayed_ = false; 76 was_last_send_delayed_ = false;
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 173
173 QuicByteCount PacingSender::GetSlowStartThreshold() const { 174 QuicByteCount PacingSender::GetSlowStartThreshold() const {
174 return sender_->GetSlowStartThreshold(); 175 return sender_->GetSlowStartThreshold();
175 } 176 }
176 177
177 CongestionControlType PacingSender::GetCongestionControlType() const { 178 CongestionControlType PacingSender::GetCongestionControlType() const {
178 return sender_->GetCongestionControlType(); 179 return sender_->GetCongestionControlType();
179 } 180 }
180 181
181 } // namespace net 182 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/congestion_control/pacing_sender_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698