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

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

Issue 1048493002: Remove the using_pacing argument from QuicSentPacketManager::SetFromConfig because it's always true. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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_bytes_sender.h" 5 #include "net/quic/congestion_control/tcp_cubic_bytes_sender.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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 num_acked_packets_(0), 42 num_acked_packets_(0),
43 largest_sent_sequence_number_(0), 43 largest_sent_sequence_number_(0),
44 largest_acked_sequence_number_(0), 44 largest_acked_sequence_number_(0),
45 largest_sent_at_last_cutback_(0), 45 largest_sent_at_last_cutback_(0),
46 congestion_window_(initial_tcp_congestion_window * kMaxSegmentSize), 46 congestion_window_(initial_tcp_congestion_window * kMaxSegmentSize),
47 min_congestion_window_(kDefaultMinimumCongestionWindow), 47 min_congestion_window_(kDefaultMinimumCongestionWindow),
48 max_congestion_window_(max_congestion_window * kMaxSegmentSize), 48 max_congestion_window_(max_congestion_window * kMaxSegmentSize),
49 slowstart_threshold_(std::numeric_limits<uint64>::max()), 49 slowstart_threshold_(std::numeric_limits<uint64>::max()),
50 last_cutback_exited_slowstart_(false), 50 last_cutback_exited_slowstart_(false),
51 clock_(clock) { 51 clock_(clock) {
52 // Disable the ack train mode in hystart when pacing is enabled, since it
53 // may be falsely triggered.
54 hybrid_slow_start_.set_ack_train_detection(false);
52 } 55 }
53 56
54 TcpCubicBytesSender::~TcpCubicBytesSender() { 57 TcpCubicBytesSender::~TcpCubicBytesSender() {
55 } 58 }
56 59
57 void TcpCubicBytesSender::SetFromConfig(const QuicConfig& config, 60 void TcpCubicBytesSender::SetFromConfig(const QuicConfig& config,
58 Perspective perspective, 61 Perspective perspective) {
59 bool using_pacing) {
60 if (perspective == Perspective::IS_SERVER) { 62 if (perspective == Perspective::IS_SERVER) {
61 if (config.HasReceivedConnectionOptions() && 63 if (config.HasReceivedConnectionOptions() &&
62 ContainsQuicTag(config.ReceivedConnectionOptions(), kIW10)) { 64 ContainsQuicTag(config.ReceivedConnectionOptions(), kIW10)) {
63 // Initial window experiment. 65 // Initial window experiment.
64 congestion_window_ = 10 * kMaxSegmentSize; 66 congestion_window_ = 10 * kMaxSegmentSize;
65 } 67 }
66 if (config.HasReceivedConnectionOptions() && 68 if (config.HasReceivedConnectionOptions() &&
67 ContainsQuicTag(config.ReceivedConnectionOptions(), kMIN1)) { 69 ContainsQuicTag(config.ReceivedConnectionOptions(), kMIN1)) {
68 // Min CWND experiment. 70 // Min CWND experiment.
69 min_congestion_window_ = kMaxSegmentSize; 71 min_congestion_window_ = kMaxSegmentSize;
70 } 72 }
71 if (using_pacing) {
72 // Disable the ack train mode in hystart when pacing is enabled, since it
73 // may be falsely triggered.
74 hybrid_slow_start_.set_ack_train_detection(false);
75 }
76 } 73 }
77 } 74 }
78 75
79 bool TcpCubicBytesSender::ResumeConnectionState( 76 bool TcpCubicBytesSender::ResumeConnectionState(
80 const CachedNetworkParameters& cached_network_params, 77 const CachedNetworkParameters& cached_network_params,
81 bool max_bandwidth_resumption) { 78 bool max_bandwidth_resumption) {
82 // If the previous bandwidth estimate is less than an hour old, store in 79 // If the previous bandwidth estimate is less than an hour old, store in
83 // preparation for doing bandwidth resumption. 80 // preparation for doing bandwidth resumption.
84 int64 seconds_since_estimate = 81 int64 seconds_since_estimate =
85 clock_->WallNow().ToUNIXSeconds() - cached_network_params.timestamp(); 82 clock_->WallNow().ToUNIXSeconds() - cached_network_params.timestamp();
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 hybrid_slow_start_.Restart(); 356 hybrid_slow_start_.Restart();
360 slowstart_threshold_ = congestion_window_ / 2; 357 slowstart_threshold_ = congestion_window_ / 2;
361 congestion_window_ = min_congestion_window_; 358 congestion_window_ = min_congestion_window_;
362 } 359 }
363 360
364 CongestionControlType TcpCubicBytesSender::GetCongestionControlType() const { 361 CongestionControlType TcpCubicBytesSender::GetCongestionControlType() const {
365 return reno_ ? kRenoBytes : kCubicBytes; 362 return reno_ ? kRenoBytes : kCubicBytes;
366 } 363 }
367 364
368 } // namespace net 365 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_bytes_sender.h ('k') | net/quic/congestion_control/tcp_cubic_bytes_sender_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698