| Index: net/quic/congestion_control/hybrid_slow_start.h
|
| diff --git a/net/quic/congestion_control/hybrid_slow_start.h b/net/quic/congestion_control/hybrid_slow_start.h
|
| index e41eba910f8288afb09bad3fb61777027813b08c..17f63cfbac7636677707516760f8320630ef211c 100644
|
| --- a/net/quic/congestion_control/hybrid_slow_start.h
|
| +++ b/net/quic/congestion_control/hybrid_slow_start.h
|
| @@ -37,11 +37,11 @@ class NET_EXPORT_PRIVATE HybridSlowStart {
|
| bool ShouldExitSlowStart(const RttStats* rtt_stats,
|
| int64 congestion_window);
|
|
|
| - // TODO(ianswett): The following methods should be private, but that requires
|
| - // a follow up CL to update the unit test.
|
| // Start a new slow start phase.
|
| void Restart();
|
|
|
| + // TODO(ianswett): The following methods should be private, but that requires
|
| + // a follow up CL to update the unit test.
|
| // Returns true if this ack the last sequence number of our current slow start
|
| // round.
|
| // Call Reset if this returns true.
|
| @@ -51,27 +51,33 @@ class NET_EXPORT_PRIVATE HybridSlowStart {
|
| void Reset(QuicPacketSequenceNumber end_sequence_number);
|
|
|
| // rtt: it the RTT for this ack packet.
|
| - // delay_min: is the lowest delay (RTT) we have seen during the session.
|
| - void Update(QuicTime::Delta rtt, QuicTime::Delta delay_min);
|
| -
|
| - // Returns true when we should exit slow start.
|
| - bool Exit();
|
| + // min_rtt: is the lowest delay (RTT) we have seen during the session.
|
| + // Returns true if slow start should be exited early, false otherwise.
|
| + bool UpdateAndMaybeExit(QuicTime::Delta rtt, QuicTime::Delta min_rtt);
|
|
|
| - bool started() const { return started_; }
|
| + // Whether slow start has started.
|
| + bool started() const {
|
| + return started_;
|
| + }
|
|
|
| private:
|
| const QuicClock* clock_;
|
| + // Whether the hybrid slow start has been started.
|
| bool started_;
|
| bool found_ack_train_;
|
| bool found_delay_;
|
| QuicTime round_start_; // Beginning of each slow start round.
|
| // We need to keep track of the end sequence number of each RTT "burst".
|
| bool update_end_sequence_number_;
|
| + // TODO(ianswett): This should be redundant to the above, but was moved
|
| + // from TcpCubicSender to ensure the unit tests continued to pass.
|
| QuicPacketSequenceNumber sender_end_sequence_number_;
|
| QuicPacketSequenceNumber end_sequence_number_; // End of slow start round.
|
| - QuicTime last_time_; // Last time when the ACK spacing was close.
|
| - uint8 sample_count_; // Number of samples to decide current RTT.
|
| - QuicTime::Delta current_rtt_; // The minimum rtt of current round.
|
| + // Last time when the spacing between ack arrivals was less than 2 ms.
|
| + // Defaults to the beginning of the round.
|
| + QuicTime last_close_ack_pair_time_;
|
| + uint32 rtt_sample_count_; // Number of rtt samples in the current round.
|
| + QuicTime::Delta current_min_rtt_; // The minimum rtt of current round.
|
|
|
| DISALLOW_COPY_AND_ASSIGN(HybridSlowStart);
|
| };
|
|
|