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 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_PACKETS_H_ | 7 #ifndef NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_PACKETS_H_ |
8 #define NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_PACKETS_H_ | 8 #define NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_PACKETS_H_ |
9 | 9 |
10 #include <stdint.h> | 10 #include <stdint.h> |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 // Start implementation of SendAlgorithmInterface. | 43 // Start implementation of SendAlgorithmInterface. |
44 void SetNumEmulatedConnections(int num_connections) override; | 44 void SetNumEmulatedConnections(int num_connections) override; |
45 void SetMaxCongestionWindow(QuicByteCount max_congestion_window) override; | 45 void SetMaxCongestionWindow(QuicByteCount max_congestion_window) override; |
46 void OnConnectionMigration() override; | 46 void OnConnectionMigration() override; |
47 QuicByteCount GetCongestionWindow() const override; | 47 QuicByteCount GetCongestionWindow() const override; |
48 QuicByteCount GetSlowStartThreshold() const override; | 48 QuicByteCount GetSlowStartThreshold() const override; |
49 CongestionControlType GetCongestionControlType() const override; | 49 CongestionControlType GetCongestionControlType() const override; |
50 // End implementation of SendAlgorithmInterface. | 50 // End implementation of SendAlgorithmInterface. |
51 | 51 |
| 52 QuicByteCount min_congestion_window() const { return min_congestion_window_; } |
| 53 |
52 protected: | 54 protected: |
53 // TcpCubicSenderBase methods | 55 // TcpCubicSenderBase methods |
54 void SetCongestionWindowFromBandwidthAndRtt(QuicBandwidth bandwidth, | 56 void SetCongestionWindowFromBandwidthAndRtt(QuicBandwidth bandwidth, |
55 QuicTime::Delta rtt) override; | 57 QuicTime::Delta rtt) override; |
56 void SetCongestionWindowInPackets(QuicPacketCount congestion_window) override; | 58 void SetCongestionWindowInPackets(QuicPacketCount congestion_window) override; |
57 void SetMinCongestionWindowInPackets( | 59 void SetMinCongestionWindowInPackets( |
58 QuicPacketCount congestion_window) override; | 60 QuicPacketCount congestion_window) override; |
59 void ExitSlowstart() override; | 61 void ExitSlowstart() override; |
60 void OnPacketLost(QuicPacketNumber largest_loss, | 62 void OnPacketLost(QuicPacketNumber largest_loss, |
61 QuicByteCount lost_bytes, | 63 QuicByteCount lost_bytes, |
(...skipping 24 matching lines...) Expand all Loading... |
86 QuicPacketCount max_tcp_congestion_window_; | 88 QuicPacketCount max_tcp_congestion_window_; |
87 | 89 |
88 // Initial TCP congestion window. This variable can only be set when this | 90 // Initial TCP congestion window. This variable can only be set when this |
89 // algorithm is created. | 91 // algorithm is created. |
90 const QuicPacketCount initial_tcp_congestion_window_; | 92 const QuicPacketCount initial_tcp_congestion_window_; |
91 | 93 |
92 // Initial maximum TCP congestion window. This variable can only be set when | 94 // Initial maximum TCP congestion window. This variable can only be set when |
93 // this algorithm is created. | 95 // this algorithm is created. |
94 const QuicPacketCount initial_max_tcp_congestion_window_; | 96 const QuicPacketCount initial_max_tcp_congestion_window_; |
95 | 97 |
| 98 // The minimum window when exiting slow start with large reduction. |
| 99 QuicPacketCount min_slow_start_exit_window_; |
| 100 |
96 DISALLOW_COPY_AND_ASSIGN(TcpCubicSenderPackets); | 101 DISALLOW_COPY_AND_ASSIGN(TcpCubicSenderPackets); |
97 }; | 102 }; |
98 | 103 |
99 } // namespace net | 104 } // namespace net |
100 | 105 |
101 #endif // NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_H_ | 106 #endif // NET_QUIC_CONGESTION_CONTROL_TCP_CUBIC_SENDER_H_ |
OLD | NEW |