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

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

Issue 851503003: Update from https://crrev.com/311076 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 2378eeb179101946ab0499295c4d9bf6f9d06f7f..8abedc827ed64157eb2ee40a1d9fa62cc0255b99 100644
--- a/net/quic/congestion_control/tcp_cubic_sender.cc
+++ b/net/quic/congestion_control/tcp_cubic_sender.cc
@@ -138,6 +138,8 @@ void TcpCubicSender::OnPacketAcked(
QuicByteCount bytes_in_flight) {
largest_acked_sequence_number_ = max(acked_sequence_number,
largest_acked_sequence_number_);
+ // As soon as a packet is acked, ensure we're no longer in RTO mode.
+ previous_congestion_window_ = 0;
if (InRecovery()) {
// PRR is used when in recovery.
prr_.OnPacketAcked(acked_bytes);
@@ -345,6 +347,10 @@ void TcpCubicSender::OnRetransmissionTimeout(bool packets_retransmitted) {
}
cubic_.Reset();
hybrid_slow_start_.Restart();
+ // Only reduce ssthresh once over multiple retransmissions.
+ if (previous_congestion_window_ != 0) {
+ return;
+ }
previous_slowstart_threshold_ = slowstart_threshold_;
slowstart_threshold_ = congestion_window_ / 2;
previous_congestion_window_ = congestion_window_;
« 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