Deprecate --gfe2_reloadable_flag_quic_count_bytes_on_alternative_path_seperately.
PiperOrigin-RevId: 443091074
diff --git a/quiche/quic/core/quic_connection.cc b/quiche/quic/core/quic_connection.cc
index 82b07cc..cce0d5c 100644
--- a/quiche/quic/core/quic_connection.cc
+++ b/quiche/quic/core/quic_connection.cc
@@ -645,7 +645,6 @@
quic_remove_connection_migration_connection_option_v2);
}
if (framer_.version().HasIetfQuicFrames() &&
- count_bytes_on_alternative_path_separately_ &&
GetQuicReloadableFlag(quic_server_reverse_validate_new_path3) &&
(remove_connection_migration_connection_option ||
config.HasClientSentConnectionOption(kRVCM, perspective_))) {
@@ -2722,14 +2721,9 @@
stats_.bytes_received += packet.length();
++stats_.packets_received;
- if (!count_bytes_on_alternative_path_separately_) {
- if (EnforceAntiAmplificationLimit()) {
- default_path_.bytes_received_before_address_validation += last_size_;
- }
- } else if (IsDefaultPath(last_received_packet_info_.destination_address,
- last_received_packet_info_.source_address) &&
- EnforceAntiAmplificationLimit()) {
- QUIC_CODE_COUNT_N(quic_count_bytes_on_alternative_path_seperately, 1, 5);
+ if (IsDefaultPath(last_received_packet_info_.destination_address,
+ last_received_packet_info_.source_address) &&
+ EnforceAntiAmplificationLimit()) {
last_received_packet_info_.received_bytes_counted = true;
default_path_.bytes_received_before_address_validation += last_size_;
}
@@ -3164,10 +3158,6 @@
"generate packet.";
return false;
}
- if (!count_bytes_on_alternative_path_separately_) {
- return CanWrite(retransmittable);
- }
- QUIC_CODE_COUNT_N(quic_count_bytes_on_alternative_path_seperately, 4, 5);
if (IsDefaultPath(default_path_.self_address,
packet_creator_.peer_address())) {
return CanWrite(retransmittable);
@@ -3601,22 +3591,13 @@
QUIC_DVLOG(1) << ENDPOINT << "time we began writing last sent packet: "
<< packet_send_time.ToDebuggingValue();
- if (!count_bytes_on_alternative_path_separately_) {
+ if (IsDefaultPath(default_path_.self_address, send_to_address)) {
if (EnforceAntiAmplificationLimit()) {
// Include bytes sent even if they are not in flight.
default_path_.bytes_sent_before_address_validation += encrypted_length;
}
} else {
- QUIC_CODE_COUNT_N(quic_count_bytes_on_alternative_path_seperately, 2, 5);
- if (IsDefaultPath(default_path_.self_address, send_to_address)) {
- if (EnforceAntiAmplificationLimit()) {
- // Include bytes sent even if they are not in flight.
- default_path_.bytes_sent_before_address_validation += encrypted_length;
- }
- } else {
- MaybeUpdateBytesSentToAlternativeAddress(send_to_address,
- encrypted_length);
- }
+ MaybeUpdateBytesSentToAlternativeAddress(send_to_address, encrypted_length);
}
// Do not measure rtt of this packet if it's not sent on current path.
@@ -5503,12 +5484,10 @@
}
QuicSocketAddress current_effective_peer_address =
GetEffectivePeerAddressFromCurrentPacket();
- if (!count_bytes_on_alternative_path_separately_ ||
- IsDefaultPath(last_received_packet_info_.destination_address,
+ if (IsDefaultPath(last_received_packet_info_.destination_address,
last_received_packet_info_.source_address)) {
return connected_;
}
- QUIC_CODE_COUNT_N(quic_count_bytes_on_alternative_path_seperately, 3, 5);
if (perspective_ == Perspective::IS_SERVER &&
type == PATH_CHALLENGE_FRAME &&
!IsAlternativePath(last_received_packet_info_.destination_address,
@@ -6020,22 +5999,15 @@
// Account for added padding.
if (length > coalesced_packet_.length()) {
size_t padding_size = length - coalesced_packet_.length();
- if (!count_bytes_on_alternative_path_separately_) {
+ if (IsDefaultPath(coalesced_packet_.self_address(),
+ coalesced_packet_.peer_address())) {
if (EnforceAntiAmplificationLimit()) {
+ // Include bytes sent even if they are not in flight.
default_path_.bytes_sent_before_address_validation += padding_size;
}
} else {
- QUIC_CODE_COUNT_N(quic_count_bytes_on_alternative_path_seperately, 5, 5);
- if (IsDefaultPath(coalesced_packet_.self_address(),
- coalesced_packet_.peer_address())) {
- if (EnforceAntiAmplificationLimit()) {
- // Include bytes sent even if they are not in flight.
- default_path_.bytes_sent_before_address_validation += padding_size;
- }
- } else {
- MaybeUpdateBytesSentToAlternativeAddress(
- coalesced_packet_.peer_address(), padding_size);
- }
+ MaybeUpdateBytesSentToAlternativeAddress(coalesced_packet_.peer_address(),
+ padding_size);
}
stats_.bytes_sent += padding_size;
if (coalesced_packet_.initial_packet() != nullptr &&
diff --git a/quiche/quic/core/quic_connection.h b/quiche/quic/core/quic_connection.h
index 9c93dd4..a52785c 100644
--- a/quiche/quic/core/quic_connection.h
+++ b/quiche/quic/core/quic_connection.h
@@ -1213,10 +1213,6 @@
return connection_migration_use_new_cid_;
}
- bool count_bytes_on_alternative_path_separately() const {
- return count_bytes_on_alternative_path_separately_;
- }
-
// Instantiates connection ID manager.
void CreateConnectionIdManager();
@@ -2231,9 +2227,6 @@
// This field is used to debug b/177312785.
QuicFrameType most_recent_frame_type_;
- bool count_bytes_on_alternative_path_separately_ =
- GetQuicReloadableFlag(quic_count_bytes_on_alternative_path_seperately);
-
// If true, upon seeing a new client address, validate the client address.
bool validate_client_addresses_ = false;
diff --git a/quiche/quic/core/quic_connection_test.cc b/quiche/quic/core/quic_connection_test.cc
index ac4ad7c..34c7ba0 100644
--- a/quiche/quic/core/quic_connection_test.cc
+++ b/quiche/quic/core/quic_connection_test.cc
@@ -2496,8 +2496,7 @@
connection_.GetStats().num_connectivity_probing_received);
EXPECT_EQ(kPeerAddress, connection_.peer_address());
EXPECT_EQ(kPeerAddress, connection_.effective_peer_address());
- if (GetParam().version.HasIetfQuicFrames() &&
- GetQuicReloadableFlag(quic_count_bytes_on_alternative_path_seperately)) {
+ if (GetParam().version.HasIetfQuicFrames()) {
QuicByteCount bytes_sent =
QuicConnectionPeer::BytesSentOnAlternativePath(&connection_);
EXPECT_LT(0u, bytes_sent);
@@ -14605,8 +14604,7 @@
TEST_P(
QuicConnectionTest,
ReplacePeerIssuedConnectionIdOnBothPathsTriggeredByNewConnectionIdFrame) {
- if (!version().HasIetfQuicFrames() ||
- !connection_.count_bytes_on_alternative_path_separately()) {
+ if (!version().HasIetfQuicFrames()) {
return;
}
PathProbeTestInit(Perspective::IS_SERVER);
diff --git a/quiche/quic/core/quic_flags_list.h b/quiche/quic/core/quic_flags_list.h
index bfc2462..befd715 100644
--- a/quiche/quic/core/quic_flags_list.h
+++ b/quiche/quic/core/quic_flags_list.h
@@ -61,8 +61,6 @@
QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_discard_initial_packet_with_key_dropped, true)
// If true, do not bundle ACK while sending PATH_CHALLENGE on alternative path.
QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_not_bundle_ack_on_alternative_path, true)
-// If true, do not count bytes sent/received on the alternative path into the bytes sent/received on the default path.
-QUIC_FLAG(FLAGS_quic_reloadable_flag_quic_count_bytes_on_alternative_path_seperately, 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 creator after coalesce packet of higher space.