Deprecate gfe2_restart_flag_quic_set_packet_state_if_all_data_retransmitted.
PiperOrigin-RevId: 443397521
diff --git a/quiche/quic/core/quic_connection_test.cc b/quiche/quic/core/quic_connection_test.cc
index 932addc..97f69f3 100644
--- a/quiche/quic/core/quic_connection_test.cc
+++ b/quiche/quic/core/quic_connection_test.cc
@@ -15514,26 +15514,17 @@
clock_.AdvanceTime(retransmission_time - clock_.Now());
connection_.GetRetransmissionAlarm()->Fire();
- if (GetQuicRestartFlag(quic_set_packet_state_if_all_data_retransmitted)) {
- // Verify the retransmission is a coalesced packet with HANDSHAKE 2 and
- // 1-RTT 3.
- EXPECT_EQ(0x04040404u, writer_->final_bytes_of_last_packet());
- // Only the first packet in the coalesced packet has been processed.
- EXPECT_EQ(1u, writer_->crypto_frames().size());
- // Process the coalesced 1-RTT packet.
- ASSERT_TRUE(writer_->coalesced_packet() != nullptr);
- auto packet = writer_->coalesced_packet()->Clone();
- writer_->framer()->ProcessPacket(*packet);
- EXPECT_EQ(1u, writer_->stream_frames().size());
- ASSERT_TRUE(writer_->coalesced_packet() == nullptr);
- } else {
- // Although packet 2 has not been retransmitted, it has been marked PTOed
- // and a HANDHSAKE PING gets retransmitted.
- EXPECT_EQ(0x03030303u, writer_->final_bytes_of_last_packet());
- EXPECT_EQ(1u, writer_->ping_frames().size());
- EXPECT_TRUE(writer_->stream_frames().empty());
- ASSERT_TRUE(writer_->coalesced_packet() == nullptr);
- }
+ // Verify the retransmission is a coalesced packet with HANDSHAKE 2 and
+ // 1-RTT 3.
+ EXPECT_EQ(0x04040404u, writer_->final_bytes_of_last_packet());
+ // Only the first packet in the coalesced packet has been processed.
+ EXPECT_EQ(1u, writer_->crypto_frames().size());
+ // Process the coalesced 1-RTT packet.
+ ASSERT_TRUE(writer_->coalesced_packet() != nullptr);
+ auto packet = writer_->coalesced_packet()->Clone();
+ writer_->framer()->ProcessPacket(*packet);
+ EXPECT_EQ(1u, writer_->stream_frames().size());
+ ASSERT_TRUE(writer_->coalesced_packet() == nullptr);
// Verify retransmission alarm is still armed.
ASSERT_TRUE(connection_.GetRetransmissionAlarm()->IsSet());
}
diff --git a/quiche/quic/core/quic_flags_list.h b/quiche/quic/core/quic_flags_list.h
index 4408626..cc89134 100644
--- a/quiche/quic/core/quic_flags_list.h
+++ b/quiche/quic/core/quic_flags_list.h
@@ -101,8 +101,6 @@
QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_connection_migration_use_new_cid_v2, true)
// If true, uses conservative cwnd gain and pacing gain when cwnd gets bootstrapped.
QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_conservative_cwnd_and_pacing_gains, false)
-// If true, when a packet is forced retransmitted, only set packet state if all data gets retransmitted.
-QUIC_FLAG(FLAGS_quic_restart_flag_quic_set_packet_state_if_all_data_retransmitted, true)
// When the flag is true, exit STARTUP after the same number of loss events as PROBE_UP.
QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_bbr2_startup_probe_up_loss_events, true)
// When true, defaults to BBR congestion control instead of Cubic.
diff --git a/quiche/quic/core/quic_sent_packet_manager.cc b/quiche/quic/core/quic_sent_packet_manager.cc
index 47377e1..dc78e64 100644
--- a/quiche/quic/core/quic_sent_packet_manager.cc
+++ b/quiche/quic/core/quic_sent_packet_manager.cc
@@ -693,25 +693,21 @@
QUICHE_DCHECK(!transmission_info->has_crypto_handshake ||
transmission_type != PROBING_RETRANSMISSION);
if (ShouldForceRetransmission(transmission_type)) {
- const bool retransmitted = unacked_packets_.RetransmitFrames(
- QuicFrames(transmission_info->retransmittable_frames),
- transmission_type);
- if (GetQuicRestartFlag(quic_set_packet_state_if_all_data_retransmitted)) {
- QUIC_RESTART_FLAG_COUNT(quic_set_packet_state_if_all_data_retransmitted);
- if (!retransmitted) {
- // Do not set packet state if the data is not fully retransmitted.
- // This should only happen if packet payload size decreases which can be
- // caused by:
- // 1) connection tries to opportunistically retransmit data
- // when sending a packet of a different packet number space, or
- // 2) path MTU decreases, or
- // 3) packet header size increases (e.g., packet number length
- // increases).
- QUIC_CODE_COUNT(quic_retransmit_frames_failed);
- return;
- }
- QUIC_CODE_COUNT(quic_retransmit_frames_succeeded);
+ if (!unacked_packets_.RetransmitFrames(
+ QuicFrames(transmission_info->retransmittable_frames),
+ transmission_type)) {
+ // Do not set packet state if the data is not fully retransmitted.
+ // This should only happen if packet payload size decreases which can be
+ // caused by:
+ // 1) connection tries to opportunistically retransmit data
+ // when sending a packet of a different packet number space, or
+ // 2) path MTU decreases, or
+ // 3) packet header size increases (e.g., packet number length
+ // increases).
+ QUIC_CODE_COUNT(quic_retransmit_frames_failed);
+ return;
}
+ QUIC_CODE_COUNT(quic_retransmit_frames_succeeded);
} else {
unacked_packets_.NotifyFramesLost(*transmission_info, transmission_type);
diff --git a/quiche/quic/core/quic_session.cc b/quiche/quic/core/quic_session.cc
index 8868fc5..223a811 100644
--- a/quiche/quic/core/quic_session.cc
+++ b/quiche/quic/core/quic_session.cc
@@ -2285,10 +2285,7 @@
continue;
}
if (frame.type == CRYPTO_FRAME) {
- const bool data_retransmitted =
- GetMutableCryptoStream()->RetransmitData(frame.crypto_frame, type);
- if (GetQuicRestartFlag(quic_set_packet_state_if_all_data_retransmitted) &&
- !data_retransmitted) {
+ if (!GetMutableCryptoStream()->RetransmitData(frame.crypto_frame, type)) {
return false;
}
continue;