summaryrefslogtreecommitdiff
path: root/chromium/net/quic/core/congestion_control/bbr_sender.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/net/quic/core/congestion_control/bbr_sender.h')
-rw-r--r--chromium/net/quic/core/congestion_control/bbr_sender.h43
1 files changed, 30 insertions, 13 deletions
diff --git a/chromium/net/quic/core/congestion_control/bbr_sender.h b/chromium/net/quic/core/congestion_control/bbr_sender.h
index 421f625f6f6..31102b7d91f 100644
--- a/chromium/net/quic/core/congestion_control/bbr_sender.h
+++ b/chromium/net/quic/core/congestion_control/bbr_sender.h
@@ -119,7 +119,7 @@ class QUIC_EXPORT_PRIVATE BbrSender : public SendAlgorithmInterface {
void OnRetransmissionTimeout(bool packets_retransmitted) override {}
void OnConnectionMigration() override {}
QuicTime::Delta TimeUntilSend(QuicTime now,
- QuicByteCount bytes_in_flight) const override;
+ QuicByteCount bytes_in_flight) override;
QuicBandwidth PacingRate(QuicByteCount bytes_in_flight) const override;
QuicBandwidth BandwidthEstimate() const override;
QuicByteCount GetCongestionWindow() const override;
@@ -196,10 +196,15 @@ class QUIC_EXPORT_PRIVATE BbrSender : public SendAlgorithmInterface {
bool has_losses,
bool is_round_start);
- // Updates the ack spacing max filter if a larger value is observed.
- void UpdateAckSpacing(QuicTime ack_time,
- QuicPacketNumber largest_newly_acked,
- const CongestionVector& acked_packets);
+ // Returns true if recent ack rate has decreased substantially and if sender
+ // is allowed to continue sending when congestion window limited.
+ bool SlowDeliveryAllowsSending(QuicTime now, QuicByteCount bytes_in_flight);
+
+ // Updates history of recently received acks. Acks are considered recent
+ // if received within kRecentlyAckedRttFraction x smoothed RTT in the past.
+ // Adds new ack to recently_acked_ if |newly_acked_bytes| is non-zero.
+ void UpdateRecentlyAcked(QuicTime new_ack_time,
+ QuicByteCount newly_acked_bytes);
// Updates the ack aggregation max filter in bytes.
void UpdateAckAggregationBytes(QuicTime ack_time,
@@ -211,7 +216,8 @@ class QUIC_EXPORT_PRIVATE BbrSender : public SendAlgorithmInterface {
void CalculateCongestionWindow(QuicByteCount bytes_acked);
// Determines the approriate window that constrains the in-flight during
// recovery.
- void CalculateRecoveryWindow(QuicByteCount bytes_acked);
+ void CalculateRecoveryWindow(QuicByteCount bytes_acked,
+ QuicByteCount bytes_lost);
const RttStats* rtt_stats_;
const QuicUnackedPacketMap* unacked_packets_;
@@ -236,13 +242,6 @@ class QUIC_EXPORT_PRIVATE BbrSender : public SendAlgorithmInterface {
// round-trips.
MaxBandwidthFilter max_bandwidth_;
- // Tracks the maximum spacing between two acks acknowledging in order packets.
- MaxAckDelayFilter max_ack_spacing_;
-
- // The time the largest acked packet was acked and when it was sent.
- QuicTime largest_acked_time_;
- QuicTime largest_acked_sent_time_;
-
// Tracks the maximum number of bytes acked faster than the sending rate.
MaxAckHeightFilter max_ack_height_;
@@ -282,6 +281,13 @@ class QUIC_EXPORT_PRIVATE BbrSender : public SendAlgorithmInterface {
// The number of RTTs to stay in STARTUP mode. Defaults to 3.
QuicRoundTripCount num_startup_rtts_;
+ // Gain to use when delivery rate is slow.
+ // TODO(jri): Make this a constant if we decide to use this code for BBR.
+ const float congestion_window_gain_for_slow_delivery_;
+ // Threshold multiplier below which delivery is considered slow.
+ // TODO(jri): Make this a constant if we decide to use this code for BBR.
+ const float threshold_multiplier_for_slow_delivery_;
+
// Number of round-trips in PROBE_BW mode, used for determining the current
// pacing gain cycle.
int cycle_current_offset_;
@@ -317,6 +323,17 @@ class QUIC_EXPORT_PRIVATE BbrSender : public SendAlgorithmInterface {
// A window used to limit the number of bytes in flight during loss recovery.
QuicByteCount recovery_window_;
+ // Records information about a received ack
+ struct DataDelivered {
+ QuicTime ack_time;
+ QuicByteCount acked_bytes;
+ };
+
+ // Data structure to record recently received acks. Used for determining
+ // recently seen ack rate over a short period in the past.
+ std::deque<DataDelivered> recently_acked_;
+ QuicByteCount bytes_recently_acked_;
+
DISALLOW_COPY_AND_ASSIGN(BbrSender);
};