| Index: net/quic/core/congestion_control/cubic_bytes.cc
|
| diff --git a/net/quic/core/congestion_control/cubic_bytes.cc b/net/quic/core/congestion_control/cubic_bytes.cc
|
| index 7abe9209fe733b3d672cb83abf66df6ab7bdfcd0..388dd008b2c4365bd0690d31aa6f869281ec5360 100644
|
| --- a/net/quic/core/congestion_control/cubic_bytes.cc
|
| +++ b/net/quic/core/congestion_control/cubic_bytes.cc
|
| @@ -41,7 +41,8 @@ CubicBytes::CubicBytes(const QuicClock* clock)
|
| num_connections_(kDefaultNumConnections),
|
| epoch_(QuicTime::Zero()),
|
| last_update_time_(QuicTime::Zero()),
|
| - fix_convex_mode_(false) {
|
| + fix_convex_mode_(false),
|
| + fix_cubic_quantization_(false) {
|
| Reset();
|
| }
|
|
|
| @@ -76,12 +77,17 @@ void CubicBytes::Reset() {
|
| time_to_origin_point_ = 0;
|
| last_target_congestion_window_ = 0;
|
| fix_convex_mode_ = false;
|
| + fix_cubic_quantization_ = false;
|
| }
|
|
|
| void CubicBytes::SetFixConvexMode(bool fix_convex_mode) {
|
| fix_convex_mode_ = fix_convex_mode;
|
| }
|
|
|
| +void CubicBytes::SetFixCubicQuantization(bool fix_cubic_quantization) {
|
| + fix_cubic_quantization_ = fix_cubic_quantization;
|
| +}
|
| +
|
| void CubicBytes::OnApplicationLimited() {
|
| // When sender is not using the available congestion window, the window does
|
| // not grow. But to be RTT-independent, Cubic assumes that the sender has been
|
| @@ -158,8 +164,13 @@ QuicByteCount CubicBytes::CongestionWindowAfterAck(
|
| offset = positive_offset;
|
| }
|
| QuicByteCount delta_congestion_window =
|
| - ((kCubeCongestionWindowScale * offset * offset * offset) >> kCubeScale) *
|
| - kDefaultTCPMSS;
|
| + fix_cubic_quantization_
|
| + ? (kCubeCongestionWindowScale * offset * offset * offset *
|
| + kDefaultTCPMSS) >>
|
| + kCubeScale
|
| + : ((kCubeCongestionWindowScale * offset * offset * offset) >>
|
| + kCubeScale) *
|
| + kDefaultTCPMSS;
|
|
|
| const bool add_delta = elapsed_time > time_to_origin_point_;
|
| DCHECK(add_delta ||
|
|
|