Deprecate gfe2_reloadable_flag_quic_drop_unsent_path_response.
PiperOrigin-RevId: 428557274
diff --git a/quic/core/quic_connection.cc b/quic/core/quic_connection.cc
index 81fab03..2fe7af3 100644
--- a/quic/core/quic_connection.cc
+++ b/quic/core/quic_connection.cc
@@ -640,7 +640,6 @@
// 2) Client side's rollout can be protected by the same connection option.
connection_migration_use_new_cid_ =
validate_client_addresses_ &&
- GetQuicReloadableFlag(quic_drop_unsent_path_response) &&
GetQuicReloadableFlag(quic_connection_migration_use_new_cid_v2);
if (config.HasReceivedMaxPacketSize()) {
peer_max_packet_size_ = config.ReceivedMaxPacketSize();
@@ -1741,19 +1740,10 @@
// Queue or send PATH_RESPONSE. Send PATH_RESPONSE to the source address of
// the current incoming packet, even if it's not the default path or the
// alternative path.
- const bool success = SendPathResponse(
- frame.data_buffer, last_received_packet_info_.source_address,
- current_effective_peer_address);
- if (GetQuicReloadableFlag(quic_drop_unsent_path_response)) {
- QUIC_RELOADABLE_FLAG_COUNT(quic_drop_unsent_path_response);
- }
- if (!success) {
+ if (!SendPathResponse(frame.data_buffer,
+ last_received_packet_info_.source_address,
+ current_effective_peer_address)) {
QUIC_CODE_COUNT(quic_failed_to_send_path_response);
- if (!GetQuicReloadableFlag(quic_drop_unsent_path_response)) {
- // Queue the payloads to re-try later.
- pending_path_challenge_payloads_.push_back(
- {frame.data_buffer, last_received_packet_info_.source_address});
- }
}
// TODO(b/150095588): change the stats to
// num_valid_path_challenge_received.
@@ -2869,23 +2859,6 @@
}
}
- // TODO(danzh) PATH_RESPONSE is of more interest to the peer than ACK,
- // evaluate if it's worth to send them before sending ACKs.
- while (!pending_path_challenge_payloads_.empty()) {
- QUIC_RELOADABLE_FLAG_COUNT_N(quic_send_path_response2, 4, 5);
- const PendingPathChallenge& pending_path_challenge =
- pending_path_challenge_payloads_.front();
- // Note connection_migration_use_cid_ will depends on
- // quic_drop_unsent_path_response flag eventually, and hence the empty
- // effective_peer_address here will not be used.
- if (!SendPathResponse(pending_path_challenge.received_path_challenge,
- pending_path_challenge.peer_address,
- /*effective_peer_address=*/QuicSocketAddress())) {
- break;
- }
- pending_path_challenge_payloads_.pop_front();
- }
-
// Sending queued packets may have caused the socket to become write blocked,
// or the congestion manager to prohibit sending.
if (!CanWrite(HAS_RETRANSMITTABLE_DATA)) {
diff --git a/quic/core/quic_connection.h b/quic/core/quic_connection.h
index a545527..954eb6a 100644
--- a/quic/core/quic_connection.h
+++ b/quic/core/quic_connection.h
@@ -2169,13 +2169,6 @@
quiche::QuicheCircularDeque<QuicPathFrameBuffer>
received_path_challenge_payloads_;
- // Buffer outstanding PATH_CHALLENGEs if socket write is blocked, future
- // OnCanWrite will attempt to respond with PATH_RESPONSEs using the retained
- // payload and peer addresses.
- // TODO(fayang): remove this when deprecating quic_drop_unsent_path_response.
- quiche::QuicheCircularDeque<PendingPathChallenge>
- pending_path_challenge_payloads_;
-
// When we receive a RETRY packet or some INITIAL packets, we replace
// |server_connection_id_| with the value from that packet and save off the
// original value of |server_connection_id_| into
diff --git a/quic/core/quic_connection_test.cc b/quic/core/quic_connection_test.cc
index 98978e9..fba066c 100644
--- a/quic/core/quic_connection_test.cc
+++ b/quic/core/quic_connection_test.cc
@@ -12528,30 +12528,6 @@
writer_->SetWriteBlocked();
ProcessFramesPacketWithAddresses(frames, kSelfAddress, kNewPeerAddress,
ENCRYPTION_FORWARD_SECURE);
-
- if (GetQuicReloadableFlag(quic_drop_unsent_path_response)) {
- EXPECT_EQ(0u, QuicConnectionPeer::NumPendingPathChallengesToResponse(
- &connection_));
- return;
- }
- ASSERT_EQ(
- 1u, QuicConnectionPeer::NumPendingPathChallengesToResponse(&connection_));
-
- EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(AtLeast(1));
- writer_->SetWritable();
- connection_.OnCanWrite();
- EXPECT_EQ(1u, writer_->path_response_frames().size());
- // The final check is to ensure that the random data in the response
- // matches the random data from the challenge.
- EXPECT_EQ(0, memcmp(path_frame_buffer.data(),
- &(writer_->path_response_frames().front().data_buffer),
- sizeof(path_frame_buffer)));
- EXPECT_EQ(1u, writer_->padding_frames().size());
- // PATH_RESPONSE should be sent in another packet to a different peer
- // address.
- EXPECT_EQ(kNewPeerAddress, writer_->last_write_peer_address());
- EXPECT_EQ(
- 0u, QuicConnectionPeer::NumPendingPathChallengesToResponse(&connection_));
}
// Regression test for b/168101557.
diff --git a/quic/core/quic_flags_list.h b/quic/core/quic_flags_list.h
index d955f5d..fd29e1f 100644
--- a/quic/core/quic_flags_list.h
+++ b/quic/core/quic_flags_list.h
@@ -73,8 +73,6 @@
QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_count_bytes_on_alternative_path_seperately, true)
// If true, do not use the gQUIC common certificate set for certificate compression.
QUIC_FLAG(FLAGS_quic_restart_flag_quic_no_common_cert_set, true)
-// If true, drop unsent PATH_RESPONSEs and rely on peer\'s retry.
-QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_drop_unsent_path_response, true)
// If true, enable server retransmittable on wire PING.
QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_enable_server_on_wire_ping, true)
// If true, flush pending frames as well as pending padding bytes on connection migration.
diff --git a/quic/test_tools/quic_connection_peer.cc b/quic/test_tools/quic_connection_peer.cc
index ec579be..207582f 100644
--- a/quic/test_tools/quic_connection_peer.cc
+++ b/quic/test_tools/quic_connection_peer.cc
@@ -413,12 +413,6 @@
return connection->undecryptable_packets_.size();
}
-// static
-size_t QuicConnectionPeer::NumPendingPathChallengesToResponse(
- QuicConnection* connection) {
- return connection->pending_path_challenge_payloads_.size();
-}
-
void QuicConnectionPeer::SetConnectionClose(QuicConnection* connection) {
connection->connected_ = false;
}
diff --git a/quic/test_tools/quic_connection_peer.h b/quic/test_tools/quic_connection_peer.h
index 26d2f41..62ed60e 100644
--- a/quic/test_tools/quic_connection_peer.h
+++ b/quic/test_tools/quic_connection_peer.h
@@ -168,8 +168,6 @@
static size_t NumUndecryptablePackets(QuicConnection* connection);
- static size_t NumPendingPathChallengesToResponse(QuicConnection* connection);
-
static void SetConnectionClose(QuicConnection* connection);
static void SendPing(QuicConnection* connection);