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 5e38397..94a7cfa 100644
--- a/src/quic_conn.c
+++ b/src/quic_conn.c
@@ -7646,6 +7646,7 @@
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 @@
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);