MINOR: quic: Add traces for in flght ack-eliciting packet counter.
Add trace for this counter. Also shorten its variable name (->ifae_pkts).
diff --git a/include/haproxy/quic_loss.h b/include/haproxy/quic_loss.h
index ee7649c..16fe5aa 100644
--- a/include/haproxy/quic_loss.h
+++ b/include/haproxy/quic_loss.h
@@ -109,9 +109,12 @@
struct quic_pktns *pktns;
pktns = &qc->pktns[QUIC_TLS_PKTNS_INITIAL];
- for (i = QUIC_TLS_PKTNS_01RTT; i < QUIC_TLS_PKTNS_MAX; i++)
+ TRACE_PROTO("pktns", QUIC_EV_CONN_SPTO, qc->conn, pktns);
+ for (i = QUIC_TLS_PKTNS_01RTT; i < QUIC_TLS_PKTNS_MAX; i++) {
+ TRACE_PROTO("pktns", QUIC_EV_CONN_SPTO, qc->conn, &qc->pktns[i]);
if (qc->pktns[i].tx.loss_time < pktns->tx.loss_time)
pktns = &qc->pktns[i];
+ }
return pktns;
}
diff --git a/include/haproxy/xprt_quic-t.h b/include/haproxy/xprt_quic-t.h
index 8e240a0..37cbb46 100644
--- a/include/haproxy/xprt_quic-t.h
+++ b/include/haproxy/xprt_quic-t.h
@@ -569,7 +569,7 @@
/* Outstanding data (in bytes). */
uint64_t in_flight;
/* Number of in flight ack-eliciting packets. */
- uint64_t in_flight_ae_pkts;
+ uint64_t ifae_pkts;
};
/* The number of buffers for outgoing packets (must be a power of two). */
diff --git a/include/haproxy/xprt_quic.h b/include/haproxy/xprt_quic.h
index 498ddb6..17b3254 100644
--- a/include/haproxy/xprt_quic.h
+++ b/include/haproxy/xprt_quic.h
@@ -1039,7 +1039,7 @@
path->min_cwnd = max_dgram_sz << 1;
path->prep_in_flight = 0;
path->in_flight = 0;
- path->in_flight_ae_pkts = 0;
+ path->ifae_pkts = 0;
quic_cc_init(&path->cc, algo, qc);
}
diff --git a/src/xprt_quic.c b/src/xprt_quic.c
index 16c8c43..3ab9328 100644
--- a/src/xprt_quic.c
+++ b/src/xprt_quic.c
@@ -462,7 +462,7 @@
pktns == &qc->pktns[QUIC_TLS_PKTNS_01RTT] ? "01RTT": "H");
if (pktns->tx.loss_time)
chunk_appendf(&trace_buf, " loss_time=%dms",
- TICKS_TO_MS(qc->timer - now_ms));
+ TICKS_TO_MS(tick_remain(now_ms, pktns->tx.loss_time)));
}
if (lost_pkts && !LIST_ISEMPTY(lost_pkts)) {
struct quic_tx_packet *pkt;
@@ -477,7 +477,11 @@
struct quic_conn *qc = conn->qc;
const struct quic_pktns *pktns = a2;
const int *duration = a3;
+ const uint64_t *ifae_pkts = a4;
+ if (ifae_pkts)
+ chunk_appendf(&trace_buf, " ifae_pkts=%llu",
+ (unsigned long long)*ifae_pkts);
if (pktns) {
chunk_appendf(&trace_buf, " pktns=%s pp=%d",
pktns == &qc->pktns[QUIC_TLS_PKTNS_INITIAL] ? "I" :
@@ -569,7 +573,8 @@
struct quic_pktns *pktns;
unsigned int pto;
- TRACE_ENTER(QUIC_EV_CONN_STIMER, ctx->conn);
+ TRACE_ENTER(QUIC_EV_CONN_STIMER, ctx->conn,
+ NULL, NULL, &ctx->conn->qc->path->ifae_pkts);
qc = ctx->conn->qc;
pktns = quic_loss_pktns(qc);
if (tick_isset(pktns->tx.loss_time)) {
@@ -581,7 +586,8 @@
* cancelled for a server which reached the anti-amplification limit.
*/
- if (!qc->path->in_flight_ae_pkts && quic_peer_validated_addr(ctx)) {
+ if (!qc->path->ifae_pkts && quic_peer_validated_addr(ctx)) {
+ TRACE_PROTO("timer cancellation", QUIC_EV_CONN_STIMER, ctx->conn);
/* Timer cancellation. */
qc->timer = TICK_ETERNITY;
goto out;
@@ -1202,7 +1208,7 @@
pkt->pktns->tx.in_flight -= pkt->in_flight_len;
qc->path->prep_in_flight -= pkt->in_flight_len;
if (pkt->flags & QUIC_FL_TX_PACKET_ACK_ELICITING)
- qc->path->in_flight_ae_pkts--;
+ qc->path->ifae_pkts--;
ev.ack.acked = pkt->in_flight_len;
ev.ack.time_sent = pkt->time_sent;
quic_cc_event(&qc->path->cc, &ev);
@@ -1237,7 +1243,7 @@
pkt->pktns->tx.in_flight -= pkt->in_flight_len;
qc->path->prep_in_flight -= pkt->in_flight_len;
if (pkt->flags & QUIC_FL_TX_PACKET_ACK_ELICITING)
- qc->path->in_flight_ae_pkts--;
+ qc->path->ifae_pkts--;
/* Treat the frames of this lost packet. */
list_for_each_entry_safe(frm, frmbak, &pkt->frms, list)
qc_treat_nacked_tx_frm(frm, pktns, ctx);
@@ -1772,7 +1778,7 @@
p->time_sent = time_sent;
if (p->flags & QUIC_FL_TX_PACKET_ACK_ELICITING) {
p->pktns->tx.time_of_last_eliciting = time_sent;
- qc->path->in_flight_ae_pkts++;
+ qc->path->ifae_pkts++;
}
qc->path->in_flight += p->in_flight_len;
p->pktns->tx.in_flight += p->in_flight_len;
@@ -2401,7 +2407,8 @@
conn_ctx = task->context;
qc = conn_ctx->conn->qc;
- TRACE_ENTER(QUIC_EV_CONN_PTIMER, conn_ctx->conn);
+ TRACE_ENTER(QUIC_EV_CONN_PTIMER, conn_ctx->conn,
+ NULL, NULL, &qc->path->ifae_pkts);
task->expire = TICK_ETERNITY;
pktns = quic_loss_pktns(qc);
if (tick_isset(pktns->tx.loss_time)) {