Skip to content

Commit

Permalink
MINOR: mux-quic: add buf_in_flight to QCC debug infos
Browse files Browse the repository at this point in the history
Dump <buf_in_flight> QCC field both in QUIC MUX traces and "show quic".
This could help to detect if MUX does not allocate enough buffers
compared to quic_conn current congestion window.
  • Loading branch information
a-denoyelle committed Aug 22, 2024
1 parent 5c07d58 commit ecfedc2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
7 changes: 5 additions & 2 deletions src/mux_quic.c
Original file line number Diff line number Diff line change
Expand Up @@ -3399,9 +3399,12 @@ static const struct mux_ops qmux_ops = {

void qcc_show_quic(struct qcc *qcc)
{
const struct quic_conn *qc = qcc->conn->handle.qc;
struct eb64_node *node;
chunk_appendf(&trash, " qcc=0x%p flags=0x%x sc=%llu hreq=%llu\n",
qcc, qcc->flags, (ullong)qcc->nb_sc, (ullong)qcc->nb_hreq);

chunk_appendf(&trash, " qcc=0x%p flags=0x%x sc=%llu hreq=%llu bwnd=%llu/%llu\n",
qcc, qcc->flags, (ullong)qcc->nb_sc, (ullong)qcc->nb_hreq,
(ullong)qcc->tx.buf_in_flight, (ullong)qc->path->cwnd);

node = eb64_first(&qcc->streams_by_id);
while (node) {
Expand Down
9 changes: 6 additions & 3 deletions src/qmux_trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <haproxy/connection.h>
#include <haproxy/chunk.h>
#include <haproxy/mux_quic.h>
#include <haproxy/quic_conn-t.h>
#include <haproxy/quic_frame-t.h>

/* trace source and events */
Expand Down Expand Up @@ -131,14 +132,16 @@ INITCALL1(STG_REGISTER, trace_register_source, TRACE_SOURCE);

void qmux_dump_qcc_info(struct buffer *msg, const struct qcc *qcc)
{
const struct quic_conn *qc = qcc->conn->handle.qc;

chunk_appendf(msg, " qcc=%p(F)", qcc);
if (qcc->conn->handle.qc)
chunk_appendf(msg, " qc=%p", qcc->conn->handle.qc);
chunk_appendf(msg, " .sc=%llu .hreq=%llu .flg=0x%04x", (ullong)qcc->nb_sc, (ullong)qcc->nb_hreq, qcc->flags);

chunk_appendf(msg, " .tx=%llu %llu/%llu", (ullong)qcc->tx.fc.off_soft,
(ullong)qcc->tx.fc.off_real,
(ullong)qcc->tx.fc.limit);
chunk_appendf(msg, " .tx=%llu %llu/%llu bwnd=%llu/%llu",
(ullong)qcc->tx.fc.off_soft, (ullong)qcc->tx.fc.off_real, (ullong)qcc->tx.fc.limit,
(ullong)qcc->tx.buf_in_flight, (ullong)qc->path->cwnd);
}

void qmux_dump_qcs_info(struct buffer *msg, const struct qcs *qcs)
Expand Down

0 comments on commit ecfedc2

Please sign in to comment.