From 175717f5beab3ad9b6ce2984a98c07c90bb053fe Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Mon, 13 Apr 2026 09:15:37 +0200 Subject: [PATCH] MINOR: mux_quic: remove duplicate QMux local transport params When QMux was first implemented, values used for emitted transport parameters in xprt_qstrm and local flow control in mux_quic were initialized separately. This is error prone in particular if a value is change in one layer but not the other. This patch fixes this by using xprt_qstrm_lparams() in QMux init function. Mux flow control is then loaded with these values. Thus all values are now initialized in a single place which is xprt_qstrm_init(). --- src/mux_quic.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/mux_quic.c b/src/mux_quic.c index 0fe0c7c6f..ad2da8aab 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -3755,15 +3755,15 @@ static int qmux_init(struct connection *conn, struct proxy *prx, qcc->rfctl.msd_bidi_r = rparams->initial_max_stream_data_bidi_remote; qcc->rfctl.msd_uni_l = rparams->initial_max_stream_data_uni; - /* TODO */ - qcc->lfctl.ms_bidi = qcc->lfctl.ms_bidi_init = 16384; - qcc->lfctl.ms_uni = 3; - qcc->lfctl.msd_bidi_l = 16384; - qcc->lfctl.msd_bidi_r = 16384; - qcc->lfctl.msd_uni_r = 16384; + lparams = xprt_qstrm_lparams(conn->xprt_ctx); + qcc->lfctl.ms_bidi = qcc->lfctl.ms_bidi_init = lparams->initial_max_streams_bidi; + qcc->lfctl.ms_uni = lparams->initial_max_streams_uni; + qcc->lfctl.msd_bidi_l = lparams->initial_max_stream_data_bidi_local; + qcc->lfctl.msd_bidi_r = lparams->initial_max_stream_data_bidi_remote; + qcc->lfctl.msd_uni_r = lparams->initial_max_stream_data_uni; qcc->lfctl.cl_bidi_r = 0; - qcc->lfctl.md = qcc->lfctl.md_init = 16384; + qcc->lfctl.md = qcc->lfctl.md_init = lparams->initial_max_data; qcc->lfctl.offsets_recv = qcc->lfctl.offsets_consume = 0; }