diff --git a/include/haproxy/quic_cc-t.h b/include/haproxy/quic_cc-t.h index 173e0fb68..40ff88909 100644 --- a/include/haproxy/quic_cc-t.h +++ b/include/haproxy/quic_cc-t.h @@ -125,8 +125,13 @@ struct quic_cc_path { uint32_t recovery_start_ts; }; +/* pacing can be optionnaly activated on top of the algorithm */ +#define QUIC_CC_ALGO_FL_OPT_PACING 0x01 + struct quic_cc_algo { enum quic_cc_algo_type type; + int flags; /* QUIC_CC_ALGO_FL_* */ + int (*init)(struct quic_cc *cc); void (*event)(struct quic_cc *cc, struct quic_cc_event *ev); void (*slow_start)(struct quic_cc *cc); diff --git a/src/cfgparse-quic.c b/src/cfgparse-quic.c index 73e252e71..6c56be413 100644 --- a/src/cfgparse-quic.c +++ b/src/cfgparse-quic.c @@ -188,7 +188,7 @@ static int bind_parse_quic_cc_algo(char **args, int cur_arg, struct proxy *px, if (burst < 0) goto fail; - if (cc_algo->type != QUIC_CC_ALGO_TP_CUBIC) { + if (!(cc_algo->flags & QUIC_CC_ALGO_FL_OPT_PACING)) { ha_warning("'%s' : burst parameter ignored for '%s' congestion algorithm\n", args[cur_arg], algo); } diff --git a/src/quic_cc_cubic.c b/src/quic_cc_cubic.c index bc9410af9..a1768a151 100644 --- a/src/quic_cc_cubic.c +++ b/src/quic_cc_cubic.c @@ -674,6 +674,7 @@ static void quic_cc_cubic_state_cli(struct buffer *buf, const struct quic_cc_pat struct quic_cc_algo quic_cc_algo_cubic = { .type = QUIC_CC_ALGO_TP_CUBIC, + .flags = QUIC_CC_ALGO_FL_OPT_PACING, .init = quic_cc_cubic_init, .event = quic_cc_cubic_event, .slow_start = quic_cc_cubic_slow_start, diff --git a/src/quic_cc_newreno.c b/src/quic_cc_newreno.c index 4d035b551..ec63bc3e8 100644 --- a/src/quic_cc_newreno.c +++ b/src/quic_cc_newreno.c @@ -216,6 +216,7 @@ static void quic_cc_nr_event(struct quic_cc *cc, struct quic_cc_event *ev) struct quic_cc_algo quic_cc_algo_nr = { .type = QUIC_CC_ALGO_TP_NEWRENO, + .flags = QUIC_CC_ALGO_FL_OPT_PACING, .init = quic_cc_nr_init, .event = quic_cc_nr_event, .slow_start = quic_cc_nr_slow_start, diff --git a/src/quic_cc_nocc.c b/src/quic_cc_nocc.c index 6e5cff96b..b4088521b 100644 --- a/src/quic_cc_nocc.c +++ b/src/quic_cc_nocc.c @@ -68,6 +68,7 @@ static void quic_cc_nocc_event(struct quic_cc *cc, struct quic_cc_event *ev) struct quic_cc_algo quic_cc_algo_nocc = { .type = QUIC_CC_ALGO_TP_NOCC, + .flags = QUIC_CC_ALGO_FL_OPT_PACING, .init = quic_cc_nocc_init, .event = quic_cc_nocc_event, .slow_start = quic_cc_nocc_slow_start,