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().
This commit is contained in:
Amaury Denoyelle 2026-04-13 09:15:37 +02:00
parent 6e67b59aca
commit 175717f5be

View File

@ -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;
}