Add a connection option, BBPD, to set the PROBE_DOWN pacing gain to 0.91 instead of 0.75. Not flag protecting because it's setting a constant to a slightly different value.
Protected by QUIC connection option BBPD.
PiperOrigin-RevId: 485988830
diff --git a/quiche/quic/core/congestion_control/bbr2_sender.cc b/quiche/quic/core/congestion_control/bbr2_sender.cc
index c3c5b90..33fe2e6 100644
--- a/quiche/quic/core/congestion_control/bbr2_sender.cc
+++ b/quiche/quic/core/congestion_control/bbr2_sender.cc
@@ -187,7 +187,6 @@
if (ContainsQuicTag(connection_options, kB207)) {
params_.exit_startup_on_persistent_queue = true;
}
-
if (ContainsQuicTag(connection_options, kBBRA)) {
model_.SetStartNewAggregationEpochAfterFullRound(true);
}
@@ -197,10 +196,13 @@
if (ContainsQuicTag(connection_options, kBBQ0)) {
params_.probe_up_includes_acks_after_cwnd_limited = true;
}
-
if (ContainsQuicTag(connection_options, kB206)) {
params_.startup_full_loss_count = params_.probe_bw_full_loss_count;
}
+ if (ContainsQuicTag(connection_options, kBBPD)) {
+ // Derived constant to ensure fairness.
+ params_.probe_bw_probe_down_pacing_gain = 0.91;
+ }
}
Limits<QuicByteCount> Bbr2Sender::GetCwndLimitsByMode() const {
diff --git a/quiche/quic/core/congestion_control/bbr2_simulator_test.cc b/quiche/quic/core/congestion_control/bbr2_simulator_test.cc
index e9dc1e2..d1cf602 100644
--- a/quiche/quic/core/congestion_control/bbr2_simulator_test.cc
+++ b/quiche/quic/core/congestion_control/bbr2_simulator_test.cc
@@ -2067,6 +2067,39 @@
ASSERT_TRUE(simulator_result);
}
+TEST_F(Bbr2MultiSenderTest, Bbr2VsBbr2BBPD) {
+ SetConnectionOption(sender_0_, kBBPD);
+ Bbr2Sender* sender_1 = SetupBbr2Sender(sender_endpoints_[1].get());
+ SetConnectionOption(sender_1, kBBPD);
+
+ MultiSenderTopologyParams params;
+ CreateNetwork(params);
+
+ const QuicByteCount transfer_size = 10 * 1024 * 1024;
+ const QuicTime::Delta transfer_time =
+ params.BottleneckBandwidth().TransferTime(transfer_size);
+ QUIC_LOG(INFO) << "Single flow transfer time: " << transfer_time;
+
+ // Transfer 10% of data in first transfer.
+ sender_endpoints_[0]->AddBytesToTransfer(transfer_size);
+ bool simulator_result = simulator_.RunUntilOrTimeout(
+ [this]() {
+ return receiver_endpoints_[0]->bytes_received() >= 0.1 * transfer_size;
+ },
+ transfer_time);
+ ASSERT_TRUE(simulator_result);
+
+ // Start the second transfer and wait until both finish.
+ sender_endpoints_[1]->AddBytesToTransfer(transfer_size);
+ simulator_result = simulator_.RunUntilOrTimeout(
+ [this]() {
+ return receiver_endpoints_[0]->bytes_received() == transfer_size &&
+ receiver_endpoints_[1]->bytes_received() == transfer_size;
+ },
+ 3 * transfer_time);
+ ASSERT_TRUE(simulator_result);
+}
+
TEST_F(Bbr2MultiSenderTest, QUIC_SLOW_TEST(MultipleBbr2s)) {
const int kTotalNumSenders = 6;
for (int i = 1; i < kTotalNumSenders; ++i) {
diff --git a/quiche/quic/core/crypto/crypto_protocol.h b/quiche/quic/core/crypto/crypto_protocol.h
index e64f3c8..d72183c 100644
--- a/quiche/quic/core/crypto/crypto_protocol.h
+++ b/quiche/quic/core/crypto/crypto_protocol.h
@@ -126,6 +126,7 @@
// bw_lo * bytes_lost/cwnd
const QuicTag kBBQ0 = TAG('B', 'B', 'Q', '0'); // Increase bytes_acked in
// PROBE_UP when app limited.
+const QuicTag kBBPD = TAG('B', 'B', 'P', 'D'); // Use 0.91 PROBE_DOWN gain.
const QuicTag kRENO = TAG('R', 'E', 'N', 'O'); // Reno Congestion Control
const QuicTag kTPCC = TAG('P', 'C', 'C', '\0'); // Performance-Oriented
// Congestion Control