Skip to content

Commit 465f201

Browse files
committed
TMP: support burst on pacing
1 parent 3d1fbf6 commit 465f201

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

include/haproxy/global-t.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ struct global {
203203
unsigned int quic_frontend_max_idle_timeout;
204204
unsigned int quic_frontend_glitches_threshold;
205205
unsigned int quic_frontend_max_streams_bidi;
206+
unsigned int quic_frontend_max_tx_burst;
206207
size_t quic_frontend_max_window_size;
207208
unsigned int quic_retry_threshold;
208209
unsigned int quic_reorder_ratio;

src/cfgparse-quic.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,14 @@ static int cfg_parse_quic_tune_setting(char **args, int section_type,
273273
global.tune.quic_frontend_glitches_threshold = arg;
274274
else if (strcmp(suffix, "frontend.max-streams-bidi") == 0)
275275
global.tune.quic_frontend_max_streams_bidi = arg;
276+
else if (strcmp(suffix, "frontend.max-tx-burst") == 0) {
277+
if (arg > 1000) {
278+
memprintf(err, "'%s' cannot be bigger than 1s.", args[0]);
279+
return -1;
280+
}
281+
282+
global.tune.quic_frontend_max_tx_burst = arg;
283+
}
276284
else if (strcmp(suffix, "frontend.max-window-size") == 0) {
277285
unsigned long cwnd;
278286
char *end_opt;
@@ -376,6 +384,7 @@ static struct cfg_kw_list cfg_kws = {ILH, {
376384
{ CFG_GLOBAL, "tune.quic.frontend.glitches-threshold", cfg_parse_quic_tune_setting },
377385
{ CFG_GLOBAL, "tune.quic.frontend.max-streams-bidi", cfg_parse_quic_tune_setting },
378386
{ CFG_GLOBAL, "tune.quic.frontend.max-idle-timeout", cfg_parse_quic_time },
387+
{ CFG_GLOBAL, "tune.quic.frontend.max-tx-burst", cfg_parse_quic_tune_setting },
379388
{ CFG_GLOBAL, "tune.quic.frontend.max-window-size", cfg_parse_quic_tune_setting },
380389
{ CFG_GLOBAL, "tune.quic.max-frame-loss", cfg_parse_quic_tune_setting },
381390
{ CFG_GLOBAL, "tune.quic.reorder-ratio", cfg_parse_quic_tune_setting },

src/haproxy.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ struct global global = {
204204
.quic_backend_max_idle_timeout = QUIC_TP_DFLT_BACK_MAX_IDLE_TIMEOUT,
205205
.quic_frontend_max_idle_timeout = QUIC_TP_DFLT_FRONT_MAX_IDLE_TIMEOUT,
206206
.quic_frontend_max_streams_bidi = QUIC_TP_DFLT_FRONT_MAX_STREAMS_BIDI,
207+
.quic_frontend_max_tx_burst = 0,
207208
.quic_frontend_max_window_size = QUIC_DFLT_MAX_WINDOW_SIZE,
208209
.quic_reorder_ratio = QUIC_DFLT_REORDER_RATIO,
209210
.quic_retry_threshold = QUIC_DFLT_RETRY_THRESHOLD,

src/quic_tx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ enum quic_tx_err qc_send_mux(struct quic_conn *qc, struct list *frms,
495495
}
496496

497497
if (pacer)
498-
max_dgram = 1;
498+
max_dgram = qc->path->cc.algo->pacing_burst(&qc->path->cc);
499499

500500
TRACE_STATE("preparing data (from MUX)", QUIC_EV_CONN_TXPKT, qc);
501501
qel_register_send(&send_list, qc->ael, frms);

0 commit comments

Comments
 (0)