Deprecate --gfe2_reloadable_flag_quic_revert_mtu_after_two_ptos.
PiperOrigin-RevId: 331556515
Change-Id: If3d7359784ced6c96cc64ef07dfed7cd0d0bbcd8
diff --git a/quic/core/quic_connection.cc b/quic/core/quic_connection.cc
index f658999..38a72fb 100644
--- a/quic/core/quic_connection.cc
+++ b/quic/core/quic_connection.cc
@@ -3007,9 +3007,6 @@
}
QuicTime QuicConnection::GetPathMtuReductionDeadline() const {
- if (!blackhole_detector_.revert_mtu_after_two_ptos()) {
- return QuicTime::Zero();
- }
if (previous_validated_mtu_ == 0) {
return QuicTime::Zero();
}
@@ -4800,12 +4797,7 @@
}
void QuicConnection::OnPathMtuReductionDetected() {
- DCHECK(blackhole_detector_.revert_mtu_after_two_ptos());
- if (MaybeRevertToPreviousMtu()) {
- QUIC_RELOADABLE_FLAG_COUNT_N(quic_revert_mtu_after_two_ptos, 1, 2);
- } else {
- QUIC_RELOADABLE_FLAG_COUNT_N(quic_revert_mtu_after_two_ptos, 2, 2);
- }
+ MaybeRevertToPreviousMtu();
}
void QuicConnection::OnHandshakeTimeout() {
diff --git a/quic/core/quic_connection_test.cc b/quic/core/quic_connection_test.cc
index 638c515..d33718a 100644
--- a/quic/core/quic_connection_test.cc
+++ b/quic/core/quic_connection_test.cc
@@ -5481,11 +5481,6 @@
EXPECT_EQ(third_probe_size, connection_.max_packet_length());
SendStreamDataToPeer(3, "$", stream_offset++, NO_FIN, nullptr);
- if (!GetQuicReloadableFlag(quic_revert_mtu_after_two_ptos)) {
- EXPECT_FALSE(connection_.PathMtuReductionDetectionInProgress());
- return;
- }
-
EXPECT_TRUE(connection_.PathMtuReductionDetectionInProgress());
if (connection_.PathDegradingDetectionInProgress() &&
diff --git a/quic/core/quic_network_blackhole_detector.cc b/quic/core/quic_network_blackhole_detector.cc
index 02e3308..95b3975 100644
--- a/quic/core/quic_network_blackhole_detector.cc
+++ b/quic/core/quic_network_blackhole_detector.cc
@@ -34,21 +34,6 @@
alarm_factory->CreateAlarm(arena->New<AlarmDelegate>(this), arena)) {}
void QuicNetworkBlackholeDetector::OnAlarm() {
- if (!revert_mtu_after_two_ptos_) {
- if (path_degrading_deadline_.IsInitialized()) {
- path_degrading_deadline_ = QuicTime::Zero();
- delegate_->OnPathDegradingDetected();
- // Switch to blackhole detection mode.
- alarm_->Update(blackhole_deadline_, kAlarmGranularity);
- return;
- }
- if (blackhole_deadline_.IsInitialized()) {
- blackhole_deadline_ = QuicTime::Zero();
- delegate_->OnBlackholeDetected();
- }
- return;
- }
-
QuicTime next_deadline = GetEarliestDeadline();
if (!next_deadline.IsInitialized()) {
QUIC_BUG << "BlackholeDetector alarm fired unexpectedly";
@@ -94,31 +79,14 @@
blackhole_deadline_ = blackhole_deadline;
path_mtu_reduction_deadline_ = path_mtu_reduction_deadline;
- if (!revert_mtu_after_two_ptos_) {
- QUIC_BUG_IF(path_degrading_deadline_.IsInitialized() &&
- blackhole_deadline_.IsInitialized() &&
- path_degrading_deadline_ > blackhole_deadline_)
- << "Path degrading timeout is later than blackhole detection timeout";
- } else {
- QUIC_BUG_IF(blackhole_deadline_.IsInitialized() &&
- blackhole_deadline_ != GetLastDeadline())
- << "Blackhole detection deadline should be the last deadline.";
- }
+ QUIC_BUG_IF(blackhole_deadline_.IsInitialized() &&
+ blackhole_deadline_ != GetLastDeadline())
+ << "Blackhole detection deadline should be the last deadline.";
- if (!revert_mtu_after_two_ptos_) {
- alarm_->Update(path_degrading_deadline_, kAlarmGranularity);
- if (alarm_->IsSet()) {
- return;
- }
- alarm_->Update(blackhole_deadline_, kAlarmGranularity);
- } else {
- UpdateAlarm();
- }
+ UpdateAlarm();
}
QuicTime QuicNetworkBlackholeDetector::GetEarliestDeadline() const {
- DCHECK(revert_mtu_after_two_ptos_);
-
QuicTime result = QuicTime::Zero();
for (QuicTime t : {path_degrading_deadline_, blackhole_deadline_,
path_mtu_reduction_deadline_}) {
@@ -135,14 +103,11 @@
}
QuicTime QuicNetworkBlackholeDetector::GetLastDeadline() const {
- DCHECK(revert_mtu_after_two_ptos_);
return std::max({path_degrading_deadline_, blackhole_deadline_,
path_mtu_reduction_deadline_});
}
void QuicNetworkBlackholeDetector::UpdateAlarm() const {
- DCHECK(revert_mtu_after_two_ptos_);
-
QuicTime next_deadline = GetEarliestDeadline();
QUIC_DLOG(INFO) << "Updating alarm. next_deadline:" << next_deadline
diff --git a/quic/core/quic_network_blackhole_detector.h b/quic/core/quic_network_blackhole_detector.h
index 77c5c59..6952c85 100644
--- a/quic/core/quic_network_blackhole_detector.h
+++ b/quic/core/quic_network_blackhole_detector.h
@@ -60,8 +60,6 @@
// Returns true if |alarm_| is set.
bool IsDetectionInProgress() const;
- bool revert_mtu_after_two_ptos() const { return revert_mtu_after_two_ptos_; }
-
private:
friend class test::QuicConnectionPeer;
friend class test::QuicNetworkBlackholeDetectorPeer;
@@ -74,9 +72,6 @@
Delegate* delegate_; // Not owned.
- const bool revert_mtu_after_two_ptos_ =
- GetQuicReloadableFlag(quic_revert_mtu_after_two_ptos);
-
// Time that Delegate::OnPathDegrading will be called. 0 means no path
// degrading detection is in progress.
QuicTime path_degrading_deadline_ = QuicTime::Zero();
diff --git a/quic/core/quic_network_blackhole_detector_test.cc b/quic/core/quic_network_blackhole_detector_test.cc
index 3f6f747..d628d77 100644
--- a/quic/core/quic_network_blackhole_detector_test.cc
+++ b/quic/core/quic_network_blackhole_detector_test.cc
@@ -77,20 +77,6 @@
EXPECT_CALL(delegate_, OnPathDegradingDetected());
alarm_->Fire();
- if (!detector_.revert_mtu_after_two_ptos()) {
- // Verify blackhole detection is still in progress.
- EXPECT_TRUE(detector_.IsDetectionInProgress());
- EXPECT_EQ(clock_.Now() + blackhole_delay_ - path_degrading_delay_,
- alarm_->deadline());
-
- // Fire blackhole detection alarm.
- clock_.AdvanceTime(blackhole_delay_ - path_degrading_delay_);
- EXPECT_CALL(delegate_, OnBlackholeDetected());
- alarm_->Fire();
- EXPECT_FALSE(detector_.IsDetectionInProgress());
- return;
- }
-
// Verify path mtu reduction detection is still in progress.
EXPECT_TRUE(detector_.IsDetectionInProgress());
EXPECT_EQ(clock_.Now() + path_mtu_reduction_delay_ - path_degrading_delay_,
@@ -135,17 +121,10 @@
EXPECT_CALL(delegate_, OnPathDegradingDetected());
alarm_->Fire();
- if (!detector_.revert_mtu_after_two_ptos()) {
- // Verify blackhole detection is still in progress.
- EXPECT_TRUE(detector_.IsDetectionInProgress());
- EXPECT_EQ(clock_.Now() + blackhole_delay_ - path_degrading_delay_,
- alarm_->deadline());
- } else {
- // Verify path mtu reduction detection is still in progress.
- EXPECT_TRUE(detector_.IsDetectionInProgress());
- EXPECT_EQ(clock_.Now() + path_mtu_reduction_delay_ - path_degrading_delay_,
- alarm_->deadline());
- }
+ // Verify path mtu reduction detection is still in progress.
+ EXPECT_TRUE(detector_.IsDetectionInProgress());
+ EXPECT_EQ(clock_.Now() + path_mtu_reduction_delay_ - path_degrading_delay_,
+ alarm_->deadline());
// After 100ms, restart detections on forward progress.
clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(100));