]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mux-quic: add traces for flow-control limit reach
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 6 Jan 2023 14:29:59 +0000 (15:29 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 10 Jan 2023 16:45:41 +0000 (17:45 +0100)
Add new traces when QUIC flow-control limits are reached at stream or
connection level. This may help to explain an interrupted transfer.

This should be backported up to 2.6.

src/mux_quic.c

index 3af85203699eb4e42c0e920e67dc5293f7591981..120eeb1f1a9c73271b53d9aa45c09abb42645baa 100644 (file)
@@ -1446,15 +1446,19 @@ void qcc_streams_sent_done(struct qcs *qcs, uint64_t data, uint64_t offset)
                /* increase offset sum on connection */
                qcc->tx.sent_offsets += diff;
                BUG_ON_HOT(qcc->tx.sent_offsets > qcc->rfctl.md);
-               if (qcc->tx.sent_offsets == qcc->rfctl.md)
+               if (qcc->tx.sent_offsets == qcc->rfctl.md) {
                        qcc->flags |= QC_CF_BLK_MFCTL;
+                       TRACE_STATE("connection flow-control reached", QMUX_EV_QCS_SEND, qcc->conn);
+               }
 
                /* increase offset on stream */
                qcs->tx.sent_offset += diff;
                BUG_ON_HOT(qcs->tx.sent_offset > qcs->tx.msd);
                BUG_ON_HOT(qcs->tx.sent_offset > qcs->tx.offset);
-               if (qcs->tx.sent_offset == qcs->tx.msd)
+               if (qcs->tx.sent_offset == qcs->tx.msd) {
                        qcs->flags |= QC_SF_BLK_SFCTL;
+                       TRACE_STATE("stream flow-control reached", QMUX_EV_QCS_SEND, qcc->conn, qcs);
+               }
 
                if (qcs->tx.offset == qcs->tx.sent_offset &&
                    b_full(&qcs->stream->buf->buf)) {