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

Side by Side Diff: net/quic/quic_sent_packet_manager.cc

Issue 1009203003: Add a kBYTE congestion option to QUIC to negotiate the TcpCubicBytesSender. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Add_support_for_MIN1_88167032
Patch Set: Created 5 years, 9 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 | « net/quic/quic_protocol.h ('k') | net/quic/quic_sent_packet_manager_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/quic_sent_packet_manager.h" 5 #include "net/quic/quic_sent_packet_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 ContainsQuicTag(config.ReceivedConnectionOptions(), kTBBR)) { 131 ContainsQuicTag(config.ReceivedConnectionOptions(), kTBBR)) {
132 if (FLAGS_quic_recent_min_rtt_window_s > 0) { 132 if (FLAGS_quic_recent_min_rtt_window_s > 0) {
133 rtt_stats_.set_recent_min_rtt_window( 133 rtt_stats_.set_recent_min_rtt_window(
134 QuicTime::Delta::FromSeconds(FLAGS_quic_recent_min_rtt_window_s)); 134 QuicTime::Delta::FromSeconds(FLAGS_quic_recent_min_rtt_window_s));
135 } 135 }
136 send_algorithm_.reset(SendAlgorithmInterface::Create( 136 send_algorithm_.reset(SendAlgorithmInterface::Create(
137 clock_, &rtt_stats_, kBBR, stats_, initial_congestion_window_)); 137 clock_, &rtt_stats_, kBBR, stats_, initial_congestion_window_));
138 } 138 }
139 if (config.HasReceivedConnectionOptions() && 139 if (config.HasReceivedConnectionOptions() &&
140 ContainsQuicTag(config.ReceivedConnectionOptions(), kRENO)) { 140 ContainsQuicTag(config.ReceivedConnectionOptions(), kRENO)) {
141 if (ContainsQuicTag(config.ReceivedConnectionOptions(), kBYTE)) {
142 send_algorithm_.reset(SendAlgorithmInterface::Create(
143 clock_, &rtt_stats_, kRenoBytes, stats_, initial_congestion_window_));
144 } else {
145 send_algorithm_.reset(SendAlgorithmInterface::Create(
146 clock_, &rtt_stats_, kReno, stats_, initial_congestion_window_));
147 }
148 } else if (config.HasReceivedConnectionOptions() &&
149 ContainsQuicTag(config.ReceivedConnectionOptions(), kBYTE)) {
141 send_algorithm_.reset(SendAlgorithmInterface::Create( 150 send_algorithm_.reset(SendAlgorithmInterface::Create(
142 clock_, &rtt_stats_, kReno, stats_, initial_congestion_window_)); 151 clock_, &rtt_stats_, kCubicBytes, stats_, initial_congestion_window_));
143 } 152 }
144 EnablePacing(); 153 EnablePacing();
145 154
146 if (HasClientSentConnectionOption(config, k1CON)) { 155 if (HasClientSentConnectionOption(config, k1CON)) {
147 send_algorithm_->SetNumEmulatedConnections(1); 156 send_algorithm_->SetNumEmulatedConnections(1);
148 } 157 }
149 if (HasClientSentConnectionOption(config, kNCON)) { 158 if (HasClientSentConnectionOption(config, kNCON)) {
150 n_connection_simulation_ = true; 159 n_connection_simulation_ = true;
151 } 160 }
152 if (HasClientSentConnectionOption(config, kNTLP)) { 161 if (HasClientSentConnectionOption(config, kNTLP)) {
(...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after
942 // Set up a pacing sender with a 1 millisecond alarm granularity, the same as 951 // Set up a pacing sender with a 1 millisecond alarm granularity, the same as
943 // the default granularity of the Linux kernel's FQ qdisc. 952 // the default granularity of the Linux kernel's FQ qdisc.
944 using_pacing_ = true; 953 using_pacing_ = true;
945 send_algorithm_.reset( 954 send_algorithm_.reset(
946 new PacingSender(send_algorithm_.release(), 955 new PacingSender(send_algorithm_.release(),
947 QuicTime::Delta::FromMilliseconds(1), 956 QuicTime::Delta::FromMilliseconds(1),
948 kInitialUnpacedBurst)); 957 kInitialUnpacedBurst));
949 } 958 }
950 959
951 } // namespace net 960 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_protocol.h ('k') | net/quic/quic_sent_packet_manager_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698