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.
This commit is contained in:
Amaury Denoyelle 2023-02-01 17:05:10 +01:00
parent b89c0e243a
commit 1b0fc437f3

View File

@ -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);