OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 // TCP cubic send side congestion algorithm, emulates the behavior of TCP cubic. | 5 // TCP cubic send side congestion algorithm, emulates the behavior of TCP cubic. |
6 | 6 |
7 #ifndef NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_BYTES_H_ | 7 #ifndef NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_BYTES_H_ |
8 #define NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_BYTES_H_ | 8 #define NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_BYTES_H_ |
9 | 9 |
10 #include <stdint.h> | 10 #include <stdint.h> |
(...skipping 29 matching lines...) Expand all Loading... |
40 | 40 |
41 // Start implementation of SendAlgorithmInterface. | 41 // Start implementation of SendAlgorithmInterface. |
42 void SetNumEmulatedConnections(int num_connections) override; | 42 void SetNumEmulatedConnections(int num_connections) override; |
43 void SetMaxCongestionWindow(QuicByteCount max_congestion_window) override; | 43 void SetMaxCongestionWindow(QuicByteCount max_congestion_window) override; |
44 void OnConnectionMigration() override; | 44 void OnConnectionMigration() override; |
45 QuicByteCount GetCongestionWindow() const override; | 45 QuicByteCount GetCongestionWindow() const override; |
46 QuicByteCount GetSlowStartThreshold() const override; | 46 QuicByteCount GetSlowStartThreshold() const override; |
47 CongestionControlType GetCongestionControlType() const override; | 47 CongestionControlType GetCongestionControlType() const override; |
48 // End implementation of SendAlgorithmInterface. | 48 // End implementation of SendAlgorithmInterface. |
49 | 49 |
| 50 QuicByteCount min_congestion_window() const { return min_congestion_window_; } |
| 51 |
50 protected: | 52 protected: |
51 // TcpCubicSenderBase methods | 53 // TcpCubicSenderBase methods |
52 void SetCongestionWindowFromBandwidthAndRtt(QuicBandwidth bandwidth, | 54 void SetCongestionWindowFromBandwidthAndRtt(QuicBandwidth bandwidth, |
53 QuicTime::Delta rtt) override; | 55 QuicTime::Delta rtt) override; |
54 void SetCongestionWindowInPackets(QuicPacketCount congestion_window) override; | 56 void SetCongestionWindowInPackets(QuicPacketCount congestion_window) override; |
55 void SetMinCongestionWindowInPackets( | 57 void SetMinCongestionWindowInPackets( |
56 QuicPacketCount congestion_window) override; | 58 QuicPacketCount congestion_window) override; |
57 void ExitSlowstart() override; | 59 void ExitSlowstart() override; |
58 void OnPacketLost(QuicPacketNumber largest_loss, | 60 void OnPacketLost(QuicPacketNumber largest_loss, |
59 QuicByteCount lost_bytes, | 61 QuicByteCount lost_bytes, |
(...skipping 24 matching lines...) Expand all Loading... |
84 QuicByteCount slowstart_threshold_; | 86 QuicByteCount slowstart_threshold_; |
85 | 87 |
86 // Initial TCP congestion window in bytes. This variable can only be set when | 88 // Initial TCP congestion window in bytes. This variable can only be set when |
87 // this algorithm is created. | 89 // this algorithm is created. |
88 const QuicByteCount initial_tcp_congestion_window_; | 90 const QuicByteCount initial_tcp_congestion_window_; |
89 | 91 |
90 // Initial maximum TCP congestion window in bytes. This variable can only be | 92 // Initial maximum TCP congestion window in bytes. This variable can only be |
91 // set when this algorithm is created. | 93 // set when this algorithm is created. |
92 const QuicByteCount initial_max_tcp_congestion_window_; | 94 const QuicByteCount initial_max_tcp_congestion_window_; |
93 | 95 |
| 96 // The minimum window when exiting slow start with large reduction. |
| 97 QuicByteCount min_slow_start_exit_window_; |
| 98 |
94 DISALLOW_COPY_AND_ASSIGN(TcpCubicSenderBytes); | 99 DISALLOW_COPY_AND_ASSIGN(TcpCubicSenderBytes); |
95 }; | 100 }; |
96 | 101 |
97 } // namespace net | 102 } // namespace net |
98 | 103 |
99 #endif // NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_BYTES_SENDER_H_ | 104 #endif // NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_BYTES_SENDER_H_ |
OLD | NEW |