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

Unified Diff: net/quic/quic_sent_packet_manager.cc

Issue 885443002: Roll Chrome into Mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase to ToT mojo 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 91775523f835e7d4d8027c020d9a2d8bd83715ba..34bb9726f38266d40b64007883d9245618620d04 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));
@@ -215,6 +219,10 @@ 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 && !use_new_rto_) {
+ packets_lost_.clear();
+ }
MaybeInvokeCongestionEvent(rtt_updated, bytes_in_flight);
unacked_packets_.RemoveObsoletePackets();
@@ -243,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.
@@ -566,10 +576,10 @@ bool QuicSentPacketManager::OnPacketSent(
<< "pending_retransmissions_. sequence_number: "
<< original_sequence_number;
}
- // A notifier may be waiting to hear about ACKs for the original sequence
- // number. Inform them that the sequence number has changed.
- ack_notifier_manager_.UpdateSequenceNumber(original_sequence_number,
- sequence_number);
+ // Inform the ack notifier of retransmissions so it can calculate the
+ // retransmit rate.
+ ack_notifier_manager_.OnPacketRetransmitted(original_sequence_number,
+ sequence_number, bytes);
}
if (pending_timer_transmission_count_ > 0) {
« 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