Make Hyperloop client and server enable flow label changes to avoid black holes. Also tweaked QuicConnection to generate a new flow label when flow label based black hole avoidance is enabled, and added CODE_COUNTS for when the flow label changes Protected by FLAGS_quic_restart_flag_quic_support_flow_label. PiperOrigin-RevId: 687128169
diff --git a/quiche/common/quiche_feature_flags_list.h b/quiche/common/quiche_feature_flags_list.h index dea7cae..281816a 100755 --- a/quiche/common/quiche_feature_flags_list.h +++ b/quiche/common/quiche_feature_flags_list.h
@@ -49,13 +49,13 @@ QUICHE_FLAG(bool, quiche_reloadable_flag_quic_require_handshake_confirmation, true, true, "If true, require handshake confirmation for QUIC connections, functionally disabling 0-rtt handshakes.") QUICHE_FLAG(bool, quiche_reloadable_flag_quic_send_placeholder_ticket_when_encrypt_ticket_fails, false, true, "If true, when TicketCrypter fails to encrypt a session ticket, quic::TlsServerHandshaker will send a placeholder ticket, instead of an empty one, to the client.") QUICHE_FLAG(bool, quiche_reloadable_flag_quic_stop_reading_also_stops_header_decompression, true, true, "If true, QUIC stream will not continue decompressing buffer headers after StopReading() called.") -QUICHE_FLAG(bool, quiche_reloadable_flag_quic_support_flow_label, false, false, "If true, QUIC will support reading and writing IPv6 flow labels.") QUICHE_FLAG(bool, quiche_reloadable_flag_quic_test_peer_addr_change_after_normalize, false, false, "If true, QuicConnection::ProcessValidatedPacket will use normalized address to test peer address changes.") QUICHE_FLAG(bool, quiche_reloadable_flag_quic_testonly_default_false, false, false, "A testonly reloadable flag that will always default to false.") QUICHE_FLAG(bool, quiche_reloadable_flag_quic_testonly_default_true, true, true, "A testonly reloadable flag that will always default to true.") QUICHE_FLAG(bool, quiche_reloadable_flag_quic_use_received_client_addresses_cache, true, true, "If true, use a LRU cache to record client addresses of packets received on server's original address.") QUICHE_FLAG(bool, quiche_restart_flag_quic_dispatcher_ack_buffered_initial_packets, true, true, "If both this flag and --quic_dispatcher_replace_cid_on_first_packet are true, QUIC dispatcher will ack INITIAL packets once it is saved into buffered packet store.") QUICHE_FLAG(bool, quiche_restart_flag_quic_support_ect1, false, false, "When true, allows sending of QUIC packets marked ECT(1). A different flag (TBD) will actually utilize this capability to send ECT(1).") +QUICHE_FLAG(bool, quiche_restart_flag_quic_support_flow_label, false, false, "If true, QUIC will support reading and writing IPv6 flow labels.") QUICHE_FLAG(bool, quiche_restart_flag_quic_support_release_time_for_gso, false, false, "If true, QuicGsoBatchWriter will support release time if it is available and the process has the permission to do so.") QUICHE_FLAG(bool, quiche_restart_flag_quic_testonly_default_false, false, false, "A testonly restart flag that will always default to false.") QUICHE_FLAG(bool, quiche_restart_flag_quic_testonly_default_true, true, true, "A testonly restart flag that will always default to true.")
diff --git a/quiche/quic/core/http/end_to_end_test.cc b/quiche/quic/core/http/end_to_end_test.cc index 6172baa..06f2bcb 100644 --- a/quiche/quic/core/http/end_to_end_test.cc +++ b/quiche/quic/core/http/end_to_end_test.cc
@@ -7742,7 +7742,7 @@ } TEST_P(EndToEndTest, FlowLabelSend) { - SetQuicReloadableFlag(quic_support_flow_label, true); + SetQuicRestartFlag(quic_support_flow_label, true); ASSERT_TRUE(Initialize()); const uint32_t server_flow_label = 2;
diff --git a/quiche/quic/core/quic_default_packet_writer.cc b/quiche/quic/core/quic_default_packet_writer.cc index 8427726..9545f4d 100644 --- a/quiche/quic/core/quic_default_packet_writer.cc +++ b/quiche/quic/core/quic_default_packet_writer.cc
@@ -24,7 +24,8 @@ packet_info.SetPeerAddress(peer_address); packet_info.SetSelfIp(self_address); packet_info.SetEcnCodepoint(params.ecn_codepoint); - if (GetQuicReloadableFlag(quic_support_flow_label)) { + if (GetQuicRestartFlag(quic_support_flow_label)) { + QUIC_RESTART_FLAG_COUNT_N(quic_support_flow_label, 3, 5); packet_info.SetFlowLabel(params.flow_label); } WriteResult result =
diff --git a/quiche/quic/core/quic_packet_reader.cc b/quiche/quic/core/quic_packet_reader.cc index 4cf19a6..5aa3940 100644 --- a/quiche/quic/core/quic_packet_reader.cc +++ b/quiche/quic/core/quic_packet_reader.cc
@@ -55,7 +55,8 @@ QuicUdpPacketInfoBit::V6_SELF_IP, QuicUdpPacketInfoBit::RECV_TIMESTAMP, QuicUdpPacketInfoBit::TTL, QuicUdpPacketInfoBit::GOOGLE_PACKET_HEADER, QuicUdpPacketInfoBit::ECN}); - if (GetQuicReloadableFlag(quic_support_flow_label)) { + if (GetQuicRestartFlag(quic_support_flow_label)) { + QUIC_RESTART_FLAG_COUNT_N(quic_support_flow_label, 4, 5); info_bits.Set(QuicUdpPacketInfoBit::V6_FLOW_LABEL); } size_t packets_read =
diff --git a/quiche/quic/core/quic_udp_socket_posix.inc b/quiche/quic/core/quic_udp_socket_posix.inc index 0e79f5d..f0c28b6 100644 --- a/quiche/quic/core/quic_udp_socket_posix.inc +++ b/quiche/quic/core/quic_udp_socket_posix.inc
@@ -244,7 +244,8 @@ return false; } #if defined(__linux__) - if (GetQuicReloadableFlag(quic_support_flow_label)) { + if (GetQuicRestartFlag(quic_support_flow_label)) { + QUIC_RESTART_FLAG_COUNT_N(quic_support_flow_label, 5, 5); if (setsockopt(fd, SOL_IPV6, IPV6_FLOWINFO, &set, sizeof(set)) != 0) { QUIC_LOG_FIRST_N(ERROR, 100) << "Failed to request to receive flow label on "
diff --git a/quiche/quic/core/quic_udp_socket_test.cc b/quiche/quic/core/quic_udp_socket_test.cc index 3d46f87..1c00dc7 100644 --- a/quiche/quic/core/quic_udp_socket_test.cc +++ b/quiche/quic/core/quic_udp_socket_test.cc
@@ -28,7 +28,7 @@ }; TEST_F(QuicUdpSocketTest, Basic) { - SetQuicReloadableFlag(quic_support_flow_label, true); + SetQuicRestartFlag(quic_support_flow_label, true); const QuicSocketAddress any_address(quiche::QuicheIpAddress::Any6(), 0); QuicUdpSocketApi socket_api; @@ -81,7 +81,7 @@ } TEST_F(QuicUdpSocketTest, FlowLabel) { - SetQuicReloadableFlag(quic_support_flow_label, true); + SetQuicRestartFlag(quic_support_flow_label, true); const QuicSocketAddress any_address(quiche::QuicheIpAddress::Any6(), 0); QuicUdpSocketApi socket_api;