]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mux_quic: use qcm prefix for mux functions
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 11 May 2026 07:55:36 +0000 (09:55 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 13 May 2026 14:15:47 +0000 (16:15 +0200)
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.

include/haproxy/mux_quic.h
src/h3.c
src/mux_quic.c
src/quic_tp.c
src/xprt_qstrm.c

index 00f245c617ab0436a98402414f142ee8003b7d8b..5293c204b165dc37788ea7c5b54233d3b3ab7bf9 100644 (file)
@@ -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;
 }
index b311e98b7d4ced37ee7cb9f48ebe0a7258c3367b..bd91d7ec9ac45427bfd324b09a1a2c85aa047140 100644 (file)
--- 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);
index 4d454f19d45b0c18c5a19638f6ae7a19e3aba341..690bdc4c2260b967ffd873890770aeb75dc1f422 100644 (file)
@@ -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 <data> length starting at <offset>.
  */
-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);
        }
index 5f75de30b330536e0785652e3395e2dfcc339261..1dc9df07a4820767f68e61e5e4a1e3d02e201e04 100644 (file)
@@ -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 */
index 829ddf393484e42335a6eab50817144aa6061930..bdcaf84593d20f934112d98407715cbed8c1e299 100644 (file)
@@ -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;