Index: net/quic/congestion_control/tcp_cubic_sender.cc |
diff --git a/net/quic/congestion_control/tcp_cubic_sender.cc b/net/quic/congestion_control/tcp_cubic_sender.cc |
index 5f2059731672e601776819fb08323e718d53315e..2d0efd769af54f11b16c6e676db88d8e780fd04c 100644 |
--- a/net/quic/congestion_control/tcp_cubic_sender.cc |
+++ b/net/quic/congestion_control/tcp_cubic_sender.cc |
@@ -31,6 +31,7 @@ TcpCubicSender::TcpCubicSender( |
const QuicClock* clock, |
const RttStats* rtt_stats, |
bool reno, |
+ QuicPacketCount initial_tcp_congestion_window, |
QuicPacketCount max_tcp_congestion_window, |
QuicConnectionStats* stats) |
: hybrid_slow_start_(clock), |
@@ -43,7 +44,7 @@ TcpCubicSender::TcpCubicSender( |
largest_sent_sequence_number_(0), |
largest_acked_sequence_number_(0), |
largest_sent_at_last_cutback_(0), |
- congestion_window_(kDefaultInitialWindow), |
+ congestion_window_(initial_tcp_congestion_window), |
previous_congestion_window_(0), |
slowstart_threshold_(max_tcp_congestion_window), |
previous_slowstart_threshold_(0), |
@@ -55,20 +56,19 @@ TcpCubicSender::~TcpCubicSender() { |
UMA_HISTOGRAM_COUNTS("Net.QuicSession.FinalTcpCwnd", congestion_window_); |
} |
-void TcpCubicSender::SetFromConfig(const QuicConfig& config, bool is_server) { |
+void TcpCubicSender::SetFromConfig(const QuicConfig& config, |
+ bool is_server, |
+ bool using_pacing) { |
if (is_server) { |
if (config.HasReceivedConnectionOptions() && |
ContainsQuicTag(config.ReceivedConnectionOptions(), kIW10)) { |
- // Initial window experiment. Ignore the initial congestion |
- // window suggested by the client and use the default ICWND of |
- // 10 instead. |
- congestion_window_ = kDefaultInitialWindow; |
- } else if (config.HasReceivedInitialCongestionWindow()) { |
- // Set the initial window size. |
- congestion_window_ = max(kMinimumCongestionWindow, |
- min(kMaxInitialWindow, |
- static_cast<QuicPacketCount>( |
- config.ReceivedInitialCongestionWindow()))); |
+ // Initial window experiment. |
+ congestion_window_ = 10; |
+ } |
+ if (using_pacing) { |
+ // Disable the ack train mode in hystart when pacing is enabled, since it |
+ // may be falsely triggered. |
+ hybrid_slow_start_.set_ack_train_detection(false); |
} |
} |
} |