From: Amaury Denoyelle Date: Mon, 11 May 2026 07:55:36 +0000 (+0200) Subject: MINOR: mux_quic: use qcm prefix for mux functions X-Git-Tag: v3.4-dev12~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1a9ab14efc21f5b0c90a74742836004c735e1271;p=thirdparty%2Fhaproxy.git MINOR: mux_quic: use qcm prefix for mux functions This is a follow-up on the QUIC MUX renaming process. A previous patch already renames MUX ops callbacks. The current patch proceed to a similar operation for the rest of the MUX functions. --- diff --git a/include/haproxy/mux_quic.h b/include/haproxy/mux_quic.h index 00f245c61..5293c204b 100644 --- a/include/haproxy/mux_quic.h +++ b/include/haproxy/mux_quic.h @@ -53,7 +53,7 @@ int qcc_recv_max_streams(struct qcc *qcc, uint64_t max, int bidi); int qcc_recv_reset_stream(struct qcc *qcc, uint64_t id, uint64_t err, uint64_t final_size); int qcc_recv_stop_sending(struct qcc *qcc, uint64_t id, uint64_t err); -static inline int qmux_stream_rx_bufsz(void) +static inline int qcm_stream_rx_bufsz(void) { return global.tune.bufsize - NCB_RESERVED_SZ; } diff --git a/src/h3.c b/src/h3.c index b311e98b7..bd91d7ec9 100644 --- a/src/h3.c +++ b/src/h3.c @@ -1861,7 +1861,7 @@ static ssize_t h3_rcv_buf(struct qcs *qcs, struct buffer *b, int fin) * SETTINGS_MAX_FIELD_SECTION_SIZE parameter to prevent * excessive decompressed size. */ - if (flen > qmux_stream_rx_bufsz()) { + if (flen > qcm_stream_rx_bufsz()) { TRACE_ERROR("received a too big frame", H3_EV_RX_FRAME, qcs->qcc->conn, qcs); qcc_set_error(qcs->qcc, H3_ERR_EXCESSIVE_LOAD, 1, muxc_tevt_type_other_err); diff --git a/src/mux_quic.c b/src/mux_quic.c index 4d454f19d..690bdc4c2 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -41,8 +41,8 @@ DECLARE_TYPED_POOL(pool_head_qcc, "qcc", struct qcc); DECLARE_TYPED_POOL(pool_head_qcs, "qcs", struct qcs); DECLARE_STATIC_TYPED_POOL(pool_head_qc_stream_rxbuf, "qc_stream_rxbuf", struct qc_stream_rxbuf); -static void qmux_ctrl_send(struct qc_stream_desc *, uint64_t data, uint64_t offset); -static void qmux_ctrl_room(struct qc_stream_desc *, uint64_t room); +static void qcm_ctrl_send(struct qc_stream_desc *, uint64_t data, uint64_t offset); +static void qcm_ctrl_room(struct qc_stream_desc *, uint64_t room); static void qcc_release(struct qcc *qcc); static int qcc_app_init(struct qcc *qcc); @@ -220,8 +220,8 @@ static struct qcs *qcs_new(struct qcc *qcc, uint64_t id, enum qcs_type type) goto err; } - qc_stream_desc_sub_send(qcs->tx.stream, qmux_ctrl_send); - qc_stream_desc_sub_room(qcs->tx.stream, qmux_ctrl_room); + qc_stream_desc_sub_send(qcs->tx.stream, qcm_ctrl_send); + qc_stream_desc_sub_room(qcs->tx.stream, qcm_ctrl_room); } else { qcs->tx.qstrm_buf = BUF_NULL; @@ -642,7 +642,7 @@ uint64_t qcs_prep_bytes(const struct qcs *qcs) /* Used as a callback for qc_stream_desc layer to notify about emission of a * STREAM frame of length starting at . */ -static void qmux_ctrl_send(struct qc_stream_desc *stream, uint64_t data, uint64_t offset) +static void qcm_ctrl_send(struct qc_stream_desc *stream, uint64_t data, uint64_t offset) { struct qcs *qcs = stream->ctx; struct qcc *qcc = qcs->qcc; @@ -738,7 +738,7 @@ static inline int qcc_bufwnd_full(const struct qcc *qcc) return qcc->tx.buf_in_flight >= qc->path->cwnd; } -static void qmux_ctrl_room(struct qc_stream_desc *stream, uint64_t room) +static void qcm_ctrl_room(struct qc_stream_desc *stream, uint64_t room) { /* Context is different for active and released streams. */ struct qcc *qcc = !(stream->flags & QC_SD_FL_RELEASE) ? @@ -1348,15 +1348,15 @@ static void qcs_consume(struct qcs *qcs, uint64_t bytes, struct qc_stream_rxbuf * per QCS, the limit is set to half the capacity. Else, the limit is * set to match bufsize. */ - if (qcs->rx.msd - qcs->rx.msd_base < qmux_stream_rx_bufsz() * 2) { + if (qcs->rx.msd - qcs->rx.msd_base < qcm_stream_rx_bufsz() * 2) { if ((qcs->rx.offset - qcs->rx.msd_base) * 2 >= qcs->rx.msd - qcs->rx.msd_base) inc = qcs->rx.offset - qcs->rx.msd_base; } else { diff = qcs->rx.offset - qcs->rx.msd_base; - while (diff >= qmux_stream_rx_bufsz()) { - inc += qmux_stream_rx_bufsz(); - diff -= qmux_stream_rx_bufsz(); + while (diff >= qcm_stream_rx_bufsz()) { + inc += qcm_stream_rx_bufsz(); + diff -= qcm_stream_rx_bufsz(); } } @@ -1879,7 +1879,7 @@ static struct qc_stream_rxbuf *qcs_get_rxbuf(struct qcs *qcs, uint64_t offset, buf = container_of(node, struct qc_stream_rxbuf, off_node); if (!node || offset >= buf->off_end) { - const uint64_t aligned_off = offset - (offset % qmux_stream_rx_bufsz()); + const uint64_t aligned_off = offset - (offset % qcm_stream_rx_bufsz()); TRACE_DEVEL("allocating a new entry", QMUX_EV_QCS_RECV, qcs->qcc->conn, qcs); buf = pool_alloc(pool_head_qc_stream_rxbuf); @@ -1890,7 +1890,7 @@ static struct qc_stream_rxbuf *qcs_get_rxbuf(struct qcs *qcs, uint64_t offset, buf->ncb = NCBUF_NULL; buf->off_node.key = aligned_off; - buf->off_end = aligned_off + qmux_stream_rx_bufsz(); + buf->off_end = aligned_off + qcm_stream_rx_bufsz(); eb64_insert(&qcs->rx.bufs, &buf->off_node); bdata_ctr_binc(&qcs->rx.data); } diff --git a/src/quic_tp.c b/src/quic_tp.c index 5f75de30b..1dc9df07a 100644 --- a/src/quic_tp.c +++ b/src/quic_tp.c @@ -48,7 +48,7 @@ static void quic_dflt_transport_params_cpy(struct quic_transport_params *dst) */ void quic_transport_params_init(struct quic_transport_params *p, int server) { - const uint64_t stream_rx_bufsz = qmux_stream_rx_bufsz(); + const uint64_t stream_rx_bufsz = qcm_stream_rx_bufsz(); const uint stream_rxbuf = server ? quic_tune.fe.stream_rxbuf : quic_tune.be.stream_rxbuf; /* On FE side, check if stream.max-total is set and inferior to stream.max-concurrent */ diff --git a/src/xprt_qstrm.c b/src/xprt_qstrm.c index 829ddf393..bdcaf8459 100644 --- a/src/xprt_qstrm.c +++ b/src/xprt_qstrm.c @@ -296,9 +296,9 @@ static int xprt_qstrm_init(struct connection *conn, void **xprt_ctx) ctx->lparams.initial_max_data = 1638400; ctx->lparams.initial_max_streams_bidi = 100; ctx->lparams.initial_max_streams_uni = 3; - ctx->lparams.initial_max_stream_data_bidi_local = qmux_stream_rx_bufsz(); - ctx->lparams.initial_max_stream_data_bidi_remote = qmux_stream_rx_bufsz(); - ctx->lparams.initial_max_stream_data_uni = qmux_stream_rx_bufsz(); + ctx->lparams.initial_max_stream_data_bidi_local = qcm_stream_rx_bufsz(); + ctx->lparams.initial_max_stream_data_bidi_remote = qcm_stream_rx_bufsz(); + ctx->lparams.initial_max_stream_data_uni = qcm_stream_rx_bufsz(); *xprt_ctx = ctx;