Skip to content

Commit 95d3edd

Browse files
committed
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.
1 parent 99497d2 commit 95d3edd

File tree

5 files changed

+9
-1
lines changed

5 files changed

+9
-1
lines changed

include/haproxy/quic_cc-t.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,13 @@ struct quic_cc_path {
125125
uint32_t recovery_start_ts;
126126
};
127127

128+
/* pacing can be optionnaly activated on top of the algorithm */
129+
#define QUIC_CC_ALGO_FL_OPT_PACING 0x01
130+
128131
struct quic_cc_algo {
129132
enum quic_cc_algo_type type;
133+
int flags; /* QUIC_CC_ALGO_FL_* */
134+
130135
int (*init)(struct quic_cc *cc);
131136
void (*event)(struct quic_cc *cc, struct quic_cc_event *ev);
132137
void (*slow_start)(struct quic_cc *cc);

src/cfgparse-quic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ static int bind_parse_quic_cc_algo(char **args, int cur_arg, struct proxy *px,
188188
if (burst < 0)
189189
goto fail;
190190

191-
if (cc_algo->type != QUIC_CC_ALGO_TP_CUBIC) {
191+
if (!(cc_algo->flags & QUIC_CC_ALGO_FL_OPT_PACING)) {
192192
ha_warning("'%s' : burst parameter ignored for '%s' congestion algorithm\n",
193193
args[cur_arg], algo);
194194
}

src/quic_cc_cubic.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,7 @@ static void quic_cc_cubic_state_cli(struct buffer *buf, const struct quic_cc_pat
674674

675675
struct quic_cc_algo quic_cc_algo_cubic = {
676676
.type = QUIC_CC_ALGO_TP_CUBIC,
677+
.flags = QUIC_CC_ALGO_FL_OPT_PACING,
677678
.init = quic_cc_cubic_init,
678679
.event = quic_cc_cubic_event,
679680
.slow_start = quic_cc_cubic_slow_start,

src/quic_cc_newreno.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ static void quic_cc_nr_event(struct quic_cc *cc, struct quic_cc_event *ev)
216216

217217
struct quic_cc_algo quic_cc_algo_nr = {
218218
.type = QUIC_CC_ALGO_TP_NEWRENO,
219+
.flags = QUIC_CC_ALGO_FL_OPT_PACING,
219220
.init = quic_cc_nr_init,
220221
.event = quic_cc_nr_event,
221222
.slow_start = quic_cc_nr_slow_start,

src/quic_cc_nocc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ static void quic_cc_nocc_event(struct quic_cc *cc, struct quic_cc_event *ev)
6868

6969
struct quic_cc_algo quic_cc_algo_nocc = {
7070
.type = QUIC_CC_ALGO_TP_NOCC,
71+
.flags = QUIC_CC_ALGO_FL_OPT_PACING,
7172
.init = quic_cc_nocc_init,
7273
.event = quic_cc_nocc_event,
7374
.slow_start = quic_cc_nocc_slow_start,

0 commit comments

Comments
 (0)