gfe-relnote: In QUIC BBRv2, add ack height into PROBE_UP's queuing_threshold. Protected by --gfe2_reloadable_flag_quic_bbr2_add_ack_height_to_queueing_threshold.
PiperOrigin-RevId: 299425371
Change-Id: I8643b5df6bb72f0759695f31e6f480a1bc4d3400
diff --git a/quic/core/congestion_control/bbr2_probe_bw.cc b/quic/core/congestion_control/bbr2_probe_bw.cc
index a4c419a..1002983 100644
--- a/quic/core/congestion_control/bbr2_probe_bw.cc
+++ b/quic/core/congestion_control/bbr2_probe_bw.cc
@@ -391,9 +391,16 @@
// TCP uses min_rtt instead of a full round:
// HasPhaseLasted(model_->MinRtt(), congestion_event)
} else if (cycle_.rounds_in_phase > 0) {
- QuicByteCount bdp = model_->BDP(model_->MaxBandwidth());
+ const QuicByteCount bdp = model_->BDP(model_->MaxBandwidth());
+ QuicByteCount queuing_threshold_extra_bytes = 2 * kDefaultTCPMSS;
+ if (add_ack_height_to_queueing_threshold_) {
+ QUIC_RELOADABLE_FLAG_COUNT(
+ quic_bbr2_add_ack_height_to_queueing_threshold);
+ queuing_threshold_extra_bytes += model_->MaxAckHeight();
+ }
QuicByteCount queuing_threshold =
- (Params().probe_bw_probe_inflight_gain * bdp) + 2 * kDefaultTCPMSS;
+ (Params().probe_bw_probe_inflight_gain * bdp) +
+ queuing_threshold_extra_bytes;
is_queuing = prior_in_flight >= queuing_threshold;
QUIC_DVLOG(3) << sender_
<< " Checking if building up a queue. prior_in_flight:"
diff --git a/quic/core/congestion_control/bbr2_probe_bw.h b/quic/core/congestion_control/bbr2_probe_bw.h
index 5c0224f..e42ab30 100644
--- a/quic/core/congestion_control/bbr2_probe_bw.h
+++ b/quic/core/congestion_control/bbr2_probe_bw.h
@@ -126,6 +126,9 @@
bool last_cycle_probed_too_high_;
bool last_cycle_stopped_risky_probe_;
+
+ const bool add_ack_height_to_queueing_threshold_ =
+ GetQuicReloadableFlag(quic_bbr2_add_ack_height_to_queueing_threshold);
};
QUIC_EXPORT_PRIVATE std::ostream& operator<<(
diff --git a/quic/core/congestion_control/bbr2_simulator_test.cc b/quic/core/congestion_control/bbr2_simulator_test.cc
index e3af3dc..553dfcf 100644
--- a/quic/core/congestion_control/bbr2_simulator_test.cc
+++ b/quic/core/congestion_control/bbr2_simulator_test.cc
@@ -409,7 +409,7 @@
// The margin here is quite high, since there exists a possibility that the
// connection just exited high gain cycle.
- EXPECT_APPROX_EQ(params.RTT(), rtt_stats()->smoothed_rtt(), 0.2f);
+ EXPECT_APPROX_EQ(params.RTT(), rtt_stats()->smoothed_rtt(), 1.0f);
}
TEST_F(Bbr2DefaultTopologyTest, SimpleTransferSmallBuffer) {
@@ -487,7 +487,7 @@
EXPECT_FALSE(sender_->ExportDebugState().last_sample_is_app_limited);
// The margin here is high, because the aggregation greatly increases
// smoothed rtt.
- EXPECT_GE(params.RTT() * 2, rtt_stats()->smoothed_rtt());
+ EXPECT_GE(params.RTT() * 3, rtt_stats()->smoothed_rtt());
EXPECT_APPROX_EQ(params.RTT(), rtt_stats()->min_rtt(), 0.1f);
}