]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mux-quic: fix show quic report of QCS prepared bytes
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 21 Nov 2024 14:18:41 +0000 (15:18 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 25 Nov 2024 10:21:28 +0000 (11:21 +0100)
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

index 1210ed286682bab0b719e60b603f363d55a6f8ad..03a7b293820ec0739f07849e38ba09d91a8122f9 100644 (file)
@@ -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);