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

Side by Side Diff: net/quic/core/congestion_control/bbr_sender.cc

Issue 2820423002: Move quic_flags.h from net/quic/core to net/quic/platform and split into api and impl. (Closed)
Patch Set: Created 3 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/core/congestion_control/bbr_sender.h" 5 #include "net/quic/core/congestion_control/bbr_sender.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "net/quic/core/congestion_control/rtt_stats.h" 10 #include "net/quic/core/congestion_control/rtt_stats.h"
11 #include "net/quic/core/crypto/crypto_protocol.h" 11 #include "net/quic/core/crypto/crypto_protocol.h"
12 #include "net/quic/core/proto/cached_network_parameters.pb.h" 12 #include "net/quic/core/proto/cached_network_parameters.pb.h"
13 #include "net/quic/core/quic_flags.h"
14 #include "net/quic/platform/api/quic_bug_tracker.h" 13 #include "net/quic/platform/api/quic_bug_tracker.h"
15 #include "net/quic/platform/api/quic_flag_utils.h" 14 #include "net/quic/platform/api/quic_flag_utils.h"
15 #include "net/quic/platform/api/quic_flags.h"
16 #include "net/quic/platform/api/quic_logging.h" 16 #include "net/quic/platform/api/quic_logging.h"
17 17
18 namespace net { 18 namespace net {
19 19
20 namespace { 20 namespace {
21 // Constants based on TCP defaults. 21 // Constants based on TCP defaults.
22 const QuicByteCount kMaxSegmentSize = kDefaultTCPMSS; 22 const QuicByteCount kMaxSegmentSize = kDefaultTCPMSS;
23 // The minimum CWND to ensure delayed acks don't reduce bandwidth measurements. 23 // The minimum CWND to ensure delayed acks don't reduce bandwidth measurements.
24 // Does not inflate the pacing rate. 24 // Does not inflate the pacing rate.
25 const QuicByteCount kMinimumCongestionWindow = 4 * kMaxSegmentSize; 25 const QuicByteCount kMinimumCongestionWindow = 4 * kMaxSegmentSize;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 min_rtt_(QuicTime::Delta::Zero()), 86 min_rtt_(QuicTime::Delta::Zero()),
87 min_rtt_timestamp_(QuicTime::Zero()), 87 min_rtt_timestamp_(QuicTime::Zero()),
88 congestion_window_(initial_tcp_congestion_window * kDefaultTCPMSS), 88 congestion_window_(initial_tcp_congestion_window * kDefaultTCPMSS),
89 initial_congestion_window_(initial_tcp_congestion_window * 89 initial_congestion_window_(initial_tcp_congestion_window *
90 kDefaultTCPMSS), 90 kDefaultTCPMSS),
91 max_congestion_window_(max_tcp_congestion_window * kDefaultTCPMSS), 91 max_congestion_window_(max_tcp_congestion_window * kDefaultTCPMSS),
92 pacing_rate_(QuicBandwidth::Zero()), 92 pacing_rate_(QuicBandwidth::Zero()),
93 pacing_gain_(1), 93 pacing_gain_(1),
94 congestion_window_gain_(1), 94 congestion_window_gain_(1),
95 congestion_window_gain_constant_( 95 congestion_window_gain_constant_(
96 static_cast<float>(base::GetFlag(FLAGS_quic_bbr_cwnd_gain))), 96 static_cast<float>(GetQuicFlag(FLAGS_quic_bbr_cwnd_gain))),
97 rtt_variance_weight_(static_cast<float>( 97 rtt_variance_weight_(
98 base::GetFlag(FLAGS_quic_bbr_rtt_variation_weight))), 98 static_cast<float>(GetQuicFlag(FLAGS_quic_bbr_rtt_variation_weight))),
99 num_startup_rtts_(kRoundTripsWithoutGrowthBeforeExitingStartup), 99 num_startup_rtts_(kRoundTripsWithoutGrowthBeforeExitingStartup),
100 cycle_current_offset_(0), 100 cycle_current_offset_(0),
101 last_cycle_start_(QuicTime::Zero()), 101 last_cycle_start_(QuicTime::Zero()),
102 is_at_full_bandwidth_(false), 102 is_at_full_bandwidth_(false),
103 rounds_without_bandwidth_gain_(0), 103 rounds_without_bandwidth_gain_(0),
104 bandwidth_at_last_round_(QuicBandwidth::Zero()), 104 bandwidth_at_last_round_(QuicBandwidth::Zero()),
105 exiting_quiescence_(false), 105 exiting_quiescence_(false),
106 exit_probe_rtt_at_(QuicTime::Zero()), 106 exit_probe_rtt_at_(QuicTime::Zero()),
107 probe_rtt_round_passed_(false), 107 probe_rtt_round_passed_(false),
108 last_sample_is_app_limited_(false), 108 last_sample_is_app_limited_(false),
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 os << "Minimum RTT timestamp: " << state.min_rtt_timestamp.ToDebuggingValue() 689 os << "Minimum RTT timestamp: " << state.min_rtt_timestamp.ToDebuggingValue()
690 << std::endl; 690 << std::endl;
691 691
692 os << "Last sample is app-limited: " 692 os << "Last sample is app-limited: "
693 << (state.last_sample_is_app_limited ? "yes" : "no"); 693 << (state.last_sample_is_app_limited ? "yes" : "no");
694 694
695 return os; 695 return os;
696 } 696 }
697 697
698 } // namespace net 698 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/chromium/quic_stream_factory.cc ('k') | net/quic/core/congestion_control/bbr_sender_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698