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

Unified Diff: net/quic/quic_sent_packet_manager.cc

Issue 138273004: Reset QUIC's retransmission counters whenever a new packet is acked (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | « no previous file | 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 af9a507a59c00a3ffd3328f7253be710173ecd7f..a25cb5e6c9f4a16c07ad0666f4541ef7652d6ef7 100644
--- a/net/quic/quic_sent_packet_manager.cc
+++ b/net/quic/quic_sent_packet_manager.cc
@@ -181,19 +181,17 @@ void QuicSentPacketManager::OnRetransmittedPacket(
bool QuicSentPacketManager::OnIncomingAck(
const ReceivedPacketInfo& received_info, QuicTime ack_receive_time) {
- // Determine if the least unacked sequence number is being acked.
- QuicPacketSequenceNumber least_unacked_sent_before =
- GetLeastUnackedSentPacket();
- // TODO(ianswett): Consider a non-TCP metric for determining the connection
- // is making progress, since QUIC has out of order delivery.
- bool new_least_unacked = !IsAwaitingPacket(received_info,
- least_unacked_sent_before);
-
+ // We rely on delta_time_largest_observed to compute an RTT estimate, so
+ // we only update rtt when the largest observed gets acked.
+ bool largest_observed_acked =
+ ContainsKey(unacked_packets_, received_info.largest_observed);
MaybeUpdateRTT(received_info, ack_receive_time);
HandleAckForSentPackets(received_info);
MaybeRetransmitOnAckFrame(received_info, ack_receive_time);
- if (new_least_unacked) {
+ // Anytime we are making forward progress and have a new RTT estimate, reset
+ // the backoff counters.
+ if (largest_observed_acked) {
// Reset all retransmit counters any time a new packet is acked.
consecutive_rto_count_ = 0;
consecutive_tlp_count_ = 0;
« no previous file with comments | « no previous file | net/quic/quic_sent_packet_manager_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698