From 3704e0e1746b3c8a4b9f104257c6c92741f0daa2 Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Thu, 21 Nov 2024 15:18:41 +0100 Subject: [PATCH] BUG/MINOR: mux-quic: fix show quic report of QCS prepared bytes On show quic, each MUX streams are listed with their various indicator for buffering on Rx and Tx. In particular, txoff displays in parenthesis the current level of data prepared by the upper stream instance not yet emitted by QUIC transport layer. This value is only accessible after a substract operation. However, there was a typo which caused the result to be always 0. Fix this by reusing the correct offsets in the calculation. This should be backported up to 3.0. --- src/mux_quic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mux_quic.c b/src/mux_quic.c index 1210ed286..03a7b2938 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -3619,7 +3619,7 @@ void qcc_show_quic(struct qcc *qcc) if (!quic_stream_is_uni(qcs->id) || !quic_stream_is_remote(qcc, qcs->id)) chunk_appendf(&trash, " txoff=%llu(%llu) msd=%llu", (ullong)qcs->tx.fc.off_real, - (ullong)qcs->tx.fc.off_soft - (ullong)qcs->tx.fc.off_soft, + (ullong)qcs->tx.fc.off_soft - (ullong)qcs->tx.fc.off_real, (ullong)qcs->tx.fc.limit); chunk_appendf(&trash, "\n"); node = eb64_next(node);