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

Unified Diff: net/quic/congestion_control/tcp_cubic_sender.cc

Issue 734063004: Update from https://crrev.com/304418 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
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);
}
}
}
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_sender.h ('k') | net/quic/congestion_control/tcp_cubic_sender_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698