QMux frontends always advertise 100 bidirectional streams, ignoring
"tune.quic.fe.stream.max-concurrent" and "tune.quic.fe.stream.max-total"
which QUIC applies in quic_transport_params_init(). The MUX however
relies on the client never being allowed to open more than
stream.max-total streams: with a value below 100, releasing the first
remote stream hits BUG_ON(qcc->lfctl.ms_bidi > max) in
qcc_release_remote_stream(), so the process dies on the first completed
request on a "proto qmux" frontend.
Let's compute the frontend limit as QUIC does. The h3_clr QMux reg-test
now sets stream.max-total to cover this.
This was introduced in 3.4 by commit
497cabd9e ("MEDIUM: quic: implement
fe.stream.max-total"), which did not apply to the QMux transport
parameters. It must be backported to 3.4.
thread-groups 1
.endif
expose-experimental-directives
thread-groups 1
.endif
expose-experimental-directives
+ # below the default streams limit
+ tune.quic.fe.stream.max-total 10
#include <haproxy/qcm_qmux.h>
#include <haproxy/quic_frame.h>
#include <haproxy/quic_tp-t.h>
#include <haproxy/qcm_qmux.h>
#include <haproxy/quic_frame.h>
#include <haproxy/quic_tp-t.h>
+#include <haproxy/quic_tune.h>
/* Default protocol when not running over SSL layer. */
#define XPRT_QMUX_DEFAULT_ALPN "h3"
/* Default protocol when not running over SSL layer. */
#define XPRT_QMUX_DEFAULT_ALPN "h3"
/* TP configuration advertised by us */
ctx->lparams.max_idle_timeout = 30;
ctx->lparams.initial_max_data = 1638400;
/* TP configuration advertised by us */
ctx->lparams.max_idle_timeout = 30;
ctx->lparams.initial_max_data = 1638400;
- ctx->lparams.initial_max_streams_bidi = 100;
+ /* FE limit computed as in quic_transport_params_init() */
+ ctx->lparams.initial_max_streams_bidi = conn_is_back(conn) ? 100 :
+ quic_tune.fe.stream_max_total ?
+ MIN(quic_tune.fe.stream_max_concurrent, quic_tune.fe.stream_max_total) :
+ quic_tune.fe.stream_max_concurrent;
ctx->lparams.initial_max_streams_uni = 3;
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_streams_uni = 3;
ctx->lparams.initial_max_stream_data_bidi_local = qcm_stream_rx_bufsz();
ctx->lparams.initial_max_stream_data_bidi_remote = qcm_stream_rx_bufsz();