Revert the meaning of QUIC connection option 'B2SL':
- Without the option, use max_delivered for inflight_hi when exiting STARTUP due to loss. This is the new default behavior.
- With the option, use estimated bdp for inflight_hi instead.

PiperOrigin-RevId: 344868027
Change-Id: I890c3970e0d662a31c6298a093dadf83d44dda6e
diff --git a/quic/core/congestion_control/bbr2_misc.h b/quic/core/congestion_control/bbr2_misc.h
index 0b65f9d..5cf0579 100644
--- a/quic/core/congestion_control/bbr2_misc.h
+++ b/quic/core/congestion_control/bbr2_misc.h
@@ -187,8 +187,8 @@
   // Can be enabled by connection option 'B2H2'.
   bool limit_inflight_hi_by_max_delivered = false;
 
-  // Can be enabled by connection option 'B2SL'.
-  bool startup_loss_exit_use_max_delivered_for_inflight_hi = false;
+  // Can be disabled by connection option 'B2SL'.
+  bool startup_loss_exit_use_max_delivered_for_inflight_hi = true;
 
   // Can be enabled by connection option 'B2DL'.
   bool use_bytes_delivered_for_inflight_hi = false;
diff --git a/quic/core/congestion_control/bbr2_sender.cc b/quic/core/congestion_control/bbr2_sender.cc
index 9a9cda0..2545fa4 100644
--- a/quic/core/congestion_control/bbr2_sender.cc
+++ b/quic/core/congestion_control/bbr2_sender.cc
@@ -139,7 +139,7 @@
   }
   if (GetQuicReloadableFlag(quic_bbr2_startup_loss_exit_use_max_delivered) &&
       ContainsQuicTag(connection_options, kB2SL)) {
-    params_.startup_loss_exit_use_max_delivered_for_inflight_hi = true;
+    params_.startup_loss_exit_use_max_delivered_for_inflight_hi = false;
   }
   if (GetQuicReloadableFlag(quic_bbr2_startup_loss_exit_use_max_delivered) &&
       ContainsQuicTag(connection_options, kB2H2)) {
diff --git a/quic/core/congestion_control/bbr2_simulator_test.cc b/quic/core/congestion_control/bbr2_simulator_test.cc
index d372cf9..fa0f31c 100644
--- a/quic/core/congestion_control/bbr2_simulator_test.cc
+++ b/quic/core/congestion_control/bbr2_simulator_test.cc
@@ -713,6 +713,7 @@
 
 // Test exiting STARTUP earlier upon loss due to loss.
 TEST_F(Bbr2DefaultTopologyTest, ExitStartupDueToLoss) {
+  SetQuicReloadableFlag(quic_bbr2_startup_loss_exit_use_max_delivered, true);
   DefaultTopologyParams params;
   params.switch_queue_capacity_in_bdp = 0.5;
   CreateNetwork(params);
@@ -738,11 +739,14 @@
       sender_->ExportDebugState().startup.round_trips_without_bandwidth_growth);
   EXPECT_NE(0u, sender_connection_stats().packets_lost);
   EXPECT_FALSE(sender_->ExportDebugState().last_sample_is_app_limited);
+
+  EXPECT_GT(sender_->ExportDebugState().inflight_hi, 1.2f * params.BDP());
 }
 
 // Test exiting STARTUP earlier upon loss due to loss when connection option
 // B2SL is used.
 TEST_F(Bbr2DefaultTopologyTest, ExitStartupDueToLossB2SL) {
+  SetQuicReloadableFlag(quic_bbr2_startup_loss_exit_use_max_delivered, true);
   SetConnectionOption(kB2SL);
   DefaultTopologyParams params;
   params.switch_queue_capacity_in_bdp = 0.5;
@@ -770,12 +774,7 @@
   EXPECT_NE(0u, sender_connection_stats().packets_lost);
   EXPECT_FALSE(sender_->ExportDebugState().last_sample_is_app_limited);
 
-  if (GetQuicReloadableFlag(quic_bbr2_startup_loss_exit_use_max_delivered)) {
-    EXPECT_GT(sender_->ExportDebugState().inflight_hi, 1.2f * params.BDP());
-  } else {
-    EXPECT_APPROX_EQ(sender_->ExportDebugState().inflight_hi, params.BDP(),
-                     0.1f);
-  }
+  EXPECT_APPROX_EQ(sender_->ExportDebugState().inflight_hi, params.BDP(), 0.1f);
 }
 
 TEST_F(Bbr2DefaultTopologyTest, SenderPoliced) {