Add kAFF2 enabling the sending of AckFrequencyFrame upon handshake completion.
Protected by FLAGS_quic_reloadable_flag_quic_can_send_ack_frequency.
PiperOrigin-RevId: 337855733
Change-Id: I45e3c11605e37c01e217a7a86237f35cdfb806c9
diff --git a/quic/core/quic_sent_packet_manager.cc b/quic/core/quic_sent_packet_manager.cc
index bdad0e4..01e2840 100644
--- a/quic/core/quic_sent_packet_manager.cc
+++ b/quic/core/quic_sent_packet_manager.cc
@@ -726,13 +726,17 @@
return frame;
}
- QUIC_RELOADABLE_FLAG_COUNT(quic_can_send_ack_frequency);
+ QUIC_RELOADABLE_FLAG_COUNT_N(quic_can_send_ack_frequency, 1, 3);
frame.packet_tolerance = kMaxRetransmittablePacketsBeforeAck;
auto rtt = use_smoothed_rtt_in_ack_delay_ ? rtt_stats_.SmoothedOrInitialRtt()
: rtt_stats_.MinOrInitialRtt();
frame.max_ack_delay = rtt * kAckDecimationDelay;
frame.max_ack_delay = std::max(frame.max_ack_delay, peer_min_ack_delay_);
-
+ // TODO(haoyuewang) Remove this once kDefaultMinAckDelayTimeMs is updated to
+ // 5 ms on the client side.
+ frame.max_ack_delay =
+ std::max(frame.max_ack_delay,
+ QuicTime::Delta::FromMilliseconds(kDefaultMinAckDelayTimeMs));
return frame;
}