From 31d2057c59f8e8b7091c98a3516ad779ea571a8a Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Fri, 6 Jan 2023 15:29:59 +0100 Subject: [PATCH] MINOR: mux-quic: add traces for flow-control limit reach 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 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/mux_quic.c b/src/mux_quic.c index 3af852036..120eeb1f1 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -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)) {