From: Amaury Denoyelle Date: Wed, 7 May 2025 15:38:15 +0000 (+0200) Subject: MINOR: quic: display QCS info on "show quic stream" X-Git-Tag: v3.2-dev16~31 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dbf07c754e6458a03143082ebe4a12eab1b7d1dd;p=thirdparty%2Fhaproxy.git MINOR: quic: display QCS info on "show quic stream" Complete stream output for "show quic" by displaying information from its upper QCS. Note that QCS may be NULL if already released, so a default output is also provided. --- diff --git a/src/quic_cli.c b/src/quic_cli.c index 6e60eed8e..4ba089a2f 100644 --- a/src/quic_cli.c +++ b/src/quic_cli.c @@ -231,12 +231,14 @@ static void dump_quic_stream(struct show_quic_ctx *ctx, struct quic_conn *qc) { struct eb64_node *node; struct qc_stream_desc *sd; + struct qcs *qcs; uint64_t id; node = eb64_first(&qc->streams_by_id); while (node) { sd = eb_entry(node, struct qc_stream_desc, by_id); id = sd->by_id.key; + qcs = !(sd->flags & QC_SD_FL_RELEASE) ? sd->ctx : NULL; if (quic_stream_is_uni(id)) { node = eb64_next(node); @@ -244,7 +246,18 @@ static void dump_quic_stream(struct show_quic_ctx *ctx, struct quic_conn *qc) } chunk_appendf(&trash, "%p.%04llu: 0x%02x", qc, (ullong)id, sd->flags); - bdata_ctr_print(&trash, &sd->data, " txb="); + + bdata_ctr_print(&trash, &sd->data, "tx=["); + if (qcs) { + chunk_appendf(&trash, ",%llu]", (ullong)qcs->tx.fc.off_real); + chunk_appendf(&trash, " rxb=%d(%d)/%llu", qcs->rx.data.bcnt, qcs->rx.data.bmax, (ullong)qcs->rx.offset); + chunk_appendf(&trash, " qcs[0x%08x,sd=%p]", qcs->flags, qcs->sd); + } + else { + chunk_appendf(&trash, "/-"); + chunk_appendf(&trash, " rxb=-/-"); + chunk_appendf(&trash, " -- released --"); + } chunk_appendf(&trash, "\n"); node = eb64_next(node);