| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // TCP cubic send side congestion algorithm, emulates the behavior of | 5 // TCP cubic send side congestion algorithm, emulates the behavior of |
| 6 // TCP cubic. | 6 // TCP cubic. |
| 7 | 7 |
| 8 #ifndef NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_H_ | 8 #ifndef NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_H_ |
| 9 #define NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_H_ | 9 #define NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_H_ |
| 10 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 bool reno, | 37 bool reno, |
| 38 QuicPacketCount initial_tcp_congestion_window, | 38 QuicPacketCount initial_tcp_congestion_window, |
| 39 QuicPacketCount max_tcp_congestion_window, | 39 QuicPacketCount max_tcp_congestion_window, |
| 40 QuicConnectionStats* stats); | 40 QuicConnectionStats* stats); |
| 41 ~TcpCubicSender() override; | 41 ~TcpCubicSender() override; |
| 42 | 42 |
| 43 // Start implementation of SendAlgorithmInterface. | 43 // Start implementation of SendAlgorithmInterface. |
| 44 void SetFromConfig(const QuicConfig& config, | 44 void SetFromConfig(const QuicConfig& config, |
| 45 bool is_server, | 45 bool is_server, |
| 46 bool using_pacing) override; | 46 bool using_pacing) override; |
| 47 void ResumeConnectionState( | 47 bool ResumeConnectionState( |
| 48 const CachedNetworkParameters& cached_network_params) override; | 48 const CachedNetworkParameters& cached_network_params) override; |
| 49 void SetNumEmulatedConnections(int num_connections) override; | 49 void SetNumEmulatedConnections(int num_connections) override; |
| 50 void OnCongestionEvent(bool rtt_updated, | 50 void OnCongestionEvent(bool rtt_updated, |
| 51 QuicByteCount bytes_in_flight, | 51 QuicByteCount bytes_in_flight, |
| 52 const CongestionVector& acked_packets, | 52 const CongestionVector& acked_packets, |
| 53 const CongestionVector& lost_packets) override; | 53 const CongestionVector& lost_packets) override; |
| 54 bool OnPacketSent(QuicTime sent_time, | 54 bool OnPacketSent(QuicTime sent_time, |
| 55 QuicByteCount bytes_in_flight, | 55 QuicByteCount bytes_in_flight, |
| 56 QuicPacketSequenceNumber sequence_number, | 56 QuicPacketSequenceNumber sequence_number, |
| 57 QuicByteCount bytes, | 57 QuicByteCount bytes, |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 // Track the largest packet that has been acked. | 111 // Track the largest packet that has been acked. |
| 112 QuicPacketSequenceNumber largest_acked_sequence_number_; | 112 QuicPacketSequenceNumber largest_acked_sequence_number_; |
| 113 | 113 |
| 114 // Track the largest sequence number outstanding when a CWND cutback occurs. | 114 // Track the largest sequence number outstanding when a CWND cutback occurs. |
| 115 QuicPacketSequenceNumber largest_sent_at_last_cutback_; | 115 QuicPacketSequenceNumber largest_sent_at_last_cutback_; |
| 116 | 116 |
| 117 // Congestion window in packets. | 117 // Congestion window in packets. |
| 118 QuicPacketCount congestion_window_; | 118 QuicPacketCount congestion_window_; |
| 119 | 119 |
| 120 // Congestion window before the last loss event or RTO. | 120 // Congestion window before the last loss event or RTO. |
| 121 QuicByteCount previous_congestion_window_; | 121 QuicPacketCount previous_congestion_window_; |
| 122 | 122 |
| 123 // Slow start congestion window in packets, aka ssthresh. | 123 // Slow start congestion window in packets, aka ssthresh. |
| 124 QuicPacketCount slowstart_threshold_; | 124 QuicPacketCount slowstart_threshold_; |
| 125 | 125 |
| 126 // Slow start threshold before the last loss event or RTO. | 126 // Slow start threshold before the last loss event or RTO. |
| 127 QuicPacketCount previous_slowstart_threshold_; | 127 QuicPacketCount previous_slowstart_threshold_; |
| 128 | 128 |
| 129 // Whether the last loss event caused us to exit slowstart. | 129 // Whether the last loss event caused us to exit slowstart. |
| 130 // Used for stats collection of slowstart_packets_lost | 130 // Used for stats collection of slowstart_packets_lost |
| 131 bool last_cutback_exited_slowstart_; | 131 bool last_cutback_exited_slowstart_; |
| 132 | 132 |
| 133 // Maximum number of outstanding packets for tcp. | 133 // Maximum number of outstanding packets for tcp. |
| 134 QuicPacketCount max_tcp_congestion_window_; | 134 QuicPacketCount max_tcp_congestion_window_; |
| 135 | 135 |
| 136 const QuicClock* clock_; | 136 const QuicClock* clock_; |
| 137 | 137 |
| 138 DISALLOW_COPY_AND_ASSIGN(TcpCubicSender); | 138 DISALLOW_COPY_AND_ASSIGN(TcpCubicSender); |
| 139 }; | 139 }; |
| 140 | 140 |
| 141 } // namespace net | 141 } // namespace net |
| 142 | 142 |
| 143 #endif // NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_H_ | 143 #endif // NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_H_ |
| OLD | NEW |