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

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

Issue 1038223002: Fix a flaky QUIC end to end test by supplying the correct buffer size as (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Initialize_slowstart_packets_sent_89126237
Patch Set: Created 5 years, 9 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/quic_protocol.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/congestion_control/send_algorithm_interface.cc
diff --git a/net/quic/congestion_control/send_algorithm_interface.cc b/net/quic/congestion_control/send_algorithm_interface.cc
index e96d74828ecf54c38384708ec73151776a07c78f..ab3fe36935e9ce479da132f4e642fc8c93b74ac2 100644
--- a/net/quic/congestion_control/send_algorithm_interface.cc
+++ b/net/quic/congestion_control/send_algorithm_interface.cc
@@ -6,6 +6,7 @@
#include "net/quic/congestion_control/tcp_cubic_bytes_sender.h"
#include "net/quic/congestion_control/tcp_cubic_sender.h"
+#include "net/quic/quic_flags.h"
#include "net/quic/quic_protocol.h"
namespace net {
@@ -19,28 +20,33 @@ SendAlgorithmInterface* SendAlgorithmInterface::Create(
CongestionControlType congestion_control_type,
QuicConnectionStats* stats,
QuicPacketCount initial_congestion_window) {
+ const QuicPacketCount max_congestion_window =
+ FLAGS_quic_limit_max_cwnd_to_receive_buffer
+ ? (kDefaultSocketReceiveBuffer * kUsableRecieveBufferFraction) /
+ kDefaultTCPMSS
+ : kMaxTcpCongestionWindow;
switch (congestion_control_type) {
case kCubic:
return new TcpCubicSender(clock, rtt_stats, false /* don't use Reno */,
initial_congestion_window,
- kMaxTcpCongestionWindow, stats);
+ max_congestion_window, stats);
case kCubicBytes:
return new TcpCubicBytesSender(
clock, rtt_stats, false /* don't use Reno */,
- initial_congestion_window, kMaxTcpCongestionWindow, stats);
+ initial_congestion_window, max_congestion_window, stats);
case kReno:
return new TcpCubicSender(clock, rtt_stats, true /* use Reno */,
initial_congestion_window,
- kMaxTcpCongestionWindow, stats);
+ max_congestion_window, stats);
case kRenoBytes:
return new TcpCubicBytesSender(clock, rtt_stats, true /* use Reno */,
initial_congestion_window,
- kMaxTcpCongestionWindow, stats);
+ max_congestion_window, stats);
case kBBR:
// TODO(rtenneti): Enable BbrTcpSender.
#if 0
return new BbrTcpSender(clock, rtt_stats, initial_congestion_window,
- kMaxTcpCongestionWindow, stats);
+ max_congestion_window, stats);
#endif
LOG(DFATAL) << "BbrTcpSender is not supported.";
return nullptr;
« no previous file with comments | « no previous file | net/quic/quic_protocol.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698