Deprecate --gfe2_reloadable_flag_quic_remove_blackhole_detection_experiments. PiperOrigin-RevId: 470789808
diff --git a/quiche/quic/core/crypto/crypto_protocol.h b/quiche/quic/core/crypto/crypto_protocol.h index 66db12d..7cfffd9 100644 --- a/quiche/quic/core/crypto/crypto_protocol.h +++ b/quiche/quic/core/crypto/crypto_protocol.h
@@ -30,7 +30,8 @@ // "1CON", "BBQ4", "NCON", "RCID", "SREJ", "TBKP", "TB10", "SCLS", "SMHL", // "QNZR", "B2HI", "H2PR", "FIFO", "LIFO", "RRWS", "QNSP", "B2CL", "CHSP", // "BPTE", "ACKD", "AKD2", "AKD4", "MAD1", "MAD4", "MAD5", "ACD0", "ACKQ", -// "TLPR", "CCS\0", "PDP4", "NCHP", "NBPE" +// "TLPR", "CCS\0", "PDP4", "NCHP", "NBPE", "2RTO", "3RTO", "4RTO", "6RTO", +// "PDP1", "PDP2", "PDP3", "PDP5" // clang-format off const QuicTag kCHLO = TAG('C', 'H', 'L', 'O'); // Client hello @@ -198,11 +199,7 @@ // handshake completion. const QuicTag kSSLR = TAG('S', 'S', 'L', 'R'); // Slow Start Large Reduction. const QuicTag kNPRR = TAG('N', 'P', 'R', 'R'); // Pace at unity instead of PRR -const QuicTag k2RTO = TAG('2', 'R', 'T', 'O'); // Close connection on 2 RTOs -const QuicTag k3RTO = TAG('3', 'R', 'T', 'O'); // Close connection on 3 RTOs -const QuicTag k4RTO = TAG('4', 'R', 'T', 'O'); // Close connection on 4 RTOs const QuicTag k5RTO = TAG('5', 'R', 'T', 'O'); // Close connection on 5 RTOs -const QuicTag k6RTO = TAG('6', 'R', 'T', 'O'); // Close connection on 6 RTOs const QuicTag kCBHD = TAG('C', 'B', 'H', 'D'); // Client only blackhole // detection. const QuicTag kNBHD = TAG('N', 'B', 'H', 'D'); // No blackhole detection. @@ -401,18 +398,6 @@ const QuicTag kQLVE = TAG('Q', 'L', 'V', 'E'); // Legacy Version // Encapsulation. -const QuicTag kPDP1 = TAG('P', 'D', 'P', '1'); // Path degrading triggered - // at 1PTO. - -const QuicTag kPDP2 = TAG('P', 'D', 'P', '2'); // Path degrading triggered - // at 2PTO. - -const QuicTag kPDP3 = TAG('P', 'D', 'P', '3'); // Path degrading triggered - // at 3PTO. - -const QuicTag kPDP5 = TAG('P', 'D', 'P', '5'); // Path degrading triggered - // at 5PTO. - const QuicTag kQNZ2 = TAG('Q', 'N', 'Z', '2'); // Turn off QUIC crypto 0-RTT. const QuicTag kMAD = TAG('M', 'A', 'D', 0); // Max Ack Delay (IETF QUIC)
diff --git a/quiche/quic/core/quic_connection.cc b/quiche/quic/core/quic_connection.cc index 73f75a0..ec509b7 100644 --- a/quiche/quic/core/quic_connection.cc +++ b/quiche/quic/core/quic_connection.cc
@@ -578,24 +578,6 @@ if (config.HasClientSentConnectionOption(kNBHD, perspective_)) { blackhole_detection_disabled_ = true; } - if (!sent_packet_manager_.remove_blackhole_detection_experiments()) { - if (config.HasClientSentConnectionOption(k2RTO, perspective_)) { - QUIC_CODE_COUNT(quic_2rto_blackhole_detection); - num_rtos_for_blackhole_detection_ = 2; - } - if (config.HasClientSentConnectionOption(k3RTO, perspective_)) { - QUIC_CODE_COUNT(quic_3rto_blackhole_detection); - num_rtos_for_blackhole_detection_ = 3; - } - if (config.HasClientSentConnectionOption(k4RTO, perspective_)) { - QUIC_CODE_COUNT(quic_4rto_blackhole_detection); - num_rtos_for_blackhole_detection_ = 4; - } - if (config.HasClientSentConnectionOption(k6RTO, perspective_)) { - QUIC_CODE_COUNT(quic_6rto_blackhole_detection); - num_rtos_for_blackhole_detection_ = 6; - } - } } if (config.HasClientRequestedIndependentOption(kFIDT, perspective_)) { @@ -6515,22 +6497,17 @@ return QuicTime::Zero(); } QUICHE_DCHECK_LT(0u, num_rtos_for_blackhole_detection_); - if (sent_packet_manager_.remove_blackhole_detection_experiments()) { - QUIC_RELOADABLE_FLAG_COUNT(quic_remove_blackhole_detection_experiments); - const QuicTime::Delta blackhole_delay = - sent_packet_manager_.GetNetworkBlackholeDelay( - num_rtos_for_blackhole_detection_); - if (!ShouldDetectPathDegrading()) { - return clock_->ApproximateNow() + blackhole_delay; - } - return clock_->ApproximateNow() + - CalculateNetworkBlackholeDelay( - blackhole_delay, sent_packet_manager_.GetPathDegradingDelay(), - sent_packet_manager_.GetPtoDelay()); + + const QuicTime::Delta blackhole_delay = + sent_packet_manager_.GetNetworkBlackholeDelay( + num_rtos_for_blackhole_detection_); + if (!ShouldDetectPathDegrading()) { + return clock_->ApproximateNow() + blackhole_delay; } return clock_->ApproximateNow() + - sent_packet_manager_.GetNetworkBlackholeDelay( - num_rtos_for_blackhole_detection_); + CalculateNetworkBlackholeDelay( + blackhole_delay, sent_packet_manager_.GetPathDegradingDelay(), + sent_packet_manager_.GetPtoDelay()); } // static
diff --git a/quiche/quic/core/quic_connection_test.cc b/quiche/quic/core/quic_connection_test.cc index 72530ae..2801334 100644 --- a/quiche/quic/core/quic_connection_test.cc +++ b/quiche/quic/core/quic_connection_test.cc
@@ -10673,118 +10673,6 @@ EXPECT_FALSE(connection_.GetBlackholeDetectorAlarm()->IsSet()); } -TEST_P(QuicConnectionTest, 2RtoBlackholeDetection) { - if (!GetQuicReloadableFlag(quic_default_enable_5rto_blackhole_detection2) || - GetQuicReloadableFlag(quic_remove_blackhole_detection_experiments)) { - return; - } - QuicConfig config; - QuicTagVector connection_options; - connection_options.push_back(k2RTO); - config.SetConnectionOptionsToSend(connection_options); - EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _)); - connection_.SetFromConfig(config); - const size_t kMinRttMs = 40; - RttStats* rtt_stats = const_cast<RttStats*>(manager_->GetRttStats()); - rtt_stats->UpdateRtt(QuicTime::Delta::FromMilliseconds(kMinRttMs), - QuicTime::Delta::Zero(), QuicTime::Zero()); - EXPECT_CALL(visitor_, GetHandshakeState()) - .WillRepeatedly(Return(HANDSHAKE_COMPLETE)); - EXPECT_FALSE(connection_.GetBlackholeDetectorAlarm()->IsSet()); - // Send stream data. - SendStreamDataToPeer( - GetNthClientInitiatedStreamId(1, connection_.transport_version()), "foo", - 0, FIN, nullptr); - // Verify blackhole delay is expected. - EXPECT_EQ(clock_.Now() + - connection_.sent_packet_manager().GetNetworkBlackholeDelay(2), - QuicConnectionPeer::GetBlackholeDetectionDeadline(&connection_)); -} - -TEST_P(QuicConnectionTest, 3RtoBlackholeDetection) { - if (!GetQuicReloadableFlag(quic_default_enable_5rto_blackhole_detection2) || - GetQuicReloadableFlag(quic_remove_blackhole_detection_experiments)) { - return; - } - QuicConfig config; - QuicTagVector connection_options; - connection_options.push_back(k3RTO); - config.SetConnectionOptionsToSend(connection_options); - EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _)); - connection_.SetFromConfig(config); - const size_t kMinRttMs = 40; - RttStats* rtt_stats = const_cast<RttStats*>(manager_->GetRttStats()); - rtt_stats->UpdateRtt(QuicTime::Delta::FromMilliseconds(kMinRttMs), - QuicTime::Delta::Zero(), QuicTime::Zero()); - EXPECT_CALL(visitor_, GetHandshakeState()) - .WillRepeatedly(Return(HANDSHAKE_COMPLETE)); - EXPECT_FALSE(connection_.GetBlackholeDetectorAlarm()->IsSet()); - // Send stream data. - SendStreamDataToPeer( - GetNthClientInitiatedStreamId(1, connection_.transport_version()), "foo", - 0, FIN, nullptr); - // Verify blackhole delay is expected. - EXPECT_EQ(clock_.Now() + - connection_.sent_packet_manager().GetNetworkBlackholeDelay(3), - QuicConnectionPeer::GetBlackholeDetectionDeadline(&connection_)); -} - -TEST_P(QuicConnectionTest, 4RtoBlackholeDetection) { - if (!GetQuicReloadableFlag(quic_default_enable_5rto_blackhole_detection2) || - GetQuicReloadableFlag(quic_remove_blackhole_detection_experiments)) { - return; - } - QuicConfig config; - QuicTagVector connection_options; - connection_options.push_back(k4RTO); - config.SetConnectionOptionsToSend(connection_options); - EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _)); - connection_.SetFromConfig(config); - const size_t kMinRttMs = 40; - RttStats* rtt_stats = const_cast<RttStats*>(manager_->GetRttStats()); - rtt_stats->UpdateRtt(QuicTime::Delta::FromMilliseconds(kMinRttMs), - QuicTime::Delta::Zero(), QuicTime::Zero()); - EXPECT_CALL(visitor_, GetHandshakeState()) - .WillRepeatedly(Return(HANDSHAKE_COMPLETE)); - EXPECT_FALSE(connection_.GetBlackholeDetectorAlarm()->IsSet()); - // Send stream data. - SendStreamDataToPeer( - GetNthClientInitiatedStreamId(1, connection_.transport_version()), "foo", - 0, FIN, nullptr); - // Verify blackhole delay is expected. - EXPECT_EQ(clock_.Now() + - connection_.sent_packet_manager().GetNetworkBlackholeDelay(4), - QuicConnectionPeer::GetBlackholeDetectionDeadline(&connection_)); -} - -TEST_P(QuicConnectionTest, 6RtoBlackholeDetection) { - if (!GetQuicReloadableFlag(quic_default_enable_5rto_blackhole_detection2) || - GetQuicReloadableFlag(quic_remove_blackhole_detection_experiments)) { - return; - } - QuicConfig config; - QuicTagVector connection_options; - connection_options.push_back(k6RTO); - config.SetConnectionOptionsToSend(connection_options); - EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _)); - connection_.SetFromConfig(config); - const size_t kMinRttMs = 40; - RttStats* rtt_stats = const_cast<RttStats*>(manager_->GetRttStats()); - rtt_stats->UpdateRtt(QuicTime::Delta::FromMilliseconds(kMinRttMs), - QuicTime::Delta::Zero(), QuicTime::Zero()); - EXPECT_CALL(visitor_, GetHandshakeState()) - .WillRepeatedly(Return(HANDSHAKE_COMPLETE)); - EXPECT_FALSE(connection_.GetBlackholeDetectorAlarm()->IsSet()); - // Send stream data. - SendStreamDataToPeer( - GetNthClientInitiatedStreamId(1, connection_.transport_version()), "foo", - 0, FIN, nullptr); - // Verify blackhole delay is expected. - EXPECT_EQ(clock_.Now() + - connection_.sent_packet_manager().GetNetworkBlackholeDelay(6), - QuicConnectionPeer::GetBlackholeDetectionDeadline(&connection_)); -} - // Regresstion test for b/158491591. TEST_P(QuicConnectionTest, MadeForwardProgressOnDiscardingKeys) { if (!connection_.SupportsMultiplePacketNumberSpaces()) {
diff --git a/quiche/quic/core/quic_flags_list.h b/quiche/quic/core/quic_flags_list.h index 5c0dfdd..c67c44e 100644 --- a/quiche/quic/core/quic_flags_list.h +++ b/quiche/quic/core/quic_flags_list.h
@@ -19,8 +19,6 @@ QUIC_FLAG(quic_reloadable_flag_quic_bbr2_no_probe_up_exit_if_no_queue, true) // If trrue, early return before write control frame in OnCanWrite() if the connection is already closed. QUIC_FLAG(quic_reloadable_flag_quic_no_write_control_frame_upon_connection_close, true) -// If true, 1) remove all experiments that tunes blackhole detection delay or path degrading delay, and 2) ensure network blackhole delay is at least path degrading delay plus 2 PTOs. -QUIC_FLAG(quic_reloadable_flag_quic_remove_blackhole_detection_experiments, true) // If true, QUIC Legacy Version Encapsulation will be disabled. QUIC_FLAG(quic_restart_flag_quic_disable_legacy_version_encapsulation, true) // If true, QUIC will default enable MTU discovery at server, with a target of 1450 bytes.
diff --git a/quiche/quic/core/quic_sent_packet_manager.cc b/quiche/quic/core/quic_sent_packet_manager.cc index 0725631..e6407f3 100644 --- a/quiche/quic/core/quic_sent_packet_manager.cc +++ b/quiche/quic/core/quic_sent_packet_manager.cc
@@ -131,21 +131,6 @@ ignore_ack_delay_ = true; } - if (!remove_blackhole_detection_experiments_) { - if (config.HasClientRequestedIndependentOption(kPDP1, perspective)) { - num_ptos_for_path_degrading_ = 1; - } - if (config.HasClientRequestedIndependentOption(kPDP2, perspective)) { - num_ptos_for_path_degrading_ = 2; - } - if (config.HasClientRequestedIndependentOption(kPDP3, perspective)) { - num_ptos_for_path_degrading_ = 3; - } - if (config.HasClientRequestedIndependentOption(kPDP5, perspective)) { - num_ptos_for_path_degrading_ = 5; - } - } - // Configure congestion control. if (config.HasClientRequestedIndependentOption(kTBBR, perspective)) { SetSendAlgorithm(kBBR);
diff --git a/quiche/quic/core/quic_sent_packet_manager.h b/quiche/quic/core/quic_sent_packet_manager.h index 731bd3d..1324ac2 100644 --- a/quiche/quic/core/quic_sent_packet_manager.h +++ b/quiche/quic/core/quic_sent_packet_manager.h
@@ -465,11 +465,6 @@ // kMinUntrustedInitialRoundTripTimeUs if not |trusted|. void SetInitialRtt(QuicTime::Delta rtt, bool trusted); - // Latched value of --quic_remove_blackhole_detection_experiments. - bool remove_blackhole_detection_experiments() const { - return remove_blackhole_detection_experiments_; - } - private: friend class test::QuicConnectionPeer; friend class test::QuicSentPacketManagerPeer; @@ -674,9 +669,6 @@ // Whether to ignore the ack_delay in received ACKs. bool ignore_ack_delay_; - - const bool remove_blackhole_detection_experiments_ = - GetQuicReloadableFlag(quic_remove_blackhole_detection_experiments); }; } // namespace quic
diff --git a/quiche/quic/core/quic_sent_packet_manager_test.cc b/quiche/quic/core/quic_sent_packet_manager_test.cc index 67605e4..4bc98d5 100644 --- a/quiche/quic/core/quic_sent_packet_manager_test.cc +++ b/quiche/quic/core/quic_sent_packet_manager_test.cc
@@ -2498,38 +2498,6 @@ EXPECT_EQ(expected_delay, manager_.GetPathDegradingDelay()); } -TEST_F(QuicSentPacketManagerTest, GetPathDegradingDelayUsing2PTO) { - if (GetQuicReloadableFlag(quic_remove_blackhole_detection_experiments)) { - return; - } - QuicConfig client_config; - QuicTagVector client_options; - client_options.push_back(kPDP2); - QuicSentPacketManagerPeer::SetPerspective(&manager_, Perspective::IS_CLIENT); - client_config.SetClientConnectionOptions(client_options); - EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _)); - EXPECT_CALL(*network_change_visitor_, OnCongestionChange()); - manager_.SetFromConfig(client_config); - QuicTime::Delta expected_delay = 2 * manager_.GetPtoDelay(); - EXPECT_EQ(expected_delay, manager_.GetPathDegradingDelay()); -} - -TEST_F(QuicSentPacketManagerTest, GetPathDegradingDelayUsing1PTO) { - if (GetQuicReloadableFlag(quic_remove_blackhole_detection_experiments)) { - return; - } - QuicConfig client_config; - QuicTagVector client_options; - client_options.push_back(kPDP1); - QuicSentPacketManagerPeer::SetPerspective(&manager_, Perspective::IS_CLIENT); - client_config.SetClientConnectionOptions(client_options); - EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _)); - EXPECT_CALL(*network_change_visitor_, OnCongestionChange()); - manager_.SetFromConfig(client_config); - QuicTime::Delta expected_delay = 1 * manager_.GetPtoDelay(); - EXPECT_EQ(expected_delay, manager_.GetPathDegradingDelay()); -} - TEST_F(QuicSentPacketManagerTest, ClientsIgnorePings) { QuicSentPacketManagerPeer::SetPerspective(&manager_, Perspective::IS_CLIENT); QuicConfig client_config;