| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/core/congestion_control/general_loss_algorithm.h" | 5 #include "net/quic/core/congestion_control/general_loss_algorithm.h" |
| 6 | 6 |
| 7 #include "net/quic/core/congestion_control/rtt_stats.h" | 7 #include "net/quic/core/congestion_control/rtt_stats.h" |
| 8 #include "net/quic/core/quic_flags.h" | |
| 9 #include "net/quic/core/quic_packets.h" | 8 #include "net/quic/core/quic_packets.h" |
| 10 #include "net/quic/platform/api/quic_bug_tracker.h" | 9 #include "net/quic/platform/api/quic_bug_tracker.h" |
| 11 #include "net/quic/platform/api/quic_flag_utils.h" | 10 #include "net/quic/platform/api/quic_flag_utils.h" |
| 11 #include "net/quic/platform/api/quic_flags.h" |
| 12 | 12 |
| 13 namespace net { | 13 namespace net { |
| 14 | 14 |
| 15 namespace { | 15 namespace { |
| 16 | 16 |
| 17 // The minimum delay before a packet will be considered lost, | 17 // The minimum delay before a packet will be considered lost, |
| 18 // regardless of SRTT. Half of the minimum TLP, since the loss algorithm only | 18 // regardless of SRTT. Half of the minimum TLP, since the loss algorithm only |
| 19 // triggers when a nack has been receieved for the packet. | 19 // triggers when a nack has been receieved for the packet. |
| 20 static const size_t kMinLossDelayMs = 5; | 20 static const size_t kMinLossDelayMs = 5; |
| 21 | 21 |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 } | 158 } |
| 159 largest_sent_on_spurious_retransmit_ = unacked_packets.largest_sent_packet(); | 159 largest_sent_on_spurious_retransmit_ = unacked_packets.largest_sent_packet(); |
| 160 QuicTime::Delta proposed_extra_time(QuicTime::Delta::Zero()); | 160 QuicTime::Delta proposed_extra_time(QuicTime::Delta::Zero()); |
| 161 do { | 161 do { |
| 162 proposed_extra_time = max_rtt >> reordering_shift_; | 162 proposed_extra_time = max_rtt >> reordering_shift_; |
| 163 --reordering_shift_; | 163 --reordering_shift_; |
| 164 } while (proposed_extra_time < extra_time_needed && reordering_shift_ > 0); | 164 } while (proposed_extra_time < extra_time_needed && reordering_shift_ > 0); |
| 165 } | 165 } |
| 166 | 166 |
| 167 } // namespace net | 167 } // namespace net |
| OLD | NEW |