mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 06:11:32 +02:00
MINOR: quic: define global tune max-burst setting
This commit is contained in:
parent
a591deb23f
commit
879dd9f985
@ -201,6 +201,7 @@ struct global {
|
|||||||
unsigned int quic_frontend_max_idle_timeout;
|
unsigned int quic_frontend_max_idle_timeout;
|
||||||
unsigned int quic_frontend_glitches_threshold;
|
unsigned int quic_frontend_glitches_threshold;
|
||||||
unsigned int quic_frontend_max_streams_bidi;
|
unsigned int quic_frontend_max_streams_bidi;
|
||||||
|
unsigned int quic_frontend_max_tx_burst;
|
||||||
size_t quic_frontend_max_window_size;
|
size_t quic_frontend_max_window_size;
|
||||||
unsigned int quic_retry_threshold;
|
unsigned int quic_retry_threshold;
|
||||||
unsigned int quic_reorder_ratio;
|
unsigned int quic_reorder_ratio;
|
||||||
|
@ -273,6 +273,14 @@ static int cfg_parse_quic_tune_setting(char **args, int section_type,
|
|||||||
global.tune.quic_frontend_glitches_threshold = arg;
|
global.tune.quic_frontend_glitches_threshold = arg;
|
||||||
else if (strcmp(suffix, "frontend.max-streams-bidi") == 0)
|
else if (strcmp(suffix, "frontend.max-streams-bidi") == 0)
|
||||||
global.tune.quic_frontend_max_streams_bidi = arg;
|
global.tune.quic_frontend_max_streams_bidi = arg;
|
||||||
|
else if (strcmp(suffix, "frontend.max-tx-burst") == 0) {
|
||||||
|
if (arg > 1000) {
|
||||||
|
memprintf(err, "'%s' cannot be bigger than 1s.", args[0]);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
global.tune.quic_frontend_max_tx_burst = arg;
|
||||||
|
}
|
||||||
else if (strcmp(suffix, "frontend.max-window-size") == 0) {
|
else if (strcmp(suffix, "frontend.max-window-size") == 0) {
|
||||||
unsigned long cwnd;
|
unsigned long cwnd;
|
||||||
char *end_opt;
|
char *end_opt;
|
||||||
@ -377,6 +385,7 @@ static struct cfg_kw_list cfg_kws = {ILH, {
|
|||||||
{ CFG_GLOBAL, "tune.quic.frontend.glitches-threshold", cfg_parse_quic_tune_setting },
|
{ 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-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-idle-timeout", cfg_parse_quic_time },
|
||||||
|
{ CFG_GLOBAL, "tune.quic.frontend.max-tx-burst", cfg_parse_quic_tune_setting },
|
||||||
{ CFG_GLOBAL, "tune.quic.frontend.max-window-size", cfg_parse_quic_tune_setting },
|
{ CFG_GLOBAL, "tune.quic.frontend.max-window-size", cfg_parse_quic_tune_setting },
|
||||||
{ CFG_GLOBAL, "tune.quic.max-frame-loss", cfg_parse_quic_tune_setting },
|
{ 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.reorder-ratio", cfg_parse_quic_tune_setting },
|
||||||
|
@ -204,6 +204,7 @@ struct global global = {
|
|||||||
.quic_backend_max_idle_timeout = QUIC_TP_DFLT_BACK_MAX_IDLE_TIMEOUT,
|
.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_idle_timeout = QUIC_TP_DFLT_FRONT_MAX_IDLE_TIMEOUT,
|
||||||
.quic_frontend_max_streams_bidi = QUIC_TP_DFLT_FRONT_MAX_STREAMS_BIDI,
|
.quic_frontend_max_streams_bidi = QUIC_TP_DFLT_FRONT_MAX_STREAMS_BIDI,
|
||||||
|
.quic_frontend_max_tx_burst = 0,
|
||||||
.quic_frontend_max_window_size = QUIC_DFLT_MAX_WINDOW_SIZE,
|
.quic_frontend_max_window_size = QUIC_DFLT_MAX_WINDOW_SIZE,
|
||||||
.quic_reorder_ratio = QUIC_DFLT_REORDER_RATIO,
|
.quic_reorder_ratio = QUIC_DFLT_REORDER_RATIO,
|
||||||
.quic_retry_threshold = QUIC_DFLT_RETRY_THRESHOLD,
|
.quic_retry_threshold = QUIC_DFLT_RETRY_THRESHOLD,
|
||||||
|
@ -494,8 +494,10 @@ enum quic_tx_err qc_send_mux(struct quic_conn *qc, struct list *frms,
|
|||||||
qc_send(qc, 0, &send_list, 0);
|
qc_send(qc, 0, &send_list, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pacer)
|
if (pacer) {
|
||||||
max_dgram = 1;
|
const ullong ns_pkts = quic_pacing_ns_pkt(pacer);
|
||||||
|
max_dgram = global.tune.quic_frontend_max_tx_burst * 1000000 / (ns_pkts + 1) + 1;
|
||||||
|
}
|
||||||
|
|
||||||
TRACE_STATE("preparing data (from MUX)", QUIC_EV_CONN_TXPKT, qc);
|
TRACE_STATE("preparing data (from MUX)", QUIC_EV_CONN_TXPKT, qc);
|
||||||
qel_register_send(&send_list, qc->ael, frms);
|
qel_register_send(&send_list, qc->ael, frms);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user