From 1b0fc437f3147a24f4289d43706dd39e221422b2 Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Wed, 1 Feb 2023 17:05:10 +0100 Subject: [PATCH] MINOR: quic: display infos about various encryption level on "show quic" Complete "show quic" handler by displaying various information related to each encryption level and packet number space. Most notably, ack ranges and bytes in flight are present to help debug retransmission issues. This should be backported up to 2.7. --- src/quic_conn.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/quic_conn.c b/src/quic_conn.c index 5e383979c..94a7cfaff 100644 --- a/src/quic_conn.c +++ b/src/quic_conn.c @@ -7646,6 +7646,7 @@ static int cli_io_handler_dump_quic(struct appctx *appctx) struct show_quic_ctx *ctx = appctx->svcctx; struct stconn *sc = appctx_sc(appctx); struct quic_conn *qc; + struct quic_enc_level *qel; char bufaddr[INET6_ADDRSTRLEN], bufport[6]; int expire; unsigned char cid_len; @@ -7748,6 +7749,22 @@ static int cli_io_handler_dump_quic(struct appctx *appctx) chunk_appendf(&trash, "\n"); + /* Encryption levels */ + qel = &qc->els[QUIC_TLS_ENC_LEVEL_INITIAL]; + chunk_appendf(&trash, " [initl] rx.ackrng=%-6zu tx.inflight=%-6zu", + qel->pktns->rx.arngs.sz, qel->pktns->tx.in_flight); + qel = &qc->els[QUIC_TLS_ENC_LEVEL_HANDSHAKE]; + chunk_appendf(&trash, " [hndshk] rx.ackrng=%-6zu tx.inflight=%-6zu\n", + qel->pktns->rx.arngs.sz, qel->pktns->tx.in_flight); + qel = &qc->els[QUIC_TLS_ENC_LEVEL_EARLY_DATA]; + chunk_appendf(&trash, " [0-rtt] rx.ackrng=%-6zu tx.inflight=%-6zu", + qel->pktns->rx.arngs.sz, qel->pktns->tx.in_flight); + qel = &qc->els[QUIC_TLS_ENC_LEVEL_APP]; + chunk_appendf(&trash, " [1-rtt] rx.ackrng=%-6zu tx.inflight=%-6zu", + qel->pktns->rx.arngs.sz, qel->pktns->tx.in_flight); + + chunk_appendf(&trash, "\n"); + if (applet_putchk(appctx, &trash) == -1) { /* Register show_quic_ctx to quic_conn instance. */ LIST_APPEND(&qc->back_refs, &ctx->bref.users);