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

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

Issue 446253002: QUIC congestion option that forces ICWND to 10. Not flag protected. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@allow_receiving_CongestionFeedbackFrame_72322097
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/quic/congestion_control/tcp_cubic_sender_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 bd61bdb916ec3c7f2cb50beb9418e58fb829749d..18401b713b7d11f23925d14f36a161d6e6a4a275 100644
--- a/net/quic/congestion_control/tcp_cubic_sender.cc
+++ b/net/quic/congestion_control/tcp_cubic_sender.cc
@@ -8,6 +8,7 @@
#include "base/metrics/histogram.h"
#include "net/quic/congestion_control/rtt_stats.h"
+#include "net/quic/crypto/crypto_protocol.h"
using std::max;
using std::min;
@@ -58,10 +59,18 @@ TcpCubicSender::~TcpCubicSender() {
}
void TcpCubicSender::SetFromConfig(const QuicConfig& config, bool is_server) {
- if (is_server && config.HasReceivedInitialCongestionWindow()) {
- // Set the initial window size.
- congestion_window_ = min(kMaxInitialWindow,
- config.ReceivedInitialCongestionWindow());
+ 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_ = kInitialCongestionWindow;
+ } else if (config.HasReceivedInitialCongestionWindow()) {
+ // Set the initial window size.
+ congestion_window_ = min(kMaxInitialWindow,
+ config.ReceivedInitialCongestionWindow());
+ }
}
}
« no previous file with comments | « no previous file | net/quic/congestion_control/tcp_cubic_sender_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698