Skip to content

Commit 20fa594

Browse files
a-denoyellehaproxyFred
authored andcommitted
MINOR: mux-quic: add option to disable pacing
1 parent e52bbe5 commit 20fa594

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

include/haproxy/global-t.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
#define GTUNE_LISTENER_MQ_ANY (GTUNE_LISTENER_MQ_FAIR | GTUNE_LISTENER_MQ_OPT)
8888
#define GTUNE_QUIC_CC_HYSTART (1<<29)
8989
#define GTUNE_QUIC_NO_UDP_GSO (1<<30)
90+
#define GTUNE_QUIC_NO_PACING (1<<31)
9091

9192
#define NO_ZERO_COPY_FWD 0x0001 /* Globally disable zero-copy FF */
9293
#define NO_ZERO_COPY_FWD_PT 0x0002 /* disable zero-copy FF for PT (recv & send are disabled automatically) */

src/cfgparse-quic.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,10 @@ static int cfg_parse_quic_tune_setting0(char **args, int section_type,
327327
return -1;
328328

329329
suffix = args[0] + prefix_len;
330-
if (strcmp(suffix, "disable-udp-gso") == 0) {
330+
if (strcmp(suffix, "frontend.tx.disable-pacing") == 0) {
331+
global.tune.options |= GTUNE_QUIC_NO_PACING;
332+
}
333+
else if (strcmp(suffix, "disable-udp-gso") == 0) {
331334
global.tune.options |= GTUNE_QUIC_NO_UDP_GSO;
332335
}
333336
else {
@@ -386,6 +389,7 @@ static struct cfg_kw_list cfg_kws = {ILH, {
386389
{ CFG_GLOBAL, "tune.quic.frontend.max-idle-timeout", cfg_parse_quic_time },
387390
{ CFG_GLOBAL, "tune.quic.frontend.max-tx-burst", cfg_parse_quic_tune_setting },
388391
{ CFG_GLOBAL, "tune.quic.frontend.max-window-size", cfg_parse_quic_tune_setting },
392+
{ CFG_GLOBAL, "tune.quic.frontend.tx.disable-pacing", cfg_parse_quic_tune_setting0 },
389393
{ CFG_GLOBAL, "tune.quic.max-frame-loss", cfg_parse_quic_tune_setting },
390394
{ CFG_GLOBAL, "tune.quic.reorder-ratio", cfg_parse_quic_tune_setting },
391395
{ CFG_GLOBAL, "tune.quic.retry-threshold", cfg_parse_quic_tune_setting },

src/mux_quic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2097,7 +2097,7 @@ static int qcc_send_frames(struct qcc *qcc, struct list *frms, int stream)
20972097
return -1;
20982098
}
20992099

2100-
if (stream)
2100+
if (stream && likely(!(global.tune.options & GTUNE_QUIC_NO_PACING)))
21012101
pacer = &qcc->tx.pacer;
21022102

21032103
ret = qc_send_mux(qcc->conn->handle.qc, frms, pacer);

0 commit comments

Comments
 (0)