- tune.quic.frontend.glitches-threshold
- tune.quic.frontend.max-idle-timeout
- tune.quic.frontend.max-streams-bidi
+ - tune.quic.frontend.max-window-size
- tune.quic.max-frame-loss
- tune.quic.reorder-ratio
- tune.quic.retry-threshold
The default value is 100.
+tune.quic.frontend.max-window-size <size>
+ Sets the default maximum window size for the congestion controller of a
+ single QUIC connection. The value must be written as an integer with an
+ optional suffix 'k', 'm' or 'g'. It must be between 10k and 4g. Alternatively,
+ the special value 0 can be used to automatically derive the value from
+ "quic.frontend.conn-tx-buffers.limit".
+
+ The default value is 0.
+
+ See also the "quic-cc-algo" bind option.
+
tune.quic.max-frame-loss <number>
Sets the limit for which a single QUIC frame can be marked as lost. If
exceeded, the connection is considered as failing and is closed immediately.
h2" on the bind line.
quic-cc-algo { cubic | newreno | nocc }
-quic-cc-algo { cubic | newreno | nocc }(max_window)
+quic-cc-algo { cubic | newreno | nocc }(<max_window>)
This is a QUIC specific setting to select the congestion control algorithm
for any connection attempts to the configured QUIC listeners. They are similar
to those used by TCP. An optional value in bytes may be used to specify the
maximum window size. It must be greater than 10k and smaller than 4g.
Default value: cubic
- Default window value: tune.quic.frontend.conn-tx-buffers.limit * tune.bufsize
+ Default window value: "tune.quic.frontend.max-window-size"
Example:
# newreno congestion control algorithm
unsigned int quic_frontend_max_idle_timeout;
unsigned int quic_frontend_glitches_threshold;
unsigned int quic_frontend_max_streams_bidi;
+ size_t quic_frontend_max_window_size;
unsigned int quic_retry_threshold;
unsigned int quic_reorder_ratio;
unsigned int quic_streams_buf;
#define QUIC_DFLT_REORDER_RATIO 50 /* in percent */
/* Default limit of loss detection on a single frame. If exceeded, connection is closed. */
#define QUIC_DFLT_MAX_FRAME_LOSS 10
+/* Default congestion window size. 0 has a special value based on global.tune.quic_streams_buf */
+#define QUIC_DFLT_MAX_WINDOW_SIZE 0
/*
* 0 1 2 3
return 0;
}
+/* Parse any tune.quic.* setting accepting any integer values.
+ * Return -1 on alert, or 0 if succeeded.
+ */
+static int cfg_parse_quic_tune_setting1(char **args, int section_type,
+ struct proxy *curpx,
+ const struct proxy *defpx,
+ const char *file, int line, char **err)
+{
+ int prefix_len = strlen("tune.quic.");
+ const char *suffix;
+
+ if (too_many_args(1, args, err, NULL))
+ return -1;
+
+ suffix = args[0] + prefix_len;
+ if (strcmp(suffix, "frontend.max-window-size") == 0) {
+ unsigned long cwnd;
+ char *end_opt;
+
+ if (strcmp(args[1], "0") == 0) {
+ /* 0 is a special value to set the limit based on quic_streams_buf */
+ cwnd = 0;
+ }
+ else {
+ cwnd = parse_window_size(args[0], args[1], &end_opt, err);
+ if (!cwnd)
+ return -1;
+ if (*end_opt != '\0') {
+ memprintf(err, "'%s' : expects an integer value with an optional suffix 'k', 'm' or 'g'", args[0]);
+ return -1;
+ }
+ }
+ global.tune.quic_frontend_max_window_size = cwnd;
+ }
+ else {
+ memprintf(err, "'%s' keyword not unhandled (please report this bug).", args[0]);
+ return -1;
+ }
+
+ return 0;
+}
+
static int cfg_parse_quic_tune_setting0(char **args, int section_type,
struct proxy *curpx,
const struct proxy *defpx,
{ CFG_GLOBAL, "tune.quic.frontend.glitches-threshold", cfg_parse_quic_tune_setting },
{ CFG_GLOBAL, "tune.quic.frontend.max-streams-bidi", cfg_parse_quic_tune_setting },
{ CFG_GLOBAL, "tune.quic.frontend.max-idle-timeout", cfg_parse_quic_time },
+ { CFG_GLOBAL, "tune.quic.frontend.max-window-size", cfg_parse_quic_tune_setting1 },
{ CFG_GLOBAL, "tune.quic.max-frame-loss", cfg_parse_quic_tune_setting },
{ CFG_GLOBAL, "tune.quic.reorder-ratio", cfg_parse_quic_tune_setting },
{ CFG_GLOBAL, "tune.quic.retry-threshold", cfg_parse_quic_tune_setting },
.quic_backend_max_idle_timeout = QUIC_TP_DFLT_BACK_MAX_IDLE_TIMEOUT,
.quic_frontend_max_idle_timeout = QUIC_TP_DFLT_FRONT_MAX_IDLE_TIMEOUT,
.quic_frontend_max_streams_bidi = QUIC_TP_DFLT_FRONT_MAX_STREAMS_BIDI,
+ .quic_frontend_max_window_size = QUIC_DFLT_MAX_WINDOW_SIZE,
.quic_reorder_ratio = QUIC_DFLT_REORDER_RATIO,
.quic_retry_threshold = QUIC_DFLT_RETRY_THRESHOLD,
.quic_max_frame_loss = QUIC_DFLT_MAX_FRAME_LOSS,
/* Use connection socket for QUIC by default. */
bind_conf->quic_mode = QUIC_SOCK_MODE_CONN;
bind_conf->max_cwnd =
- global.tune.bufsize * global.tune.quic_streams_buf;
+ global.tune.quic_frontend_max_window_size ?
+ global.tune.quic_frontend_max_window_size :
+ global.tune.bufsize * global.tune.quic_streams_buf;
#endif
LIST_INIT(&bind_conf->listeners);