| 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 // Cubic algorithm, helper class to TCP cubic. | 5 // Cubic algorithm, helper class to TCP cubic. |
| 6 // For details see http://netsrv.csc.ncsu.edu/export/cubic_a_new_tcp_2008.pdf. | 6 // For details see http://netsrv.csc.ncsu.edu/export/cubic_a_new_tcp_2008.pdf. |
| 7 | 7 |
| 8 #ifndef NET_QUIC_CORE_CONGESTION_CONTROL_CUBIC_H_ | 8 #ifndef NET_QUIC_CORE_CONGESTION_CONTROL_CUBIC_H_ |
| 9 #define NET_QUIC_CORE_CONGESTION_CONTROL_CUBIC_H_ | 9 #define NET_QUIC_CORE_CONGESTION_CONTROL_CUBIC_H_ |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 // Compute a new congestion window to use after a loss event. | 31 // Compute a new congestion window to use after a loss event. |
| 32 // Returns the new congestion window in packets. The new congestion window is | 32 // Returns the new congestion window in packets. The new congestion window is |
| 33 // a multiplicative decrease of our current window. | 33 // a multiplicative decrease of our current window. |
| 34 QuicPacketCount CongestionWindowAfterPacketLoss(QuicPacketCount current); | 34 QuicPacketCount CongestionWindowAfterPacketLoss(QuicPacketCount current); |
| 35 | 35 |
| 36 // Compute a new congestion window to use after a received ACK. | 36 // Compute a new congestion window to use after a received ACK. |
| 37 // Returns the new congestion window in packets. The new congestion | 37 // Returns the new congestion window in packets. The new congestion |
| 38 // window follows a cubic function that depends on the time passed | 38 // window follows a cubic function that depends on the time passed |
| 39 // since last packet loss. | 39 // since last packet loss. |
| 40 QuicPacketCount CongestionWindowAfterAck(QuicPacketCount current, | 40 QuicPacketCount CongestionWindowAfterAck(QuicPacketCount current, |
| 41 QuicTime::Delta delay_min); | 41 QuicTime::Delta delay_min, |
| 42 QuicTime event_time); |
| 42 | 43 |
| 43 // Call on ack arrival when sender is unable to use the available congestion | 44 // Call on ack arrival when sender is unable to use the available congestion |
| 44 // window. Resets Cubic state during quiescence. | 45 // window. Resets Cubic state during quiescence. |
| 45 void OnApplicationLimited(); | 46 void OnApplicationLimited(); |
| 46 | 47 |
| 47 // If true, enable the fix for the convex-mode signing bug. See | 48 // If true, enable the fix for the convex-mode signing bug. See |
| 48 // b/32170105 for more information about the bug. | 49 // b/32170105 for more information about the bug. |
| 49 // TODO(jokulik): Remove once the fix is enabled by default. | 50 // TODO(jokulik): Remove once the fix is enabled by default. |
| 50 void SetFixConvexMode(bool fix_convex_mode); | 51 void SetFixConvexMode(bool fix_convex_mode); |
| 51 | 52 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 // Fix convex mode for cubic. | 106 // Fix convex mode for cubic. |
| 106 // TODO(jokulik): Remove once the cubic convex experiment is done. | 107 // TODO(jokulik): Remove once the cubic convex experiment is done. |
| 107 bool fix_convex_mode_; | 108 bool fix_convex_mode_; |
| 108 | 109 |
| 109 DISALLOW_COPY_AND_ASSIGN(Cubic); | 110 DISALLOW_COPY_AND_ASSIGN(Cubic); |
| 110 }; | 111 }; |
| 111 | 112 |
| 112 } // namespace net | 113 } // namespace net |
| 113 | 114 |
| 114 #endif // NET_QUIC_CORE_CONGESTION_CONTROL_CUBIC_H_ | 115 #endif // NET_QUIC_CORE_CONGESTION_CONTROL_CUBIC_H_ |
| OLD | NEW |