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

Side by Side Diff: net/quic/congestion_control/tcp_loss_algorithm.cc

Issue 754433003: Update from https://crrev.com/305340 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/congestion_control/tcp_loss_algorithm.h" 5 #include "net/quic/congestion_control/tcp_loss_algorithm.h"
6 6
7 #include "net/quic/congestion_control/rtt_stats.h" 7 #include "net/quic/congestion_control/rtt_stats.h"
8 #include "net/quic/quic_protocol.h" 8 #include "net/quic/quic_protocol.h"
9 9
10 namespace net { 10 namespace net {
(...skipping 22 matching lines...) Expand all
33 QuicTime::Delta loss_delay = 33 QuicTime::Delta loss_delay =
34 rtt_stats.smoothed_rtt().Multiply(kEarlyRetransmitLossDelayMultiplier); 34 rtt_stats.smoothed_rtt().Multiply(kEarlyRetransmitLossDelayMultiplier);
35 QuicPacketSequenceNumber sequence_number = unacked_packets.GetLeastUnacked(); 35 QuicPacketSequenceNumber sequence_number = unacked_packets.GetLeastUnacked();
36 for (QuicUnackedPacketMap::const_iterator it = unacked_packets.begin(); 36 for (QuicUnackedPacketMap::const_iterator it = unacked_packets.begin();
37 it != unacked_packets.end() && sequence_number <= largest_observed; 37 it != unacked_packets.end() && sequence_number <= largest_observed;
38 ++it, ++sequence_number) { 38 ++it, ++sequence_number) {
39 if (!it->in_flight) { 39 if (!it->in_flight) {
40 continue; 40 continue;
41 } 41 }
42 42
43 LOG_IF(DFATAL, it->nack_count == 0) 43 LOG_IF(DFATAL, it->nack_count == 0 && it->sent_time.IsInitialized())
44 << "All packets less than largest observed should have been nacked." 44 << "All packets less than largest observed should have been nacked."
45 << "sequence_number:" << sequence_number 45 << "sequence_number:" << sequence_number
46 << " largest_observed:" << largest_observed; 46 << " largest_observed:" << largest_observed;
47 if (it->nack_count >= kNumberOfNacksBeforeRetransmission) { 47 if (it->nack_count >= kNumberOfNacksBeforeRetransmission) {
48 lost_packets.insert(sequence_number); 48 lost_packets.insert(sequence_number);
49 continue; 49 continue;
50 } 50 }
51 51
52 // Only early retransmit(RFC5827) when the last packet gets acked and 52 // Only early retransmit(RFC5827) when the last packet gets acked and
53 // there are retransmittable packets in flight. 53 // there are retransmittable packets in flight.
(...skipping 14 matching lines...) Expand all
68 } 68 }
69 69
70 return lost_packets; 70 return lost_packets;
71 } 71 }
72 72
73 QuicTime TCPLossAlgorithm::GetLossTimeout() const { 73 QuicTime TCPLossAlgorithm::GetLossTimeout() const {
74 return loss_detection_timeout_; 74 return loss_detection_timeout_;
75 } 75 }
76 76
77 } // namespace net 77 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_sender_test.cc ('k') | net/quic/congestion_control/tcp_loss_algorithm_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698