Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Unified Diff: net/quic/congestion_control/hybrid_slow_start.h

Issue 241563002: Fix to ensure hybrid slow start is reset when QUIC's retransmission (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/quic/congestion_control/hybrid_slow_start.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « no previous file | net/quic/congestion_control/hybrid_slow_start.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698