No public description
PiperOrigin-RevId: 673981480
diff --git a/quiche/quic/core/crypto/crypto_protocol.h b/quiche/quic/core/crypto/crypto_protocol.h
index e55af80..83e6ab7 100644
--- a/quiche/quic/core/crypto/crypto_protocol.h
+++ b/quiche/quic/core/crypto/crypto_protocol.h
@@ -490,6 +490,9 @@
// until the SETTINGS frame
// is received.
+// Enable Failed Path Probe experiment
+const QuicTag kFPPE = TAG('F', 'P', 'P', 'E');
+
// clang-format on
// These tags have a special form so that they appear either at the beginning
diff --git a/quiche/quic/core/quic_config_test.cc b/quiche/quic/core/quic_config_test.cc
index fbfc486..4cf30e9 100644
--- a/quiche/quic/core/quic_config_test.cc
+++ b/quiche/quic/core/quic_config_test.cc
@@ -623,16 +623,19 @@
TEST_P(QuicConfigTest, AddConnectionOptionsToSend) {
QuicTagVector copt;
copt.push_back(kNOIP);
+ copt.push_back(kFPPE);
config_.AddConnectionOptionsToSend(copt);
ASSERT_TRUE(config_.HasSendConnectionOptions());
EXPECT_TRUE(quic::ContainsQuicTag(config_.SendConnectionOptions(), kNOIP));
+ EXPECT_TRUE(quic::ContainsQuicTag(config_.SendConnectionOptions(), kFPPE));
copt.clear();
copt.push_back(kSPAD);
copt.push_back(kSPA2);
config_.AddConnectionOptionsToSend(copt);
- ASSERT_EQ(3, config_.SendConnectionOptions().size());
+ ASSERT_EQ(4, config_.SendConnectionOptions().size());
EXPECT_TRUE(quic::ContainsQuicTag(config_.SendConnectionOptions(), kNOIP));
+ EXPECT_TRUE(quic::ContainsQuicTag(config_.SendConnectionOptions(), kFPPE));
EXPECT_TRUE(quic::ContainsQuicTag(config_.SendConnectionOptions(), kSPAD));
EXPECT_TRUE(quic::ContainsQuicTag(config_.SendConnectionOptions(), kSPA2));
}
diff --git a/quiche/quic/core/quic_connection.cc b/quiche/quic/core/quic_connection.cc
index d13d6a7..d569048 100644
--- a/quiche/quic/core/quic_connection.cc
+++ b/quiche/quic/core/quic_connection.cc
@@ -2166,6 +2166,7 @@
<< "STATELESS_RESET received on alternate path after it's "
"validated.";
path_validator_.CancelPathValidation();
+ ++stats_.num_stateless_resets_on_alternate_path;
} else {
QUIC_BUG(quic_bug_10511_17)
<< "Received Stateless Reset on unknown socket.";
@@ -6651,6 +6652,10 @@
reason == PathValidationReason::kMultiPort) {
multi_port_stats_->num_client_probing_attempts++;
}
+ if (perspective_ == Perspective::IS_CLIENT) {
+ stats_.num_client_probing_attempts++;
+ }
+
path_validator_.StartPathValidation(std::move(context),
std::move(result_delegate), reason);
if (perspective_ == Perspective::IS_CLIENT &&
diff --git a/quiche/quic/core/quic_connection_stats.h b/quiche/quic/core/quic_connection_stats.h
index 80a4f07..0a4a696 100644
--- a/quiche/quic/core/quic_connection_stats.h
+++ b/quiche/quic/core/quic_connection_stats.h
@@ -256,6 +256,10 @@
// The total number of streams which were pending from some time.
size_t num_total_pending_streams = 0;
+
+ // Statistics to measure how many client path probes are reset.
+ uint32_t num_client_probing_attempts = 0;
+ uint32_t num_stateless_resets_on_alternate_path = 0;
};
} // namespace quic
diff --git a/quiche/quic/core/quic_connection_test.cc b/quiche/quic/core/quic_connection_test.cc
index 2f77b1f..33b6002 100644
--- a/quiche/quic/core/quic_connection_test.cc
+++ b/quiche/quic/core/quic_connection_test.cc
@@ -13193,6 +13193,7 @@
EXPECT_EQ(1, connection_.GetStats().num_path_degrading);
EXPECT_EQ(1, stats->num_successful_probes);
EXPECT_EQ(1, stats->num_client_probing_attempts);
+ EXPECT_EQ(1, connection_.GetStats().num_client_probing_attempts);
EXPECT_EQ(0, stats->num_multi_port_probe_failures_when_path_degrading);
EXPECT_EQ(kTestRTT, stats->rtt_stats.latest_rtt());
EXPECT_EQ(kTestRTT,
@@ -13270,6 +13271,7 @@
EXPECT_EQ(2, connection_.GetStats().num_path_degrading);
EXPECT_EQ(1, stats->num_multi_port_probe_failures_when_path_degrading);
EXPECT_EQ(0, stats->num_multi_port_probe_failures_when_path_not_degrading);
+ EXPECT_EQ(0, connection_.GetStats().num_stateless_resets_on_alternate_path);
}
TEST_P(QuicConnectionTest, TooManyMultiPortPathCreations) {
@@ -13443,6 +13445,8 @@
EXPECT_CALL(visitor_, OnConnectionClosed(_, ConnectionCloseSource::FROM_PEER))
.Times(0);
connection_.ProcessUdpPacket(kNewSelfAddress, kPeerAddress, *received);
+ EXPECT_EQ(connection_.GetStats().num_client_probing_attempts, 1);
+ EXPECT_EQ(connection_.GetStats().num_stateless_resets_on_alternate_path, 1);
}
// Test that if the client's active migration is disabled, multi-port will not