#include <haproxy/quic_frame-t.h>
#include <haproxy/quic_pacing-t.h>
#include <haproxy/quic_stream-t.h>
+#include <haproxy/quic_utils-t.h>
#include <haproxy/stconn-t.h>
#include <haproxy/task-t.h>
#include <haproxy/time-t.h>
struct buffer app_buf; /* receive buffer used by stconn layer */
uint64_t msd; /* current max-stream-data limit to enforce */
uint64_t msd_base; /* max-stream-data previous to latest update */
+ struct bdata_ctr data; /* data utilization counter. Note that <tot> is now used for now as accounting may be difficult with ncbuf. */
} rx;
struct {
struct quic_fctl fc; /* stream flow control applied on sending */
eb64_delete(&rxbuf->off_node);
pool_free(pool_head_qc_stream_rxbuf, rxbuf);
+ bdata_ctr_bdec(&qcs->rx.data);
}
/* Free <qcs> instance. This function is reserved for internal usage : it must
qcs->rx.msd = qcc->lfctl.msd_uni_r;
}
qcs->rx.msd_base = 0;
+ bdata_ctr_init(&qcs->rx.data);
qcs->wait_event.tasklet = NULL;
qcs->wait_event.events = 0;
b_free(&b_next);
offer_buffers(NULL, 1);
pool_free(pool_head_qc_stream_rxbuf, rxbuf_next);
+ bdata_ctr_bdec(&qcs->rx.data);
}
ret = 0;
buf->off_node.key = aligned_off;
buf->off_end = aligned_off + qmux_stream_rx_bufsz();
eb64_insert(&qcs->rx.bufs, &buf->off_node);
+ bdata_ctr_binc(&qcs->rx.data);
}
ncbuf = &buf->ncb;
qcs, (ullong)qcs->id, qcs->flags,
qcs_st_to_str(qcs->st));
- if (!quic_stream_is_uni(qcs->id) || !quic_stream_is_local(qcc, qcs->id))
+ if (!quic_stream_is_uni(qcs->id) || !quic_stream_is_local(qcc, qcs->id)) {
+ chunk_appendf(&trash, " rxb=%u(%u)", qcs->rx.data.bcnt, qcs->rx.data.bmax);
chunk_appendf(&trash, " rxoff=%llu", (ullong)qcs->rx.offset);
+ }
if (!quic_stream_is_uni(qcs->id) || !quic_stream_is_remote(qcc, qcs->id)) {
if (qcs->stream)
chunk_appendf(msg, " qcs=%p .id=%llu .st=%s .flg=0x%04x", qcs, (ullong)qcs->id,
qcs_st_to_str(qcs->st), qcs->flags);
- chunk_appendf(msg, " .rx=%llu/%llu", (ullong)qcs->rx.offset_max, (ullong)qcs->rx.msd);
+ chunk_appendf(msg, " .rx=%llu/%llu rxb=%u(%u)",
+ (ullong)qcs->rx.offset_max, (ullong)qcs->rx.msd,
+ qcs->rx.data.bcnt, qcs->rx.data.bmax);
chunk_appendf(msg, " .tx=%llu %llu/%llu", (ullong)qcs->tx.fc.off_soft,
(ullong)qcs->tx.fc.off_real,
(ullong)qcs->tx.fc.limit);