mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-20 12:40:46 +00:00
MINOR: quic: add config for retransmit limit
Define a new configuration option "tune.quic.max-frame-loss". This is used to specify the limit for which a single frame instance can be detected as lost. If exceeded, the connection is closed. This should be backported up to 2.7.
This commit is contained in:
parent
e4abb1f2da
commit
24d5b72ca9
@ -1149,6 +1149,7 @@ The following keywords are supported in the "global" section :
|
||||
- tune.quic.frontend.conn-tx-buffers.limit
|
||||
- tune.quic.frontend.max-idle-timeout
|
||||
- tune.quic.frontend.max-streams-bidi
|
||||
- tune.quic.max-frame-loss
|
||||
- tune.quic.retry-threshold
|
||||
- tune.quic.socket-owner
|
||||
- tune.rcvbuf.client
|
||||
@ -3110,6 +3111,15 @@ tune.quic.frontend.max-streams-bidi <number>
|
||||
|
||||
The default value is 100.
|
||||
|
||||
tune.quic.max-frame-loss <number>
|
||||
Warning: QUIC support in HAProxy is currently experimental. Configuration may
|
||||
change without deprecation in the future.
|
||||
|
||||
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.
|
||||
|
||||
The default value is 10.
|
||||
|
||||
tune.quic.retry-threshold <number>
|
||||
Warning: QUIC support in HAProxy is currently experimental. Configuration may
|
||||
change without deprecation in the future.
|
||||
|
@ -170,6 +170,7 @@ struct global {
|
||||
unsigned int quic_frontend_max_streams_bidi;
|
||||
unsigned int quic_retry_threshold;
|
||||
unsigned int quic_streams_buf;
|
||||
unsigned int quic_max_frame_loss;
|
||||
#endif /* USE_QUIC */
|
||||
} tune;
|
||||
struct {
|
||||
|
@ -144,6 +144,8 @@ static int cfg_parse_quic_tune_setting(char **args, int section_type,
|
||||
global.tune.quic_streams_buf = arg;
|
||||
else if (strcmp(suffix, "frontend.max-streams-bidi") == 0)
|
||||
global.tune.quic_frontend_max_streams_bidi = arg;
|
||||
else if (strcmp(suffix, "max-frame-loss") == 0)
|
||||
global.tune.quic_max_frame_loss = arg;
|
||||
else if (strcmp(suffix, "retry-threshold") == 0)
|
||||
global.tune.quic_retry_threshold = arg;
|
||||
else {
|
||||
@ -160,6 +162,7 @@ static struct cfg_kw_list cfg_kws = {ILH, {
|
||||
{ CFG_GLOBAL, "tune.quic.frontend.conn-tx-buffers.limit", 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.max-frame-loss", cfg_parse_quic_tune_setting },
|
||||
{ CFG_GLOBAL, "tune.quic.retry-threshold", cfg_parse_quic_tune_setting },
|
||||
{ 0, NULL, NULL }
|
||||
}};
|
||||
|
@ -210,6 +210,7 @@ struct global global = {
|
||||
.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_retry_threshold = QUIC_DFLT_RETRY_THRESHOLD,
|
||||
.quic_max_frame_loss = QUIC_DFLT_MAX_FRAME_LOSS,
|
||||
.quic_streams_buf = 30,
|
||||
#endif /* USE_QUIC */
|
||||
},
|
||||
|
@ -1832,7 +1832,7 @@ static inline int qc_requeue_nacked_pkt_tx_frms(struct quic_conn *qc,
|
||||
qc_frm_free(&frm);
|
||||
}
|
||||
else {
|
||||
if (++frm->loss_count >= QUIC_DFLT_MAX_FRAME_LOSS) {
|
||||
if (++frm->loss_count >= global.tune.quic_max_frame_loss) {
|
||||
TRACE_ERROR("retransmission limit reached, closing the connection", QUIC_EV_CONN_PRSAFRM, qc);
|
||||
quic_set_connection_close(qc, quic_err_transport(QC_ERR_INTERNAL_ERROR));
|
||||
close = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user