From 0fa553d0c2249d95c128636ed5c96912a9f3dbfd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20L=C3=A9caille?= Date: Mon, 17 Jan 2022 14:26:12 +0100 Subject: [PATCH] MINOR: quic: Send two ack-eliciting packets when probing packet number spaces This is to avoid too much PTO timer expirations for 01RTT and Handshake packet number spaces. Furthermore we are not limited by the anti-amplication for 01RTT packet number space. According to the RFC we can send up to two packets. --- src/xprt_quic.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/xprt_quic.c b/src/xprt_quic.c index f56ea0cd2d..e5b7c7d62b 100644 --- a/src/xprt_quic.c +++ b/src/xprt_quic.c @@ -3394,11 +3394,14 @@ static struct task *process_timer(struct task *task, void *ctx, unsigned int sta st = HA_ATOMIC_LOAD(&qc->state); if (qc->path->in_flight) { pktns = quic_pto_pktns(qc, st >= QUIC_HS_ST_COMPLETE, NULL); - if (qc_is_listener(qc) && - pktns == &qc->pktns[QUIC_TLS_PKTNS_HANDSHAKE] && - qc->pktns[QUIC_TLS_PKTNS_INITIAL].tx.in_flight) - qc->pktns[QUIC_TLS_PKTNS_INITIAL].tx.pto_probe = 1; - pktns->tx.pto_probe = 1; + if (pktns == &qc->pktns[QUIC_TLS_PKTNS_INITIAL]) { + pktns->tx.pto_probe = 1; + if (qc->pktns[QUIC_TLS_PKTNS_HANDSHAKE].tx.in_flight) + qc->pktns[QUIC_TLS_PKTNS_HANDSHAKE].tx.pto_probe = 1; + } + else { + pktns->tx.pto_probe = 2; + } } else if (!qc_is_listener(qc) && st <= QUIC_HS_ST_COMPLETE) { struct quic_enc_level *iel = &qc->els[QUIC_TLS_ENC_LEVEL_INITIAL]; -- 2.47.3