Deprecate gfe2_reloadable_flag_quic_fix_undecryptable_packets2. PiperOrigin-RevId: 346156080 Change-Id: Ic9167916bbe11de51883fbf1151abcb921c699c5
diff --git a/quic/core/quic_connection.cc b/quic/core/quic_connection.cc index 5d90546..ec037d0 100644 --- a/quic/core/quic_connection.cc +++ b/quic/core/quic_connection.cc
@@ -2284,7 +2284,7 @@ for (const auto& packet : undecryptable_packets_) { absl::StrAppend(&info, "[", EncryptionLevelToString(packet.encryption_level), ", ", - packet.packet->length(), ", ", packet.processed, "]"); + packet.packet->length(), "]"); } absl::StrAppend(&info, "}"); return info; @@ -3744,11 +3744,6 @@ encryption_level_ == ENCRYPTION_INITIAL) { return; } - const bool fix_undecryptable_packets = - GetQuicReloadableFlag(quic_fix_undecryptable_packets2); - if (fix_undecryptable_packets) { - QUIC_RELOADABLE_FLAG_COUNT(quic_fix_undecryptable_packets2); - } auto iter = undecryptable_packets_.begin(); while (connected_ && iter != undecryptable_packets_.end()) { @@ -3759,12 +3754,6 @@ return; } UndecryptablePacket* undecryptable_packet = &*iter; - if (!fix_undecryptable_packets) { - ++iter; - if (undecryptable_packet->processed) { - continue; - } - } QUIC_DVLOG(1) << ENDPOINT << "Attempting to process undecryptable packet"; if (debug_visitor_ != nullptr) { debug_visitor_->OnAttemptingToProcessUndecryptablePacket( @@ -3772,11 +3761,7 @@ } if (framer_.ProcessPacket(*undecryptable_packet->packet)) { QUIC_DVLOG(1) << ENDPOINT << "Processed undecryptable packet!"; - if (fix_undecryptable_packets) { - iter = undecryptable_packets_.erase(iter); - } else { - undecryptable_packet->processed = true; - } + iter = undecryptable_packets_.erase(iter); ++stats_.packets_processed; continue; } @@ -3789,25 +3774,10 @@ QUIC_DVLOG(1) << ENDPOINT << "Need to attempt to process this undecryptable packet later"; - if (fix_undecryptable_packets) { - ++iter; - } + ++iter; continue; } - if (fix_undecryptable_packets) { - iter = undecryptable_packets_.erase(iter); - } else { - undecryptable_packet->processed = true; - } - } - // Remove processed packets. We cannot remove elements in the while loop - // above because currently QuicCircularDeque does not support removing - // mid elements. - while (!fix_undecryptable_packets && !undecryptable_packets_.empty()) { - if (!undecryptable_packets_.front().processed) { - break; - } - undecryptable_packets_.pop_front(); + iter = undecryptable_packets_.erase(iter); } // Once forward secure encryption is in use, there will be no
diff --git a/quic/core/quic_connection.h b/quic/core/quic_connection.h index 80c70eb..c392e7c 100644 --- a/quic/core/quic_connection.h +++ b/quic/core/quic_connection.h
@@ -1273,18 +1273,10 @@ struct QUIC_EXPORT_PRIVATE UndecryptablePacket { UndecryptablePacket(const QuicEncryptedPacket& packet, EncryptionLevel encryption_level) - : packet(packet.Clone()), - encryption_level(encryption_level), - processed(false) {} + : packet(packet.Clone()), encryption_level(encryption_level) {} std::unique_ptr<QuicEncryptedPacket> packet; EncryptionLevel encryption_level; - // This gets set to true if 1) connection sucessfully processed the packet - // or 2) connection failed to process the packet and will not try to process - // it later. - // TODO(fayang): Remove this when deprecating - // quic_fix_undecryptable_packets2. - bool processed; }; // Notifies the visitor of the close and marks the connection as disconnected.
diff --git a/quic/core/quic_connection_test.cc b/quic/core/quic_connection_test.cc index b68b519..3988c84 100644 --- a/quic/core/quic_connection_test.cc +++ b/quic/core/quic_connection_test.cc
@@ -10598,11 +10598,7 @@ // Verify all ENCRYPTION_HANDSHAKE packets get processed. EXPECT_CALL(visitor_, OnStreamFrame(_)).Times(6); connection_.GetProcessUndecryptablePacketsAlarm()->Fire(); - if (GetQuicReloadableFlag(quic_fix_undecryptable_packets2)) { - EXPECT_EQ(1u, QuicConnectionPeer::NumUndecryptablePackets(&connection_)); - } else { - EXPECT_EQ(4u, QuicConnectionPeer::NumUndecryptablePackets(&connection_)); - } + EXPECT_EQ(1u, QuicConnectionPeer::NumUndecryptablePackets(&connection_)); SetDecrypter(ENCRYPTION_FORWARD_SECURE, std::make_unique<StrictTaggingDecrypter>(0x02));
diff --git a/quic/core/quic_flags_list.h b/quic/core/quic_flags_list.h index 9eebe63..d0418a2 100644 --- a/quic/core/quic_flags_list.h +++ b/quic/core/quic_flags_list.h
@@ -37,7 +37,6 @@ QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_encrypted_control_frames, false) QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_extract_x509_subject_using_certificate_view, true) QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_fix_pto_pending_timer_count, true) -QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_fix_undecryptable_packets2, true) QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_fix_willing_and_able_to_write2, true) QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_goaway_with_max_stream_id, false) QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_granular_qpack_error_codes, true)