From: Amaury Denoyelle Date: Wed, 21 Aug 2024 13:30:17 +0000 (+0200) Subject: MINOR: mux-quic: add buf_in_flight to QCC debug infos X-Git-Tag: v3.1-dev7~55 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ecfedc25709562b6596b38fe9aa096a14930c00b;p=thirdparty%2Fhaproxy.git MINOR: mux-quic: add buf_in_flight to QCC debug infos Dump QCC field both in QUIC MUX traces and "show quic". This could help to detect if MUX does not allocate enough buffers compared to quic_conn current congestion window. --- diff --git a/src/mux_quic.c b/src/mux_quic.c index a89431b89d..c1855de076 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -3399,9 +3399,12 @@ static const struct mux_ops qmux_ops = { void qcc_show_quic(struct qcc *qcc) { + const struct quic_conn *qc = qcc->conn->handle.qc; struct eb64_node *node; - chunk_appendf(&trash, " qcc=0x%p flags=0x%x sc=%llu hreq=%llu\n", - qcc, qcc->flags, (ullong)qcc->nb_sc, (ullong)qcc->nb_hreq); + + chunk_appendf(&trash, " qcc=0x%p flags=0x%x sc=%llu hreq=%llu bwnd=%llu/%llu\n", + qcc, qcc->flags, (ullong)qcc->nb_sc, (ullong)qcc->nb_hreq, + (ullong)qcc->tx.buf_in_flight, (ullong)qc->path->cwnd); node = eb64_first(&qcc->streams_by_id); while (node) { diff --git a/src/qmux_trace.c b/src/qmux_trace.c index e31ff7dd8d..f75e702ccb 100644 --- a/src/qmux_trace.c +++ b/src/qmux_trace.c @@ -5,6 +5,7 @@ #include #include #include +#include #include /* trace source and events */ @@ -131,14 +132,16 @@ INITCALL1(STG_REGISTER, trace_register_source, TRACE_SOURCE); void qmux_dump_qcc_info(struct buffer *msg, const struct qcc *qcc) { + const struct quic_conn *qc = qcc->conn->handle.qc; + chunk_appendf(msg, " qcc=%p(F)", qcc); if (qcc->conn->handle.qc) chunk_appendf(msg, " qc=%p", qcc->conn->handle.qc); chunk_appendf(msg, " .sc=%llu .hreq=%llu .flg=0x%04x", (ullong)qcc->nb_sc, (ullong)qcc->nb_hreq, qcc->flags); - chunk_appendf(msg, " .tx=%llu %llu/%llu", (ullong)qcc->tx.fc.off_soft, - (ullong)qcc->tx.fc.off_real, - (ullong)qcc->tx.fc.limit); + chunk_appendf(msg, " .tx=%llu %llu/%llu bwnd=%llu/%llu", + (ullong)qcc->tx.fc.off_soft, (ullong)qcc->tx.fc.off_real, (ullong)qcc->tx.fc.limit, + (ullong)qcc->tx.buf_in_flight, (ullong)qc->path->cwnd); } void qmux_dump_qcs_info(struct buffer *msg, const struct qcs *qcs)