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

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

Issue 605163004: Land Recent QUIC Changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final_0925
Patch Set: Created 6 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
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 9c01fa9c68ef9c4776d6e79a5c86a30a64a37436..0aae5fdea714c109ed5fbcf3c3aff448fa03d74d 100644
--- a/net/quic/congestion_control/tcp_cubic_sender.cc
+++ b/net/quic/congestion_control/tcp_cubic_sender.cc
@@ -36,6 +36,7 @@ TcpCubicSender::TcpCubicSender(
rtt_stats_(rtt_stats),
stats_(stats),
reno_(reno),
+ num_connections_(2),
congestion_window_count_(0),
receive_window_(kDefaultSocketReceiveBuffer),
prr_out_(0),
@@ -77,6 +78,11 @@ void TcpCubicSender::SetFromConfig(const QuicConfig& config, bool is_server) {
}
}
+void TcpCubicSender::SetNumEmulatedConnections(int num_connections) {
+ num_connections_ = max(1, num_connections);
+ cubic_.SetNumConnections(num_connections_);
+}
+
void TcpCubicSender::OnIncomingQuicCongestionFeedbackFrame(
const QuicCongestionFeedbackFrame& feedback,
QuicTime feedback_receive_time) {
@@ -273,10 +279,11 @@ void TcpCubicSender::MaybeIncreaseCwnd(
}
// Congestion avoidance
if (reno_) {
- // Classic Reno congestion avoidance provided for testing.
-
+ // Classic Reno congestion avoidance.
++congestion_window_count_;
- if (congestion_window_count_ >= congestion_window_) {
+ // Divide by num_connections to smoothly increase the CWND at a faster
+ // rate than conventional Reno.
+ if (congestion_window_count_ * num_connections_ >= congestion_window_) {
++congestion_window_;
congestion_window_count_ = 0;
}
« 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