Move local_delayed_ack_time from QuicSentPacketManager to QuicReceivedPacketManager, set the delayed ack time to 1ms for Initial and Handshake packet number spaces when using v99, and use peer_delayed_ack_time instead of local_delayed_ack_time when with the MAD1 connection option.
gfe-relnote: n/a (Refactor or v99 only)
PiperOrigin-RevId: 261378188
Change-Id: I4bfed0bde6fa58506250b766294221f1aaf9fc29
diff --git a/quic/quartc/quartc_factory.cc b/quic/quartc/quartc_factory.cc
index 8a69ab5..6742b89 100644
--- a/quic/quartc/quartc_factory.cc
+++ b/quic/quartc/quartc_factory.cc
@@ -8,6 +8,7 @@
#include "net/third_party/quiche/src/quic/core/quic_utils.h"
#include "net/third_party/quiche/src/quic/core/tls_client_handshaker.h"
#include "net/third_party/quiche/src/quic/core/tls_server_handshaker.h"
+#include "net/third_party/quiche/src/quic/core/uber_received_packet_manager.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_ptr_util.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_socket_address.h"
#include "net/third_party/quiche/src/quic/quartc/quartc_connection_helper.h"
@@ -46,8 +47,8 @@
// Quartc sets its own ack delay; get that ack delay and copy it over
// to the QuicConfig so that it can be properly advertised to the peer
// via transport parameter negotiation.
- quic_config.SetMaxAckDelayToSendMs(quic_connection->sent_packet_manager()
- .local_max_ack_delay()
+ quic_config.SetMaxAckDelayToSendMs(quic_connection->received_packet_manager()
+ .max_ack_delay()
.ToMilliseconds());
return QuicMakeUnique<QuartcClientSession>(
@@ -202,6 +203,8 @@
QuicSentPacketManager& sent_packet_manager =
quic_connection->sent_packet_manager();
+ UberReceivedPacketManager& received_packet_manager =
+ quic_connection->received_packet_manager();
// Default delayed ack time is 25ms.
// If data packets are sent less often (e.g. because p-time was modified),
@@ -213,7 +216,7 @@
// The p-time can go up to as high as 120ms, and when it does, it's
// when the low overhead is the most important thing. Ideally it should be
// above 120ms, but it cannot be higher than 0.5*RTO, which equals to 100ms.
- sent_packet_manager.set_local_max_ack_delay(
+ received_packet_manager.set_max_ack_delay(
QuicTime::Delta::FromMilliseconds(100));
sent_packet_manager.set_peer_max_ack_delay(
QuicTime::Delta::FromMilliseconds(100));