From acc9cfdf7929ed839a70f5227904f3d388c12114 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20L=C3=A9caille?= Date: Fri, 24 Mar 2023 14:16:28 +0100 Subject: [PATCH] MINOR: quic: Adjustments for generic control congestion traces Display the elapsed time since packets were sent in place of the timestamp which do not bring easy to read information. Must be backported to 2.7. --- include/haproxy/quic_cc.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/haproxy/quic_cc.h b/include/haproxy/quic_cc.h index bda74f52b..6e3c7d522 100644 --- a/include/haproxy/quic_cc.h +++ b/include/haproxy/quic_cc.h @@ -53,14 +53,14 @@ static inline const char *quic_cc_state_str(enum quic_cc_algo_state_type state) /* Return a human readable string from control congestion event type. */ static inline void quic_cc_event_trace(struct buffer *buf, const struct quic_cc_event *ev) { - chunk_appendf(buf, " event type="); + chunk_appendf(buf, " event="); switch (ev->type) { case QUIC_CC_EVT_ACK: - chunk_appendf(buf, "ack acked=%llu time_sent:%u", - (unsigned long long)ev->ack.acked, ev->ack.time_sent); + chunk_appendf(buf, "ack acked=%llu time_sent:%dms", + (unsigned long long)ev->ack.acked, TICKS_TO_MS(tick_remain(ev->ack.time_sent, now_ms))); break; case QUIC_CC_EVT_LOSS: - chunk_appendf(buf, "loss now_ms=%u time_sent=%u", now_ms, ev->loss.time_sent); + chunk_appendf(buf, "loss time_sent=%dms", TICKS_TO_MS(tick_remain(ev->loss.time_sent, now_ms))); break; case QUIC_CC_EVT_ECN_CE: chunk_appendf(buf, "ecn_ce");