mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 06:11:32 +02:00
MINOR: mux-quic: complete traces for qcs emission
Add traces for _qc_send_qcs() function. Most notably, traces have been added each time a qc_stream_desc buffer allocation fails and when stream or connection flow-level is reached. This should improve debugging for emission issues. This must be backported up to 2.7.
This commit is contained in:
parent
178fbffda1
commit
1ec78ff421
@ -1416,13 +1416,17 @@ static int qcs_xfer_data(struct qcs *qcs, struct buffer *out, struct buffer *in)
|
|||||||
|
|
||||||
BUG_ON_HOT(qcs->tx.offset > qcs->tx.msd);
|
BUG_ON_HOT(qcs->tx.offset > qcs->tx.msd);
|
||||||
/* do not exceed flow control limit */
|
/* do not exceed flow control limit */
|
||||||
if (qcs->tx.offset + to_xfer > qcs->tx.msd)
|
if (qcs->tx.offset + to_xfer > qcs->tx.msd) {
|
||||||
|
TRACE_DATA("do not exceed stream flow control", QMUX_EV_QCS_SEND, qcc->conn, qcs);
|
||||||
to_xfer = qcs->tx.msd - qcs->tx.offset;
|
to_xfer = qcs->tx.msd - qcs->tx.offset;
|
||||||
|
}
|
||||||
|
|
||||||
BUG_ON_HOT(qcc->tx.offsets > qcc->rfctl.md);
|
BUG_ON_HOT(qcc->tx.offsets > qcc->rfctl.md);
|
||||||
/* do not overcome flow control limit on connection */
|
/* do not overcome flow control limit on connection */
|
||||||
if (qcc->tx.offsets + to_xfer > qcc->rfctl.md)
|
if (qcc->tx.offsets + to_xfer > qcc->rfctl.md) {
|
||||||
|
TRACE_DATA("do not exceed conn flow control", QMUX_EV_QCS_SEND, qcc->conn, qcs);
|
||||||
to_xfer = qcc->rfctl.md - qcc->tx.offsets;
|
to_xfer = qcc->rfctl.md - qcc->tx.offsets;
|
||||||
|
}
|
||||||
|
|
||||||
if (!left && !to_xfer)
|
if (!left && !to_xfer)
|
||||||
goto out;
|
goto out;
|
||||||
@ -1749,18 +1753,21 @@ static int _qc_send_qcs(struct qcs *qcs, struct list *frms)
|
|||||||
int xfer = 0;
|
int xfer = 0;
|
||||||
char fin = 0;
|
char fin = 0;
|
||||||
|
|
||||||
|
TRACE_ENTER(QMUX_EV_QCS_SEND, qcc->conn, qcs);
|
||||||
|
|
||||||
/* Cannot send STREAM on remote unidirectional streams. */
|
/* Cannot send STREAM on remote unidirectional streams. */
|
||||||
BUG_ON(quic_stream_is_uni(qcs->id) && quic_stream_is_remote(qcc, qcs->id));
|
BUG_ON(quic_stream_is_uni(qcs->id) && quic_stream_is_remote(qcc, qcs->id));
|
||||||
|
|
||||||
/* Allocate <out> buffer if necessary. */
|
/* Allocate <out> buffer if necessary. */
|
||||||
if (!out) {
|
if (!out) {
|
||||||
if (qcc->flags & QC_CF_CONN_FULL)
|
if (qcc->flags & QC_CF_CONN_FULL)
|
||||||
return 0;
|
goto out;
|
||||||
|
|
||||||
out = qc_stream_buf_alloc(qcs->stream, qcs->tx.offset);
|
out = qc_stream_buf_alloc(qcs->stream, qcs->tx.offset);
|
||||||
if (!out) {
|
if (!out) {
|
||||||
|
TRACE_STATE("cannot allocate stream desc buffer", QMUX_EV_QCS_SEND, qcc->conn, qcs);
|
||||||
qcc->flags |= QC_CF_CONN_FULL;
|
qcc->flags |= QC_CF_CONN_FULL;
|
||||||
return 0;
|
goto out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1791,6 +1798,8 @@ static int _qc_send_qcs(struct qcs *qcs, struct list *frms)
|
|||||||
if (ret < 0) { ABORT_NOW(); /* TODO handle this properly */ }
|
if (ret < 0) { ABORT_NOW(); /* TODO handle this properly */ }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
out:
|
||||||
|
TRACE_LEAVE(QMUX_EV_QCS_SEND, qcc->conn, qcs);
|
||||||
return xfer;
|
return xfer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user