OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 // BBR (Bottleneck Bandwidth and RTT) congestion control algorithm. | 5 // BBR (Bottleneck Bandwidth and RTT) congestion control algorithm. |
6 | 6 |
7 #ifndef NET_QUIC_CORE_CONGESTION_CONTROL_BBR_SENDER_H_ | 7 #ifndef NET_QUIC_CORE_CONGESTION_CONTROL_BBR_SENDER_H_ |
8 #define NET_QUIC_CORE_CONGESTION_CONTROL_BBR_SENDER_H_ | 8 #define NET_QUIC_CORE_CONGESTION_CONTROL_BBR_SENDER_H_ |
9 | 9 |
10 #include <cstdint> | 10 #include <cstdint> |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 // Updates the ack aggregation max filter in bytes. | 209 // Updates the ack aggregation max filter in bytes. |
210 void UpdateAckAggregationBytes(QuicTime ack_time, | 210 void UpdateAckAggregationBytes(QuicTime ack_time, |
211 QuicByteCount newly_acked_bytes); | 211 QuicByteCount newly_acked_bytes); |
212 | 212 |
213 // Determines the appropriate pacing rate for the connection. | 213 // Determines the appropriate pacing rate for the connection. |
214 void CalculatePacingRate(); | 214 void CalculatePacingRate(); |
215 // Determines the appropriate congestion window for the connection. | 215 // Determines the appropriate congestion window for the connection. |
216 void CalculateCongestionWindow(QuicByteCount bytes_acked); | 216 void CalculateCongestionWindow(QuicByteCount bytes_acked); |
217 // Determines the approriate window that constrains the in-flight during | 217 // Determines the approriate window that constrains the in-flight during |
218 // recovery. | 218 // recovery. |
219 void CalculateRecoveryWindow(QuicByteCount bytes_acked); | 219 void CalculateRecoveryWindow(QuicByteCount bytes_acked, |
| 220 QuicByteCount bytes_lost); |
220 | 221 |
221 const RttStats* rtt_stats_; | 222 const RttStats* rtt_stats_; |
222 const QuicUnackedPacketMap* unacked_packets_; | 223 const QuicUnackedPacketMap* unacked_packets_; |
223 QuicRandom* random_; | 224 QuicRandom* random_; |
224 | 225 |
225 Mode mode_; | 226 Mode mode_; |
226 | 227 |
227 // Bandwidth sampler provides BBR with the bandwidth measurements at | 228 // Bandwidth sampler provides BBR with the bandwidth measurements at |
228 // individual points. | 229 // individual points. |
229 BandwidthSampler sampler_; | 230 BandwidthSampler sampler_; |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 | 339 |
339 QUIC_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os, | 340 QUIC_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os, |
340 const BbrSender::Mode& mode); | 341 const BbrSender::Mode& mode); |
341 QUIC_EXPORT_PRIVATE std::ostream& operator<<( | 342 QUIC_EXPORT_PRIVATE std::ostream& operator<<( |
342 std::ostream& os, | 343 std::ostream& os, |
343 const BbrSender::DebugState& state); | 344 const BbrSender::DebugState& state); |
344 | 345 |
345 } // namespace net | 346 } // namespace net |
346 | 347 |
347 #endif // NET_QUIC_CORE_CONGESTION_CONTROL_BBR_SENDER_H_ | 348 #endif // NET_QUIC_CORE_CONGESTION_CONTROL_BBR_SENDER_H_ |
OLD | NEW |