Remove dead code in BBR2 and BBR. flexible_app_limited was added for Quartc, which is not longer active.
PiperOrigin-RevId: 339266593
Change-Id: Ie291a8b4907635f4ff9a1f8920dec9dda3484aaf
diff --git a/quic/core/congestion_control/bbr2_misc.h b/quic/core/congestion_control/bbr2_misc.h
index 2287960..0d852e9 100644
--- a/quic/core/congestion_control/bbr2_misc.h
+++ b/quic/core/congestion_control/bbr2_misc.h
@@ -171,10 +171,6 @@
* Experimental flags from QuicConfig.
*/
- // Indicates app-limited calls should be ignored as long as there's
- // enough data inflight to see more bandwidth when necessary.
- bool flexible_app_limited = false;
-
// Can be disabled by connection option 'B2NA'.
bool add_ack_height_to_queueing_threshold = true;
diff --git a/quic/core/congestion_control/bbr2_sender.cc b/quic/core/congestion_control/bbr2_sender.cc
index a2e23bf..5fcea6c 100644
--- a/quic/core/congestion_control/bbr2_sender.cc
+++ b/quic/core/congestion_control/bbr2_sender.cc
@@ -100,9 +100,6 @@
void Bbr2Sender::SetFromConfig(const QuicConfig& config,
Perspective perspective) {
- if (config.HasClientRequestedIndependentOption(kBBR9, perspective)) {
- params_.flexible_app_limited = true;
- }
if (config.HasClientRequestedIndependentOption(kB2NA, perspective)) {
params_.add_ack_height_to_queueing_threshold = false;
}
@@ -405,9 +402,6 @@
if (bytes_in_flight >= GetCongestionWindow()) {
return;
}
- if (params().flexible_app_limited && IsPipeSufficientlyFull()) {
- return;
- }
model_.OnApplicationLimited();
QUIC_DVLOG(2) << this << " Becoming application limited. Last sent packet: "
@@ -443,41 +437,7 @@
bool Bbr2Sender::ShouldSendProbingPacket() const {
// TODO(wub): Implement ShouldSendProbingPacket properly.
- if (!BBR2_MODE_DISPATCH(IsProbingForBandwidth())) {
- return false;
- }
-
- // TODO(b/77975811): If the pipe is highly under-utilized, consider not
- // sending a probing transmission, because the extra bandwidth is not needed.
- // If flexible_app_limited is enabled, check if the pipe is sufficiently full.
- if (params().flexible_app_limited) {
- const bool is_pipe_sufficiently_full = IsPipeSufficientlyFull();
- QUIC_DVLOG(3) << this << " CWND: " << GetCongestionWindow()
- << ", inflight: " << unacked_packets_->bytes_in_flight()
- << ", pacing_rate: " << PacingRate(0)
- << ", flexible_app_limited: true, ShouldSendProbingPacket: "
- << !is_pipe_sufficiently_full;
- return !is_pipe_sufficiently_full;
- } else {
- return true;
- }
-}
-
-bool Bbr2Sender::IsPipeSufficientlyFull() const {
- QuicByteCount bytes_in_flight = unacked_packets_->bytes_in_flight();
- // See if we need more bytes in flight to see more bandwidth.
- if (mode_ == Bbr2Mode::STARTUP) {
- // STARTUP exits if it doesn't observe a 25% bandwidth increase, so the CWND
- // must be more than 25% above the target.
- return bytes_in_flight >= GetTargetCongestionWindow(1.5);
- }
- if (model_.pacing_gain() > 1) {
- // Super-unity PROBE_BW doesn't exit until 1.25 * BDP is achieved.
- return bytes_in_flight >= GetTargetCongestionWindow(model_.pacing_gain());
- }
- // If bytes_in_flight are above the target congestion window, it should be
- // possible to observe the same or more bandwidth if it's available.
- return bytes_in_flight >= GetTargetCongestionWindow(1.1);
+ return BBR2_MODE_DISPATCH(IsProbingForBandwidth());
}
std::string Bbr2Sender::GetDebugState() const {
diff --git a/quic/core/congestion_control/bbr2_sender.h b/quic/core/congestion_control/bbr2_sender.h
index 1b328fe..6a83184 100644
--- a/quic/core/congestion_control/bbr2_sender.h
+++ b/quic/core/congestion_control/bbr2_sender.h
@@ -160,10 +160,6 @@
return random_->RandUint64() % max;
}
- // Returns true if there are enough bytes in flight to ensure more bandwidth
- // will be observed if present.
- bool IsPipeSufficientlyFull() const;
-
// Cwnd limits imposed by the current Bbr2 mode.
Limits<QuicByteCount> GetCwndLimitsByMode() const;
diff --git a/quic/core/congestion_control/bbr_sender.cc b/quic/core/congestion_control/bbr_sender.cc
index ac953ba..7ce3ab5 100644
--- a/quic/core/congestion_control/bbr_sender.cc
+++ b/quic/core/congestion_control/bbr_sender.cc
@@ -221,24 +221,6 @@
return true;
}
-bool BbrSender::IsPipeSufficientlyFull() const {
- // See if we need more bytes in flight to see more bandwidth.
- if (mode_ == STARTUP) {
- // STARTUP exits if it doesn't observe a 25% bandwidth increase, so the CWND
- // must be more than 25% above the target.
- return unacked_packets_->bytes_in_flight() >=
- GetTargetCongestionWindow(1.5);
- }
- if (pacing_gain_ > 1) {
- // Super-unity PROBE_BW doesn't exit until 1.25 * BDP is achieved.
- return unacked_packets_->bytes_in_flight() >=
- GetTargetCongestionWindow(pacing_gain_);
- }
- // If bytes_in_flight are above the target congestion window, it should be
- // possible to observe the same or more bandwidth if it's available.
- return unacked_packets_->bytes_in_flight() >= GetTargetCongestionWindow(1.1);
-}
-
void BbrSender::SetFromConfig(const QuicConfig& config,
Perspective perspective) {
if (config.HasClientRequestedIndependentOption(k1RTT, perspective)) {
diff --git a/quic/core/congestion_control/bbr_sender.h b/quic/core/congestion_control/bbr_sender.h
index ae6cce9..30f2945 100644
--- a/quic/core/congestion_control/bbr_sender.h
+++ b/quic/core/congestion_control/bbr_sender.h
@@ -244,10 +244,6 @@
void CalculateRecoveryWindow(QuicByteCount bytes_acked,
QuicByteCount bytes_lost);
- // Returns true if there are enough bytes in flight to ensure more bandwidth
- // will be observed if present.
- bool IsPipeSufficientlyFull() const;
-
// Called right before exiting STARTUP.
void OnExitStartup(QuicTime now);