deprecate gfe2_reloadable_flag_quic_deprecate_tlpr
PiperOrigin-RevId: 424178628
diff --git a/quic/core/quic_connection_test.cc b/quic/core/quic_connection_test.cc
index 89fb70b..393bfd8 100644
--- a/quic/core/quic_connection_test.cc
+++ b/quic/core/quic_connection_test.cc
@@ -4543,179 +4543,6 @@
EXPECT_EQ(QuicPacketNumber(1u), stop_waiting()->least_unacked);
}
-TEST_P(QuicConnectionTest, TailLossProbeDelayForStreamDataInTLPR) {
- if (connection_.PtoEnabled() || GetQuicReloadableFlag(quic_deprecate_tlpr)) {
- return;
- }
-
- // Set TLPR from QuicConfig.
- EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
- QuicConfig config;
- QuicTagVector options;
- options.push_back(kTLPR);
- config.SetConnectionOptionsToSend(options);
- connection_.SetFromConfig(config);
- connection_.SetMaxTailLossProbes(1);
-
- SendStreamDataToPeer(3, "foo", 0, NO_FIN, nullptr);
- EXPECT_EQ(QuicPacketNumber(1u), stop_waiting()->least_unacked);
-
- QuicTime retransmission_time =
- connection_.GetRetransmissionAlarm()->deadline();
- EXPECT_NE(QuicTime::Zero(), retransmission_time);
- QuicTime::Delta expected_tlp_delay =
- 0.5 * manager_->GetRttStats()->SmoothedOrInitialRtt();
- EXPECT_EQ(expected_tlp_delay, retransmission_time - clock_.Now());
-
- EXPECT_EQ(QuicPacketNumber(1u), writer_->header().packet_number);
- // Simulate firing of the retransmission alarm and retransmit the packet.
- EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, QuicPacketNumber(2), _, _));
- clock_.AdvanceTime(retransmission_time - clock_.Now());
- connection_.GetRetransmissionAlarm()->Fire();
- EXPECT_EQ(QuicPacketNumber(2u), writer_->header().packet_number);
-
- // We do not raise the high water mark yet.
- EXPECT_EQ(QuicPacketNumber(1u), stop_waiting()->least_unacked);
-}
-
-TEST_P(QuicConnectionTest, TailLossProbeDelayForNonStreamDataInTLPR) {
- if (connection_.PtoEnabled() || GetQuicReloadableFlag(quic_deprecate_tlpr)) {
- return;
- }
-
- // Set TLPR from QuicConfig.
- EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
- QuicConfig config;
- QuicTagVector options;
- options.push_back(kTLPR);
- config.SetConnectionOptionsToSend(options);
- QuicConfigPeer::SetNegotiated(&config, true);
- if (connection_.version().UsesTls()) {
- QuicConfigPeer::SetReceivedOriginalConnectionId(
- &config, connection_.connection_id());
- QuicConfigPeer::SetReceivedInitialSourceConnectionId(
- &config, connection_.connection_id());
- }
- connection_.SetFromConfig(config);
- connection_.SetMaxTailLossProbes(1);
-
- // Sets retransmittable on wire.
- const QuicTime::Delta retransmittable_on_wire_timeout =
- QuicTime::Delta::FromMilliseconds(50);
- connection_.set_initial_retransmittable_on_wire_timeout(
- retransmittable_on_wire_timeout);
-
- EXPECT_TRUE(connection_.connected());
- EXPECT_CALL(visitor_, ShouldKeepConnectionAlive())
- .WillRepeatedly(Return(true));
- EXPECT_FALSE(connection_.PathDegradingDetectionInProgress());
- EXPECT_FALSE(connection_.IsPathDegrading());
- EXPECT_FALSE(connection_.GetPingAlarm()->IsSet());
-
- const char data[] = "data";
- size_t data_size = strlen(data);
- QuicStreamOffset offset = 0;
-
- // Send a data packet.
- connection_.SendStreamDataWithString(1, data, offset, NO_FIN);
- offset += data_size;
-
- // Path degrading alarm should be set when there is a retransmittable packet
- // on the wire.
- EXPECT_TRUE(connection_.PathDegradingDetectionInProgress());
-
- // Verify the path degrading delay.
- // First TLP with stream data.
- QuicTime::Delta srtt = manager_->GetRttStats()->SmoothedOrInitialRtt();
- QuicTime::Delta expected_delay = 0.5 * srtt;
- // Add 1st RTO.
- QuicTime::Delta retransmission_delay =
- QuicTime::Delta::FromMilliseconds(kDefaultRetransmissionTimeMs);
- expected_delay = expected_delay + retransmission_delay;
- // Add 2nd RTO.
- expected_delay = expected_delay + retransmission_delay * 2;
- EXPECT_EQ(expected_delay,
- QuicConnectionPeer::GetSentPacketManager(&connection_)
- ->GetPathDegradingDelay());
- ASSERT_TRUE(connection_.sent_packet_manager().HasInFlightPackets());
-
- // The ping alarm is set for the ping timeout, not the shorter
- // retransmittable_on_wire_timeout.
- EXPECT_TRUE(connection_.GetPingAlarm()->IsSet());
- EXPECT_EQ(connection_.ping_timeout(),
- connection_.GetPingAlarm()->deadline() - clock_.ApproximateNow());
-
- // Receive an ACK for the data packet.
- clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(5));
- EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
- EXPECT_CALL(*send_algorithm_, OnCongestionEvent(true, _, _, _, _));
- QuicAckFrame frame =
- InitAckFrame({{QuicPacketNumber(1), QuicPacketNumber(2)}});
- ProcessAckPacket(&frame);
-
- // Path degrading alarm should be cancelled as there is no more
- // reretransmittable packets on the wire.
- EXPECT_FALSE(connection_.PathDegradingDetectionInProgress());
- // The ping alarm should be set to the retransmittable_on_wire_timeout.
- EXPECT_TRUE(connection_.GetPingAlarm()->IsSet());
- EXPECT_EQ(retransmittable_on_wire_timeout,
- connection_.GetPingAlarm()->deadline() - clock_.ApproximateNow());
-
- // Simulate firing of the retransmittable on wire and send a PING.
- clock_.AdvanceTime(retransmittable_on_wire_timeout);
- connection_.GetPingAlarm()->Fire();
-
- // The retransmission alarm and the path degrading alarm should be set as
- // there is a retransmittable packet (PING) on the wire,
- EXPECT_TRUE(connection_.GetRetransmissionAlarm()->IsSet());
- EXPECT_TRUE(connection_.PathDegradingDetectionInProgress());
-
- // Verify the retransmission delay.
- QuicTime::Delta min_rto_timeout =
- QuicTime::Delta::FromMilliseconds(kMinRetransmissionTimeMs);
- srtt = manager_->GetRttStats()->SmoothedOrInitialRtt();
-
- // Arm RTO mode since there is only PING in flight.
- expected_delay = manager_->GetPtoDelay();
- EXPECT_EQ(expected_delay,
- connection_.GetRetransmissionAlarm()->deadline() - clock_.Now());
-
- // Verify the path degrading delay = TLP delay + 1st RTO + 2nd RTO.
- // Add 1st RTO.
- expected_delay = std::max(2 * srtt, 1.5 * srtt + 0.5 * min_rto_timeout);
- retransmission_delay =
- std::max(manager_->GetRttStats()->smoothed_rtt() +
- 4 * manager_->GetRttStats()->mean_deviation(),
- min_rto_timeout);
- expected_delay = expected_delay + retransmission_delay;
- // Add 2nd RTO.
- expected_delay = expected_delay + retransmission_delay * 2;
- EXPECT_EQ(expected_delay,
- QuicConnectionPeer::GetSentPacketManager(&connection_)
- ->GetPathDegradingDelay());
-
- // The ping alarm is set for the ping timeout, not the shorter
- // retransmittable_on_wire_timeout.
- EXPECT_TRUE(connection_.GetPingAlarm()->IsSet());
- EXPECT_EQ(connection_.ping_timeout(),
- connection_.GetPingAlarm()->deadline() - clock_.ApproximateNow());
-
- // Advance a small period of time: 5ms. And receive a retransmitted ACK.
- // This will update the retransmission alarm, verify the retransmission delay
- // is correct.
- clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(5));
- QuicAckFrame ack = InitAckFrame({{QuicPacketNumber(1), QuicPacketNumber(2)}});
- ProcessAckPacket(&ack);
-
- // Verify the retransmission delay.
- // First TLP without unacked stream data will no longer use TLPR.
- // Arm RTO mode since there is only PING in flight.
- expected_delay = manager_->GetPtoDelay();
- expected_delay = expected_delay - QuicTime::Delta::FromMilliseconds(5);
- EXPECT_EQ(expected_delay,
- connection_.GetRetransmissionAlarm()->deadline() - clock_.Now());
-}
-
TEST_P(QuicConnectionTest, RTO) {
if (connection_.PtoEnabled()) {
return;
diff --git a/quic/core/quic_flags_list.h b/quic/core/quic_flags_list.h
index df9fdfa..ddbe47b 100644
--- a/quic/core/quic_flags_list.h
+++ b/quic/core/quic_flags_list.h
@@ -25,8 +25,6 @@
QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_add_cached_network_parameters_to_address_token2, false)
// If true, QUIC will default enable MTU discovery at server, with a target of 1450 bytes.
QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_enable_mtu_discovery_at_server, false)
-// If true, QUIC won\'t honor the connection option TLPR
-QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_deprecate_tlpr, true)
// If true, QuicGsoBatchWriter will support release time if it is available and the process has the permission to do so.
QUIC_FLAG(FLAGS_quic_restart_flag_quic_support_release_time_for_gso, false)
// If true, TlsServerHandshaker will be able to 1) request client cert, and 2) verify the client cert in the virtual method TlsServerHandshaker::VerifyCertChain.
diff --git a/quic/core/quic_sent_packet_manager.cc b/quic/core/quic_sent_packet_manager.cc
index eae919c..e8f1aa8 100644
--- a/quic/core/quic_sent_packet_manager.cc
+++ b/quic/core/quic_sent_packet_manager.cc
@@ -87,7 +87,6 @@
pending_timer_transmission_count_(0),
max_tail_loss_probes_(kDefaultMaxTailLossProbes),
max_rto_packets_(kMaxRetransmissionsOnTimeout),
- enable_half_rtt_tail_loss_probe_(false),
using_pacing_(false),
use_new_rto_(false),
conservative_handshake_retransmits_(false),
@@ -209,12 +208,7 @@
QUIC_CODE_COUNT(two_aggressive_ptos);
num_tlp_timeout_ptos_ = 2;
}
- if (GetQuicReloadableFlag(quic_deprecate_tlpr)) {
- QUIC_RELOADABLE_FLAG_COUNT_N(quic_deprecate_tlpr, 2, 2);
- }
- if (config.HasClientSentConnectionOption(kPLE1, perspective) ||
- (config.HasClientSentConnectionOption(kTLPR, perspective) &&
- !GetQuicReloadableFlag(quic_deprecate_tlpr))) {
+ if (config.HasClientSentConnectionOption(kPLE1, perspective)) {
first_pto_srtt_multiplier_ = 0.5;
} else if (config.HasClientSentConnectionOption(kPLE2, perspective)) {
first_pto_srtt_multiplier_ = 1.5;
@@ -304,17 +298,6 @@
if (config.HasClientSentConnectionOption(k1RTO, perspective)) {
max_rto_packets_ = 1;
}
- if (GetQuicReloadableFlag(quic_deprecate_tlpr)) {
- QUIC_RELOADABLE_FLAG_COUNT_N(quic_deprecate_tlpr, 1, 2);
- }
- if (config.HasClientSentConnectionOption(kTLPR, perspective) &&
- !GetQuicReloadableFlag(quic_deprecate_tlpr)) {
- enable_half_rtt_tail_loss_probe_ = true;
- }
- if (config.HasClientRequestedIndependentOption(kTLPR, perspective) &&
- !GetQuicReloadableFlag(quic_deprecate_tlpr)) {
- enable_half_rtt_tail_loss_probe_ = true;
- }
if (config.HasClientSentConnectionOption(kNRTO, perspective)) {
use_new_rto_ = true;
}
@@ -1405,12 +1388,6 @@
const QuicTime::Delta QuicSentPacketManager::GetTailLossProbeDelay() const {
QuicTime::Delta srtt = rtt_stats_.SmoothedOrInitialRtt();
- if (enable_half_rtt_tail_loss_probe_ && consecutive_tlp_count_ == 0u) {
- if (unacked_packets().HasUnackedStreamData()) {
- // Enable TLPR if there are pending data packets.
- return std::max(min_tlp_timeout_, srtt * 0.5);
- }
- }
if (!unacked_packets_.HasMultipleInFlightPackets()) {
// This expression really should be using the delayed ack time, but in TCP
// MinRTO was traditionally set to 2x the delayed ack timer and this
@@ -1456,10 +1433,6 @@
QuicTime::Delta::FromMilliseconds(kMinHandshakeTimeoutMs)) *
(1 << consecutive_pto_count_);
}
- if (enable_half_rtt_tail_loss_probe_ && consecutive_pto_count_ == 0 &&
- handshake_finished_) {
- return std::max(min_tlp_timeout_, rtt_stats_.smoothed_rtt() * 0.5);
- }
const QuicTime::Delta rtt_var = use_standard_deviation_for_pto_
? rtt_stats_.GetStandardOrMeanDeviation()
: rtt_stats_.mean_deviation();
@@ -1781,18 +1754,11 @@
std::min(num_timeouts, static_cast<int>(max_tail_loss_probes_));
num_timeouts -= num_tlps;
if (num_tlps > 0) {
- if (enable_half_rtt_tail_loss_probe_ &&
- unacked_packets().HasUnackedStreamData()) {
- total_delay = total_delay + std::max(min_tlp_timeout_, srtt * 0.5);
- --num_tlps;
- }
- if (num_tlps > 0) {
- const QuicTime::Delta tlp_delay =
- std::max(2 * srtt, unacked_packets_.HasMultipleInFlightPackets()
- ? min_tlp_timeout_
- : (1.5 * srtt + (min_rto_timeout_ * 0.5)));
- total_delay = total_delay + num_tlps * tlp_delay;
- }
+ const QuicTime::Delta tlp_delay =
+ std::max(2 * srtt, unacked_packets_.HasMultipleInFlightPackets()
+ ? min_tlp_timeout_
+ : (1.5 * srtt + (min_rto_timeout_ * 0.5)));
+ total_delay = total_delay + num_tlps * tlp_delay;
}
if (num_timeouts == 0) {
return total_delay;
diff --git a/quic/core/quic_sent_packet_manager.h b/quic/core/quic_sent_packet_manager.h
index b1efb81..069ff0f 100644
--- a/quic/core/quic_sent_packet_manager.h
+++ b/quic/core/quic_sent_packet_manager.h
@@ -625,8 +625,6 @@
// Maximum number of packets to send upon RTO.
QuicPacketCount max_rto_packets_;
// If true, send the TLP at 0.5 RTT.
- // TODO(renjietang): remove it once quic_deprecate_tlpr flag is deprecated.
- bool enable_half_rtt_tail_loss_probe_;
bool using_pacing_;
// If true, use the new RTO with loss based CWND reduction instead of the send
// algorithms's OnRetransmissionTimeout to reduce the congestion window.
diff --git a/quic/core/quic_sent_packet_manager_test.cc b/quic/core/quic_sent_packet_manager_test.cc
index a09afc6..1ce3da8 100644
--- a/quic/core/quic_sent_packet_manager_test.cc
+++ b/quic/core/quic_sent_packet_manager_test.cc
@@ -1463,112 +1463,6 @@
EXPECT_EQ(expected_time, manager_.GetRetransmissionTime());
}
-TEST_F(QuicSentPacketManagerTest, TLPRWithPendingStreamData) {
- if (GetQuicReloadableFlag(quic_default_on_pto) ||
- GetQuicReloadableFlag(quic_deprecate_tlpr)) {
- return;
- }
- QuicConfig config;
- QuicTagVector options;
-
- options.push_back(kTLPR);
- QuicConfigPeer::SetReceivedConnectionOptions(&config, options);
- EXPECT_CALL(*network_change_visitor_, OnCongestionChange());
- EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
- EXPECT_CALL(*send_algorithm_, PacingRate(_))
- .WillRepeatedly(Return(QuicBandwidth::Zero()));
- EXPECT_CALL(*send_algorithm_, GetCongestionWindow())
- .WillOnce(Return(10 * kDefaultTCPMSS));
- manager_.SetFromConfig(config);
- EXPECT_TRUE(
- QuicSentPacketManagerPeer::GetEnableHalfRttTailLossProbe(&manager_));
-
- QuicSentPacketManagerPeer::SetMaxTailLossProbes(&manager_, 2);
-
- SendDataPacket(1);
- SendDataPacket(2);
-
- // Test with a standard smoothed RTT.
- RttStats* rtt_stats = const_cast<RttStats*>(manager_.GetRttStats());
- rtt_stats->set_initial_rtt(QuicTime::Delta::FromMilliseconds(100));
- QuicTime::Delta srtt = rtt_stats->initial_rtt();
- // With pending stream data, TLPR is used.
- QuicTime::Delta expected_tlp_delay = 0.5 * srtt;
- EXPECT_CALL(notifier_, HasUnackedStreamData()).WillRepeatedly(Return(true));
-
- EXPECT_EQ(expected_tlp_delay,
- manager_.GetRetransmissionTime() - clock_.Now());
-
- // Retransmit the packet by invoking the retransmission timeout.
- clock_.AdvanceTime(expected_tlp_delay);
- manager_.OnRetransmissionTimeout();
- EXPECT_EQ(QuicTime::Delta::Zero(), manager_.TimeUntilSend(clock_.Now()));
- EXPECT_CALL(notifier_, RetransmitFrames(_, _))
- .WillOnce(WithArgs<1>(Invoke(
- [this](TransmissionType type) { RetransmitDataPacket(3, type); })));
- EXPECT_TRUE(manager_.MaybeRetransmitTailLossProbe());
-
- EXPECT_CALL(*send_algorithm_, CanSend(_)).WillOnce(Return(false));
- EXPECT_EQ(QuicTime::Delta::Infinite(), manager_.TimeUntilSend(clock_.Now()));
-
- // 2nd TLP.
- expected_tlp_delay = 2 * srtt;
- EXPECT_EQ(expected_tlp_delay,
- manager_.GetRetransmissionTime() - clock_.Now());
-}
-
-TEST_F(QuicSentPacketManagerTest, TLPRWithoutPendingStreamData) {
- if (GetQuicReloadableFlag(quic_default_on_pto) ||
- GetQuicReloadableFlag(quic_deprecate_tlpr)) {
- return;
- }
- QuicConfig config;
- QuicTagVector options;
-
- options.push_back(kTLPR);
- QuicConfigPeer::SetReceivedConnectionOptions(&config, options);
- EXPECT_CALL(*network_change_visitor_, OnCongestionChange());
- EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
- EXPECT_CALL(*send_algorithm_, PacingRate(_))
- .WillRepeatedly(Return(QuicBandwidth::Zero()));
- EXPECT_CALL(*send_algorithm_, GetCongestionWindow())
- .WillOnce(Return(10 * kDefaultTCPMSS));
- manager_.SetFromConfig(config);
- EXPECT_TRUE(
- QuicSentPacketManagerPeer::GetEnableHalfRttTailLossProbe(&manager_));
- QuicSentPacketManagerPeer::SetMaxTailLossProbes(&manager_, 2);
-
- SendPingPacket(1, ENCRYPTION_INITIAL);
- SendPingPacket(2, ENCRYPTION_INITIAL);
-
- // Test with a standard smoothed RTT.
- RttStats* rtt_stats = const_cast<RttStats*>(manager_.GetRttStats());
- rtt_stats->set_initial_rtt(QuicTime::Delta::FromMilliseconds(100));
- QuicTime::Delta srtt = rtt_stats->initial_rtt();
- QuicTime::Delta expected_tlp_delay = 0.5 * srtt;
- // With no pending stream data, TLPR is ignored.
- expected_tlp_delay = 2 * srtt;
- EXPECT_CALL(notifier_, HasUnackedStreamData()).WillRepeatedly(Return(false));
- EXPECT_EQ(expected_tlp_delay,
- manager_.GetRetransmissionTime() - clock_.Now());
-
- // Retransmit the packet by invoking the retransmission timeout.
- clock_.AdvanceTime(expected_tlp_delay);
- manager_.OnRetransmissionTimeout();
- EXPECT_EQ(QuicTime::Delta::Zero(), manager_.TimeUntilSend(clock_.Now()));
- EXPECT_CALL(notifier_, RetransmitFrames(_, _))
- .WillOnce(WithArgs<1>(Invoke(
- [this](TransmissionType type) { RetransmitDataPacket(3, type); })));
- EXPECT_TRUE(manager_.MaybeRetransmitTailLossProbe());
- EXPECT_CALL(*send_algorithm_, CanSend(_)).WillOnce(Return(false));
- EXPECT_EQ(QuicTime::Delta::Infinite(), manager_.TimeUntilSend(clock_.Now()));
-
- // 2nd TLP.
- expected_tlp_delay = 2 * srtt;
- EXPECT_EQ(expected_tlp_delay,
- manager_.GetRetransmissionTime() - clock_.Now());
-}
-
TEST_F(QuicSentPacketManagerTest, GetTransmissionTimeSpuriousRTO) {
if (GetQuicReloadableFlag(quic_default_on_pto)) {
return;
@@ -2125,41 +2019,6 @@
EXPECT_EQ(1u, QuicSentPacketManagerPeer::GetMaxTailLossProbes(&manager_));
}
-TEST_F(QuicSentPacketManagerTest, NegotiateTLPRttFromOptionsAtServer) {
- if (GetQuicReloadableFlag(quic_default_on_pto) ||
- GetQuicReloadableFlag(quic_deprecate_tlpr)) {
- return;
- }
- QuicConfig config;
- QuicTagVector options;
-
- options.push_back(kTLPR);
- QuicConfigPeer::SetReceivedConnectionOptions(&config, options);
- EXPECT_CALL(*network_change_visitor_, OnCongestionChange());
- EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
- manager_.SetFromConfig(config);
- EXPECT_TRUE(
- QuicSentPacketManagerPeer::GetEnableHalfRttTailLossProbe(&manager_));
-}
-
-TEST_F(QuicSentPacketManagerTest, NegotiateTLPRttFromOptionsAtClient) {
- if (GetQuicReloadableFlag(quic_default_on_pto) ||
- GetQuicReloadableFlag(quic_deprecate_tlpr)) {
- return;
- }
- QuicConfig client_config;
- QuicTagVector options;
-
- options.push_back(kTLPR);
- QuicSentPacketManagerPeer::SetPerspective(&manager_, Perspective::IS_CLIENT);
- client_config.SetConnectionOptionsToSend(options);
- EXPECT_CALL(*network_change_visitor_, OnCongestionChange());
- EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
- manager_.SetFromConfig(client_config);
- EXPECT_TRUE(
- QuicSentPacketManagerPeer::GetEnableHalfRttTailLossProbe(&manager_));
-}
-
TEST_F(QuicSentPacketManagerTest, NegotiateNewRTOFromOptionsAtServer) {
if (GetQuicReloadableFlag(quic_default_on_pto)) {
return;
@@ -4371,90 +4230,6 @@
manager_.GetRetransmissionTime());
}
-TEST_F(QuicSentPacketManagerTest, ClientOnlyTLPRServer) {
- if (GetQuicReloadableFlag(quic_deprecate_tlpr)) {
- return;
- }
- QuicConfig config;
- QuicTagVector options;
-
- options.push_back(kTLPR);
- config.SetClientConnectionOptions(options);
- EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
- EXPECT_CALL(*network_change_visitor_, OnCongestionChange());
- manager_.SetFromConfig(config);
- // No change if the server receives client options.
- EXPECT_FALSE(
- QuicSentPacketManagerPeer::GetEnableHalfRttTailLossProbe(&manager_));
-}
-
-TEST_F(QuicSentPacketManagerTest, ClientOnlyTLPR) {
- if (GetQuicReloadableFlag(quic_deprecate_tlpr)) {
- return;
- }
- QuicSentPacketManagerPeer::SetPerspective(&manager_, Perspective::IS_CLIENT);
- QuicConfig config;
- QuicTagVector options;
-
- options.push_back(kTLPR);
- config.SetClientConnectionOptions(options);
- EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
- EXPECT_CALL(*network_change_visitor_, OnCongestionChange());
- manager_.SetFromConfig(config);
- EXPECT_TRUE(
- QuicSentPacketManagerPeer::GetEnableHalfRttTailLossProbe(&manager_));
-}
-
-TEST_F(QuicSentPacketManagerTest, PtoWithTlpr) {
- if (GetQuicReloadableFlag(quic_deprecate_tlpr)) {
- return;
- }
- QuicConfig config;
- QuicTagVector options;
-
- options.push_back(kTLPR);
- options.push_back(k1PTO);
- options.push_back(kPTOS);
- QuicConfigPeer::SetReceivedConnectionOptions(&config, options);
- EXPECT_CALL(*network_change_visitor_, OnCongestionChange());
- EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
- EXPECT_CALL(*send_algorithm_, PacingRate(_))
- .WillRepeatedly(Return(QuicBandwidth::Zero()));
- EXPECT_CALL(*send_algorithm_, GetCongestionWindow())
- .WillOnce(Return(10 * kDefaultTCPMSS));
- manager_.SetFromConfig(config);
- EXPECT_TRUE(
- QuicSentPacketManagerPeer::GetEnableHalfRttTailLossProbe(&manager_));
- RttStats* rtt_stats = const_cast<RttStats*>(manager_.GetRttStats());
- rtt_stats->UpdateRtt(QuicTime::Delta::FromMilliseconds(100),
- QuicTime::Delta::Zero(), QuicTime::Zero());
- QuicTime::Delta srtt = rtt_stats->smoothed_rtt();
- manager_.SetHandshakeConfirmed();
-
- SendDataPacket(1, ENCRYPTION_FORWARD_SECURE);
- // Verify PTO is correctly set.
- QuicTime::Delta expected_pto_delay = 0.5 * srtt;
- QuicTime deadline = clock_.Now() + expected_pto_delay;
- EXPECT_EQ(deadline, manager_.GetRetransmissionTime());
-
- // Invoke PTO.
- clock_.AdvanceTime(deadline - clock_.Now());
- manager_.OnRetransmissionTimeout();
- EXPECT_CALL(notifier_, RetransmitFrames(_, _))
- .WillOnce(WithArgs<1>(Invoke([this](TransmissionType type) {
- RetransmitDataPacket(3, type, ENCRYPTION_FORWARD_SECURE);
- })));
- manager_.MaybeSendProbePackets();
-
- // Verify PTO period gets set correctly.
- expected_pto_delay =
- srtt + GetPtoRttvarMultiplier() * rtt_stats->mean_deviation() +
- QuicTime::Delta::FromMilliseconds(kDefaultDelayedAckTimeMs);
- QuicTime sent_time = clock_.Now();
- EXPECT_EQ(sent_time + expected_pto_delay * 2,
- manager_.GetRetransmissionTime());
-}
-
TEST_F(QuicSentPacketManagerTest, SendPathChallengeAndGetAck) {
QuicPacketNumber packet_number(1);
EXPECT_CALL(*send_algorithm_,
diff --git a/quic/test_tools/quic_sent_packet_manager_peer.cc b/quic/test_tools/quic_sent_packet_manager_peer.cc
index 3223516..8689535 100644
--- a/quic/test_tools/quic_sent_packet_manager_peer.cc
+++ b/quic/test_tools/quic_sent_packet_manager_peer.cc
@@ -27,12 +27,6 @@
}
// static
-bool QuicSentPacketManagerPeer::GetEnableHalfRttTailLossProbe(
- QuicSentPacketManager* sent_packet_manager) {
- return sent_packet_manager->enable_half_rtt_tail_loss_probe_;
-}
-
-// static
bool QuicSentPacketManagerPeer::GetUseNewRto(
QuicSentPacketManager* sent_packet_manager) {
return sent_packet_manager->use_new_rto_;
diff --git a/quic/test_tools/quic_sent_packet_manager_peer.h b/quic/test_tools/quic_sent_packet_manager_peer.h
index 35c5897..ef0af1e 100644
--- a/quic/test_tools/quic_sent_packet_manager_peer.h
+++ b/quic/test_tools/quic_sent_packet_manager_peer.h
@@ -24,9 +24,6 @@
static void SetMaxTailLossProbes(QuicSentPacketManager* sent_packet_manager,
size_t max_tail_loss_probes);
- static bool GetEnableHalfRttTailLossProbe(
- QuicSentPacketManager* sent_packet_manager);
-
static bool GetUseNewRto(QuicSentPacketManager* sent_packet_manager);
static void SetPerspective(QuicSentPacketManager* sent_packet_manager,