MINOR: quic: Dump TX in flight bytes vs window values ratio.
authorFrederic Lecaille <flecaille@haproxy.com>
Fri, 26 Jul 2024 14:30:57 +0000 (16:30 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 29 Jul 2024 09:56:13 +0000 (11:56 +0200)
Display the ratio of the numbers of bytes in flight by packet number spaces
versus the current window values in percent.

(cherry picked from commit 4abaadd842de23e25938e32add86ab37d8f67e24)
Signed-off-by: Willy Tarreau <w@1wt.eu>

src/quic_cli.c

index f0e147c..a6e9cca 100644 (file)
@@ -282,20 +282,23 @@ static void dump_quic_full(struct show_quic_ctx *ctx, struct quic_conn *qc)
        if (ctx->fields & QUIC_DUMP_FLD_PKTNS) {
                pktns = qc->ipktns;
                if (pktns) {
-                       chunk_appendf(&trash, "  [initl] rx.ackrng=%-6zu tx.inflight=%-6zu\n",
-                                     pktns->rx.arngs.sz, pktns->tx.in_flight);
+                       chunk_appendf(&trash, "  [initl] rx.ackrng=%-6zu tx.inflight=%-6zu(%ld%%)\n",
+                                     pktns->rx.arngs.sz, pktns->tx.in_flight,
+                                     pktns->tx.in_flight * 100 / qc->path->cwnd);
                }
 
                pktns = qc->hpktns;
                if (pktns) {
-                       chunk_appendf(&trash, "  [hndshk] rx.ackrng=%-6zu tx.inflight=%-6zu\n",
-                                     pktns->rx.arngs.sz, pktns->tx.in_flight);
+                       chunk_appendf(&trash, "  [hndshk] rx.ackrng=%-6zu tx.inflight=%-6zu(%ld%%)\n",
+                                     pktns->rx.arngs.sz, pktns->tx.in_flight,
+                                     pktns->tx.in_flight * 100 / qc->path->cwnd);
                }
 
                pktns = qc->apktns;
                if (pktns) {
-                       chunk_appendf(&trash, "  [01rtt] rx.ackrng=%-6zu tx.inflight=%-6zu\n",
-                                     pktns->rx.arngs.sz, pktns->tx.in_flight);
+                       chunk_appendf(&trash, "  [01rtt] rx.ackrng=%-6zu tx.inflight=%-6zu(%ld%%)\n",
+                                     pktns->rx.arngs.sz, pktns->tx.in_flight,
+                                     pktns->tx.in_flight * 100 / qc->path->cwnd);
                }
        }