| 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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 // round-trips. | 242 // round-trips. |
| 243 MaxBandwidthFilter max_bandwidth_; | 243 MaxBandwidthFilter max_bandwidth_; |
| 244 | 244 |
| 245 // Tracks the maximum number of bytes acked faster than the sending rate. | 245 // Tracks the maximum number of bytes acked faster than the sending rate. |
| 246 MaxAckHeightFilter max_ack_height_; | 246 MaxAckHeightFilter max_ack_height_; |
| 247 | 247 |
| 248 // The time this aggregation started and the number of bytes acked during it. | 248 // The time this aggregation started and the number of bytes acked during it. |
| 249 QuicTime aggregation_epoch_start_time_; | 249 QuicTime aggregation_epoch_start_time_; |
| 250 QuicByteCount aggregation_epoch_bytes_; | 250 QuicByteCount aggregation_epoch_bytes_; |
| 251 | 251 |
| 252 // The number of bytes acknowledged since the last time bytes in flight |
| 253 // dropped below the target window. |
| 254 QuicByteCount bytes_acked_since_queue_drained_; |
| 255 |
| 252 // Minimum RTT estimate. Automatically expires within 10 seconds (and | 256 // Minimum RTT estimate. Automatically expires within 10 seconds (and |
| 253 // triggers PROBE_RTT mode) if no new value is sampled during that period. | 257 // triggers PROBE_RTT mode) if no new value is sampled during that period. |
| 254 QuicTime::Delta min_rtt_; | 258 QuicTime::Delta min_rtt_; |
| 255 // The time at which the current value of |min_rtt_| was assigned. | 259 // The time at which the current value of |min_rtt_| was assigned. |
| 256 QuicTime min_rtt_timestamp_; | 260 QuicTime min_rtt_timestamp_; |
| 257 | 261 |
| 258 // The maximum allowed number of bytes in flight. | 262 // The maximum allowed number of bytes in flight. |
| 259 QuicByteCount congestion_window_; | 263 QuicByteCount congestion_window_; |
| 260 | 264 |
| 261 // The initial value of the |congestion_window_|. | 265 // The initial value of the |congestion_window_|. |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 struct DataDelivered { | 331 struct DataDelivered { |
| 328 QuicTime ack_time; | 332 QuicTime ack_time; |
| 329 QuicByteCount acked_bytes; | 333 QuicByteCount acked_bytes; |
| 330 }; | 334 }; |
| 331 | 335 |
| 332 // Data structure to record recently received acks. Used for determining | 336 // Data structure to record recently received acks. Used for determining |
| 333 // recently seen ack rate over a short period in the past. | 337 // recently seen ack rate over a short period in the past. |
| 334 std::deque<DataDelivered> recently_acked_; | 338 std::deque<DataDelivered> recently_acked_; |
| 335 QuicByteCount bytes_recently_acked_; | 339 QuicByteCount bytes_recently_acked_; |
| 336 | 340 |
| 341 // When true, recovery is rate based rather than congestion window based. |
| 342 bool rate_based_recovery_; |
| 343 |
| 337 DISALLOW_COPY_AND_ASSIGN(BbrSender); | 344 DISALLOW_COPY_AND_ASSIGN(BbrSender); |
| 338 }; | 345 }; |
| 339 | 346 |
| 340 QUIC_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os, | 347 QUIC_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os, |
| 341 const BbrSender::Mode& mode); | 348 const BbrSender::Mode& mode); |
| 342 QUIC_EXPORT_PRIVATE std::ostream& operator<<( | 349 QUIC_EXPORT_PRIVATE std::ostream& operator<<( |
| 343 std::ostream& os, | 350 std::ostream& os, |
| 344 const BbrSender::DebugState& state); | 351 const BbrSender::DebugState& state); |
| 345 | 352 |
| 346 } // namespace net | 353 } // namespace net |
| 347 | 354 |
| 348 #endif // NET_QUIC_CORE_CONGESTION_CONTROL_BBR_SENDER_H_ | 355 #endif // NET_QUIC_CORE_CONGESTION_CONTROL_BBR_SENDER_H_ |
| OLD | NEW |