OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/quic_sent_packet_manager.h" | 5 #include "net/quic/quic_sent_packet_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 QuicTime ack_receive_time) { | 208 QuicTime ack_receive_time) { |
209 QuicByteCount bytes_in_flight = unacked_packets_.bytes_in_flight(); | 209 QuicByteCount bytes_in_flight = unacked_packets_.bytes_in_flight(); |
210 | 210 |
211 UpdatePacketInformationReceivedByPeer(ack_frame); | 211 UpdatePacketInformationReceivedByPeer(ack_frame); |
212 bool rtt_updated = MaybeUpdateRTT(ack_frame, ack_receive_time); | 212 bool rtt_updated = MaybeUpdateRTT(ack_frame, ack_receive_time); |
213 DCHECK_GE(ack_frame.largest_observed, unacked_packets_.largest_observed()); | 213 DCHECK_GE(ack_frame.largest_observed, unacked_packets_.largest_observed()); |
214 unacked_packets_.IncreaseLargestObserved(ack_frame.largest_observed); | 214 unacked_packets_.IncreaseLargestObserved(ack_frame.largest_observed); |
215 | 215 |
216 HandleAckForSentPackets(ack_frame); | 216 HandleAckForSentPackets(ack_frame); |
217 InvokeLossDetection(ack_receive_time); | 217 InvokeLossDetection(ack_receive_time); |
| 218 // Ignore losses in RTO mode. |
| 219 if (FLAGS_quic_use_new_rto && consecutive_rto_count_ > 0) { |
| 220 packets_lost_.clear(); |
| 221 } |
218 MaybeInvokeCongestionEvent(rtt_updated, bytes_in_flight); | 222 MaybeInvokeCongestionEvent(rtt_updated, bytes_in_flight); |
219 unacked_packets_.RemoveObsoletePackets(); | 223 unacked_packets_.RemoveObsoletePackets(); |
220 | 224 |
221 sustained_bandwidth_recorder_.RecordEstimate( | 225 sustained_bandwidth_recorder_.RecordEstimate( |
222 send_algorithm_->InRecovery(), | 226 send_algorithm_->InRecovery(), |
223 send_algorithm_->InSlowStart(), | 227 send_algorithm_->InSlowStart(), |
224 send_algorithm_->BandwidthEstimate(), | 228 send_algorithm_->BandwidthEstimate(), |
225 ack_receive_time, | 229 ack_receive_time, |
226 clock_->WallNow(), | 230 clock_->WallNow(), |
227 rtt_stats_.smoothed_rtt()); | 231 rtt_stats_.smoothed_rtt()); |
(...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1000 // Set up a pacing sender with a 1 millisecond alarm granularity, the same as | 1004 // Set up a pacing sender with a 1 millisecond alarm granularity, the same as |
1001 // the default granularity of the Linux kernel's FQ qdisc. | 1005 // the default granularity of the Linux kernel's FQ qdisc. |
1002 using_pacing_ = true; | 1006 using_pacing_ = true; |
1003 send_algorithm_.reset( | 1007 send_algorithm_.reset( |
1004 new PacingSender(send_algorithm_.release(), | 1008 new PacingSender(send_algorithm_.release(), |
1005 QuicTime::Delta::FromMilliseconds(1), | 1009 QuicTime::Delta::FromMilliseconds(1), |
1006 kInitialUnpacedBurst)); | 1010 kInitialUnpacedBurst)); |
1007 } | 1011 } |
1008 | 1012 |
1009 } // namespace net | 1013 } // namespace net |
OLD | NEW |