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

Unified Diff: net/quic/quic_sent_packet_manager.cc

Issue 824693007: Add a new RTO connection option to QUIC. Flag protected behind the (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@merge_83993217
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
« no previous file with comments | « net/quic/quic_sent_packet_manager.h ('k') | net/quic/quic_sent_packet_manager_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_sent_packet_manager.cc
diff --git a/net/quic/quic_sent_packet_manager.cc b/net/quic/quic_sent_packet_manager.cc
index aaa982c907c9e10cb82866be6e856f6266fe1923..3f54f9b225b213b60cdd038dd311947f4a09c22c 100644
--- a/net/quic/quic_sent_packet_manager.cc
+++ b/net/quic/quic_sent_packet_manager.cc
@@ -100,6 +100,7 @@ QuicSentPacketManager::QuicSentPacketManager(
pending_timer_transmission_count_(0),
max_tail_loss_probes_(kDefaultMaxTailLossProbes),
using_pacing_(false),
+ use_new_rto_(false),
handshake_confirmed_(false) {
}
@@ -154,6 +155,9 @@ void QuicSentPacketManager::SetFromConfig(const QuicConfig& config) {
if (HasClientSentConnectionOption(config, kNTLP)) {
max_tail_loss_probes_ = 0;
}
+ if (HasClientSentConnectionOption(config, kNRTO)) {
+ use_new_rto_ = true;
+ }
if (config.HasReceivedConnectionOptions() &&
ContainsQuicTag(config.ReceivedConnectionOptions(), kTIME)) {
loss_algorithm_.reset(LossDetectionInterface::Create(kTime));
@@ -216,7 +220,7 @@ void QuicSentPacketManager::OnIncomingAck(const QuicAckFrame& ack_frame,
HandleAckForSentPackets(ack_frame);
InvokeLossDetection(ack_receive_time);
// Ignore losses in RTO mode.
- if (FLAGS_quic_use_new_rto && consecutive_rto_count_ > 0) {
+ if (FLAGS_quic_use_new_rto && consecutive_rto_count_ > 0 && !use_new_rto_) {
packets_lost_.clear();
}
MaybeInvokeCongestionEvent(rtt_updated, bytes_in_flight);
@@ -247,7 +251,9 @@ void QuicSentPacketManager::OnIncomingAck(const QuicAckFrame& ack_frame,
// a spurious RTO from happening again.
rtt_stats_.ExpireSmoothedMetrics();
} else {
- send_algorithm_->OnRetransmissionTimeout(true);
+ if (!use_new_rto_) {
+ send_algorithm_->OnRetransmissionTimeout(true);
+ }
}
}
// Reset all retransmit counters any time a new packet is acked.
« no previous file with comments | « net/quic/quic_sent_packet_manager.h ('k') | net/quic/quic_sent_packet_manager_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698