Deprecate --gfe2_reloadable_flag_quic_use_lower_min_for_trusted_irtt. PiperOrigin-RevId: 453325655
diff --git a/quiche/quic/core/http/end_to_end_test.cc b/quiche/quic/core/http/end_to_end_test.cc index c3cf717..d602f38 100644 --- a/quiche/quic/core/http/end_to_end_test.cc +++ b/quiche/quic/core/http/end_to_end_test.cc
@@ -1693,11 +1693,7 @@ // QuicSentPacketManager::SetInitialRtt clamps the initial_rtt to between // [min_initial_rtt, max_initial_rtt]. const QuicTime::Delta min_initial_rtt = - server_connection->sent_packet_manager().use_lower_min_irtt() - ? QuicTime::Delta::FromMicroseconds( - kMinTrustedInitialRoundTripTimeUs) - : QuicTime::Delta::FromMicroseconds( - kMinUntrustedInitialRoundTripTimeUs); + QuicTime::Delta::FromMicroseconds(kMinTrustedInitialRoundTripTimeUs); const QuicTime::Delta max_initial_rtt = QuicTime::Delta::FromMicroseconds(kMaxInitialRoundTripTimeUs); const QuicTime::Delta expected_initial_rtt =
diff --git a/quiche/quic/core/http/quic_server_session_base.cc b/quiche/quic/core/http/quic_server_session_base.cc index 41b4f16..d59602e 100644 --- a/quiche/quic/core/http/quic_server_session_base.cc +++ b/quiche/quic/core/http/quic_server_session_base.cc
@@ -47,15 +47,6 @@ void QuicServerSessionBase::OnConfigNegotiated() { QuicSpdySession::OnConfigNegotiated(); - const bool use_lower_min_irtt = - connection()->sent_packet_manager().use_lower_min_irtt(); - - if (!use_lower_min_irtt) { - if (!config()->HasReceivedConnectionOptions()) { - return; - } - } - const CachedNetworkParameters* cached_network_params = crypto_stream_->PreviousCachedNetworkParams(); @@ -65,7 +56,7 @@ if (version().UsesTls() && cached_network_params != nullptr) { if (cached_network_params->serving_region() == serving_region_) { QUIC_CODE_COUNT(quic_server_received_network_params_at_same_region); - if ((!use_lower_min_irtt || config()->HasReceivedConnectionOptions()) && + if (config()->HasReceivedConnectionOptions() && ContainsQuicTag(config()->ReceivedConnectionOptions(), kTRTT)) { QUIC_DLOG(INFO) << "Server: Setting initial rtt to " @@ -74,18 +65,15 @@ connection()->sent_packet_manager().SetInitialRtt( QuicTime::Delta::FromMilliseconds( cached_network_params->min_rtt_ms()), - /*trusted=*/use_lower_min_irtt); + /*trusted=*/true); } } else { QUIC_CODE_COUNT(quic_server_received_network_params_at_different_region); } } - if (use_lower_min_irtt) { - QUIC_RELOADABLE_FLAG_COUNT_N(quic_use_lower_min_for_trusted_irtt, 1, 2); - if (!config()->HasReceivedConnectionOptions()) { - return; - } + if (!config()->HasReceivedConnectionOptions()) { + return; } if (GetQuicReloadableFlag(quic_enable_disable_resumption) &&
diff --git a/quiche/quic/core/quic_flags_list.h b/quiche/quic/core/quic_flags_list.h index 26fd249..0fbff26 100644 --- a/quiche/quic/core/quic_flags_list.h +++ b/quiche/quic/core/quic_flags_list.h
@@ -17,8 +17,6 @@ QUIC_FLAG(quic_restart_flag_quic_testonly_default_true, true) // If bytes in flight has dipped below 1.25*MaxBW in the last round, do not exit PROBE_UP due to excess queue buildup. QUIC_FLAG(quic_reloadable_flag_quic_bbr2_no_probe_up_exit_if_no_queue, true) -// If true, 1) QUIC connections will use a lower minimum for trusted initial rtt, 2) When TRTT is received, QUIC server sessions will mark the initial rtt from CachedNetworkParameters as trusted. -QUIC_FLAG(quic_reloadable_flag_quic_use_lower_min_for_trusted_irtt, true) // If true, QUIC will default enable MTU discovery at server, with a target of 1450 bytes. QUIC_FLAG(quic_reloadable_flag_quic_enable_mtu_discovery_at_server, false) // If true, QuicGsoBatchWriter will support release time if it is available and the process has the permission to do so.
diff --git a/quiche/quic/core/quic_sent_packet_manager.cc b/quiche/quic/core/quic_sent_packet_manager.cc index 40da9f2..1083583 100644 --- a/quiche/quic/core/quic_sent_packet_manager.cc +++ b/quiche/quic/core/quic_sent_packet_manager.cc
@@ -285,24 +285,18 @@ const QuicBandwidth& bandwidth = params.bandwidth; const QuicTime::Delta& rtt = params.rtt; - if (use_lower_min_irtt()) { - QUIC_RELOADABLE_FLAG_COUNT_N(quic_use_lower_min_for_trusted_irtt, 2, 2); - if (!rtt.IsZero()) { - if (params.is_rtt_trusted) { - // Always set initial rtt if it's trusted. - SetInitialRtt(rtt, /*trusted=*/true); - } else if (rtt_stats_.initial_rtt() == - QuicTime::Delta::FromMilliseconds(kInitialRttMs)) { - // Only set initial rtt if we are using the default. This avoids - // overwriting a trusted initial rtt by an untrusted one. - SetInitialRtt(rtt, /*trusted=*/false); - } - } - } else { - if (!rtt.IsZero()) { + if (!rtt.IsZero()) { + if (params.is_rtt_trusted) { + // Always set initial rtt if it's trusted. + SetInitialRtt(rtt, /*trusted=*/true); + } else if (rtt_stats_.initial_rtt() == + QuicTime::Delta::FromMilliseconds(kInitialRttMs)) { + // Only set initial rtt if we are using the default. This avoids + // overwriting a trusted initial rtt by an untrusted one. SetInitialRtt(rtt, /*trusted=*/false); } } + const QuicByteCount old_cwnd = send_algorithm_->GetCongestionWindow(); if (GetQuicReloadableFlag(quic_conservative_bursts) && using_pacing_ && !bandwidth.IsZero()) {
diff --git a/quiche/quic/core/quic_sent_packet_manager.h b/quiche/quic/core/quic_sent_packet_manager.h index 953c11c..f0a6bc6 100644 --- a/quiche/quic/core/quic_sent_packet_manager.h +++ b/quiche/quic/core/quic_sent_packet_manager.h
@@ -464,8 +464,6 @@ // kMinUntrustedInitialRoundTripTimeUs if not |trusted|. void SetInitialRtt(QuicTime::Delta rtt, bool trusted); - bool use_lower_min_irtt() const { return use_lower_min_irtt_; } - private: friend class test::QuicConnectionPeer; friend class test::QuicSentPacketManagerPeer; @@ -670,10 +668,6 @@ // Whether to ignore the ack_delay in received ACKs. bool ignore_ack_delay_; - - // Latched value of --quic_use_lower_min_for_trusted_irtt. - bool use_lower_min_irtt_ = - GetQuicReloadableFlag(quic_use_lower_min_for_trusted_irtt); }; } // namespace quic