]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: Adjustments for generic control congestion traces
authorFrédéric Lécaille <flecaille@haproxy.com>
Fri, 24 Mar 2023 13:16:28 +0000 (14:16 +0100)
committerFrédéric Lécaille <flecaille@haproxy.com>
Fri, 31 Mar 2023 07:54:59 +0000 (09:54 +0200)
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

index bda74f52bd669ce2e2bd5b171233fbc31c95eb31..6e3c7d522d9a2205910ddd9b8ccca7c79ec4b62f 100644 (file)
@@ -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 <ev> 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");