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

Unified Diff: net/quic/core/congestion_control/cubic_bytes.cc

Issue 2351963005: Limit QUIC's Cubic CWND increases to 1/2 the bytes acked when in (Closed)
Patch Set: Created 4 years, 3 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 | « net/quic/core/congestion_control/cubic.cc ('k') | net/quic/core/congestion_control/cubic_bytes_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/congestion_control/cubic_bytes.cc
diff --git a/net/quic/core/congestion_control/cubic_bytes.cc b/net/quic/core/congestion_control/cubic_bytes.cc
index 6d40d634e01656b8c2a2cae559fbe6c4466200fe..91924b06e9f6aca1d9dc359a3c45155e2c964960 100644
--- a/net/quic/core/congestion_control/cubic_bytes.cc
+++ b/net/quic/core/congestion_control/cubic_bytes.cc
@@ -9,9 +9,11 @@
#include <cmath>
#include "base/logging.h"
+#include "net/quic/core/quic_flags.h"
#include "net/quic/core/quic_protocol.h"
using std::max;
+using std::min;
namespace net {
@@ -150,6 +152,12 @@ QuicByteCount CubicBytes::CongestionWindowAfterAck(
QuicByteCount target_congestion_window =
origin_point_congestion_window_ - delta_congestion_window;
+ if (FLAGS_quic_limit_cubic_cwnd_increase) {
+ // Limit the CWND increase to half the acked bytes.
+ target_congestion_window =
+ min(target_congestion_window,
+ current_congestion_window + acked_bytes_count_ / 2);
+ }
DCHECK_LT(0u, estimated_tcp_congestion_window_);
// Increase the window by Alpha * 1 MSS of bytes every time we ack an
« no previous file with comments | « net/quic/core/congestion_control/cubic.cc ('k') | net/quic/core/congestion_control/cubic_bytes_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698