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

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

Issue 2005853002: Ignore the peer's receive buffer in QUIC and instead set the max CWND to 2000 packets. Protected b… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@122420070
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 min_congestion_window_ = congestion_window; 73 min_congestion_window_ = congestion_window;
74 } 74 }
75 75
76 void TcpCubicSenderPackets::SetNumEmulatedConnections(int num_connections) { 76 void TcpCubicSenderPackets::SetNumEmulatedConnections(int num_connections) {
77 TcpCubicSenderBase::SetNumEmulatedConnections(num_connections); 77 TcpCubicSenderBase::SetNumEmulatedConnections(num_connections);
78 cubic_.SetNumConnections(num_connections_); 78 cubic_.SetNumConnections(num_connections_);
79 } 79 }
80 80
81 void TcpCubicSenderPackets::SetMaxCongestionWindow( 81 void TcpCubicSenderPackets::SetMaxCongestionWindow(
82 QuicByteCount max_congestion_window) { 82 QuicByteCount max_congestion_window) {
83 DCHECK(!FLAGS_quic_ignore_srbf);
83 max_tcp_congestion_window_ = max_congestion_window / kDefaultTCPMSS; 84 max_tcp_congestion_window_ = max_congestion_window / kDefaultTCPMSS;
84 } 85 }
85 86
86 void TcpCubicSenderPackets::ExitSlowstart() { 87 void TcpCubicSenderPackets::ExitSlowstart() {
87 slowstart_threshold_ = congestion_window_; 88 slowstart_threshold_ = congestion_window_;
88 } 89 }
89 90
90 void TcpCubicSenderPackets::OnPacketLost(QuicPacketNumber packet_number, 91 void TcpCubicSenderPackets::OnPacketLost(QuicPacketNumber packet_number,
91 QuicByteCount lost_bytes, 92 QuicByteCount lost_bytes,
92 QuicByteCount bytes_in_flight) { 93 QuicByteCount bytes_in_flight) {
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 congestion_window_ = initial_tcp_congestion_window_; 214 congestion_window_ = initial_tcp_congestion_window_;
214 slowstart_threshold_ = initial_max_tcp_congestion_window_; 215 slowstart_threshold_ = initial_max_tcp_congestion_window_;
215 max_tcp_congestion_window_ = initial_max_tcp_congestion_window_; 216 max_tcp_congestion_window_ = initial_max_tcp_congestion_window_;
216 } 217 }
217 218
218 CongestionControlType TcpCubicSenderPackets::GetCongestionControlType() const { 219 CongestionControlType TcpCubicSenderPackets::GetCongestionControlType() const {
219 return reno_ ? kReno : kCubic; 220 return reno_ ? kReno : kCubic;
220 } 221 }
221 222
222 } // namespace net 223 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698