MINOR: quic: support pacing for newreno and nocc

Extend extra pacing support for newreno and nocc congestion algorithms,
as with cubic.

For better extensibility of cc algo definition, define a new flags field
in quic_cc_algo structure. For now, the only value is
QUIC_CC_ALGO_FL_OPT_PACING which is set if pacing support can be
optionally activated. Both cubic, newreno and nocc now supports this.

This new flag is then reused by QUIC config parser. If set, extra
quic-cc-algo burst parameter is taken into account. If positive, this
will activate pacing support on top of the congestion algorithm. As with
cubic previously, pacing is only supported if running under experimental
mode.

Only BBR is not flagged with this new value as pacing is directly
builtin in the algorithm and cannot be turn off. Furthermore, BBR
calculates automatically its value for maximum burst. As such, any
quic-cc-algo burst argument used with BBR is still ignored with a
warning.
This commit is contained in:
Amaury Denoyelle 2024-11-21 11:07:15 +01:00
parent 99497d23b5
commit 95d3edd68f
5 changed files with 9 additions and 1 deletions

View File

@ -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);

View File

@ -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);
}

View File

@ -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,

View File

@ -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,

View File

@ -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,