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

Unified Diff: net/quic/core/congestion_control/bbr_sender.h

Issue 2487613002: Landing Recent QUIC changes until 12:43 PM, Nov 5, 2016 UTC+8 (Closed)
Patch Set: Created 4 years, 1 month 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
Index: net/quic/core/congestion_control/bbr_sender.h
diff --git a/net/quic/core/congestion_control/bbr_sender.h b/net/quic/core/congestion_control/bbr_sender.h
index 7e0842336624cc08666c51360b6a3546923e4abc..e146eece8389a16e690751fa617f2b3d22dfcfd1 100644
--- a/net/quic/core/congestion_control/bbr_sender.h
+++ b/net/quic/core/congestion_control/bbr_sender.h
@@ -51,6 +51,17 @@ class NET_EXPORT_PRIVATE BbrSender : public SendAlgorithmInterface {
PROBE_RTT,
};
+ // Indicates how the congestion control limits the amount of bytes in flight.
+ enum RecoveryState {
+ // Do not limit.
+ NOT_IN_RECOVERY,
+ // Allow an extra outstanding byte for each byte acknowledged.
+ CONSERVATION,
+ // Allow two extra outstanding bytes for each byte acknowledged (slow
+ // start).
+ GROWTH
+ };
+
// Debug state can be exported in order to troubleshoot potential congestion
// control issues.
struct DebugState {
@@ -70,6 +81,9 @@ class NET_EXPORT_PRIVATE BbrSender : public SendAlgorithmInterface {
QuicTime::Delta min_rtt;
QuicTime min_rtt_timestamp;
+ RecoveryState recovery_state;
+ QuicByteCount recovery_window;
+
bool last_sample_is_app_limited;
};
@@ -160,11 +174,19 @@ class NET_EXPORT_PRIVATE BbrSender : public SendAlgorithmInterface {
void MaybeEnterOrExitProbeRtt(QuicTime now,
bool is_round_start,
bool min_rtt_expired);
+ // Determines whether BBR needs to enter, exit or advance state of the
+ // recovery.
+ void UpdateRecoveryState(QuicPacketNumber last_acked_packet,
+ bool has_losses,
+ bool is_round_start);
// Determines the appropriate pacing rate for the connection.
void CalculatePacingRate();
// Determines the appropriate congestion window for the connection.
void CalculateCongestionWindow(QuicByteCount bytes_acked);
+ // Determines the approriate window that constrains the in-flight during
+ // recovery.
+ void CalculateRecoveryWindow(QuicByteCount bytes_acked);
const QuicClock* clock_;
const RttStats* rtt_stats_;
@@ -240,6 +262,14 @@ class NET_EXPORT_PRIVATE BbrSender : public SendAlgorithmInterface {
// app-limited.
bool last_sample_is_app_limited_;
+ // Current state of recovery.
+ RecoveryState recovery_state_;
+ // Receiving acknowledgement of a packet after |end_recovery_at_| will cause
+ // BBR to exit the recovery mode.
+ QuicPacketNumber end_recovery_at_;
+ // A window used to limit the number of bytes in flight during loss recovery.
+ QuicByteCount recovery_window_;
+
DISALLOW_COPY_AND_ASSIGN(BbrSender);
};
« no previous file with comments | « net/quic/chromium/quic_chromium_client_stream_test.cc ('k') | net/quic/core/congestion_control/bbr_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698