From: Amaury Denoyelle Date: Wed, 1 Feb 2023 16:05:10 +0000 (+0100) Subject: MINOR: quic: display infos about various encryption level on "show quic" X-Git-Tag: v2.8-dev4~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1b0fc437f3147a24f4289d43706dd39e221422b2;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/quic_conn.c b/src/quic_conn.c index 5e383979c9..94a7cfaff1 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);