MINOR: quic: add traces

Add some traces to better follow QUIC MUX scheduling, in particular with
pacing interaction.

This should be backported up to 3.1.
This commit is contained in:
Amaury Denoyelle 2024-11-28 11:27:56 +01:00
parent 17bfe93768
commit 9dcd2369e2
2 changed files with 8 additions and 1 deletions

View File

@ -2806,6 +2806,8 @@ static void qcc_purge_sending(struct qcc *qcc)
enum quic_tx_err ret = QUIC_TX_ERR_PACING;
int sent = 0;
TRACE_ENTER(QMUX_EV_QCC_WAKE, qcc->conn);
/* This function is reserved for pacing usage. */
BUG_ON(!qcc_is_pacing_active(qcc->conn));
@ -2835,6 +2837,8 @@ static void qcc_purge_sending(struct qcc *qcc)
HA_ATOMIC_AND(&qcc->wait_event.tasklet->state, ~TASK_F_USR1);
}
}
TRACE_LEAVE(QMUX_EV_QCC_WAKE, qcc->conn);
}
struct task *qcc_io_cb(struct task *t, void *ctx, unsigned int status)
@ -2845,7 +2849,7 @@ struct task *qcc_io_cb(struct task *t, void *ctx, unsigned int status)
if (status & TASK_F_USR1) {
qcc_purge_sending(qcc);
return NULL;
goto end;
}
if (!(qcc->wait_event.events & SUB_RETRY_SEND))

View File

@ -864,6 +864,7 @@ struct task *quic_conn_io_cb(struct task *t, void *context, unsigned int state)
/* Wake up connection layer if on wait-for-handshake. */
if (qc->subs && qc->subs->events & SUB_RETRY_RECV) {
TRACE_STATE("notify upper layer (recv)", QUIC_EV_CONN_IO_CB, qc);
tasklet_wakeup(qc->subs->tasklet);
qc->subs->events &= ~SUB_RETRY_RECV;
if (!qc->subs->events)
@ -1768,6 +1769,8 @@ int qc_notify_send(struct quic_conn *qc)
{
const struct quic_pktns *pktns = qc->apktns;
TRACE_STATE("notify upper layer (send)", QUIC_EV_CONN_IO_CB, qc);
/* Wake up MUX for new emission unless there is no congestion room or
* connection FD is not ready.
*/