From: Amaury Denoyelle Date: Mon, 28 Oct 2024 16:30:57 +0000 (+0100) Subject: MINOR: mux-quic: add option to disable pacing X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0443ee67ccf77df34bf26d55e99f2169bf122353;p=thirdparty%2Fhaproxy.git MINOR: mux-quic: add option to disable pacing --- diff --git a/include/haproxy/global-t.h b/include/haproxy/global-t.h index a969863a94..5bc27d635c 100644 --- a/include/haproxy/global-t.h +++ b/include/haproxy/global-t.h @@ -87,6 +87,7 @@ #define GTUNE_LISTENER_MQ_ANY (GTUNE_LISTENER_MQ_FAIR | GTUNE_LISTENER_MQ_OPT) #define GTUNE_QUIC_CC_HYSTART (1<<29) #define GTUNE_QUIC_NO_UDP_GSO (1<<30) +#define GTUNE_QUIC_NO_PACING (1<<31) #define NO_ZERO_COPY_FWD 0x0001 /* Globally disable zero-copy FF */ #define NO_ZERO_COPY_FWD_PT 0x0002 /* disable zero-copy FF for PT (recv & send are disabled automatically) */ diff --git a/src/cfgparse-quic.c b/src/cfgparse-quic.c index 538327c0c9..5254e88109 100644 --- a/src/cfgparse-quic.c +++ b/src/cfgparse-quic.c @@ -327,7 +327,10 @@ static int cfg_parse_quic_tune_setting0(char **args, int section_type, return -1; suffix = args[0] + prefix_len; - if (strcmp(suffix, "disable-udp-gso") == 0) { + if (strcmp(suffix, "frontend.tx.disable-pacing") == 0) { + global.tune.options |= GTUNE_QUIC_NO_PACING; + } + else if (strcmp(suffix, "disable-udp-gso") == 0) { global.tune.options |= GTUNE_QUIC_NO_UDP_GSO; } else { @@ -387,6 +390,7 @@ static struct cfg_kw_list cfg_kws = {ILH, { { CFG_GLOBAL, "tune.quic.frontend.max-idle-timeout", cfg_parse_quic_time }, { CFG_GLOBAL, "tune.quic.frontend.max-tx-burst", cfg_parse_quic_tune_setting }, { CFG_GLOBAL, "tune.quic.frontend.max-window-size", cfg_parse_quic_tune_setting }, + { CFG_GLOBAL, "tune.quic.frontend.tx.disable-pacing", cfg_parse_quic_tune_setting0 }, { CFG_GLOBAL, "tune.quic.max-frame-loss", cfg_parse_quic_tune_setting }, { CFG_GLOBAL, "tune.quic.reorder-ratio", cfg_parse_quic_tune_setting }, { CFG_GLOBAL, "tune.quic.retry-threshold", cfg_parse_quic_tune_setting }, diff --git a/src/mux_quic.c b/src/mux_quic.c index 10bfca79c7..adac5125ab 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -2097,7 +2097,7 @@ static int qcc_send_frames(struct qcc *qcc, struct list *frms, int stream) return -1; } - if (stream) + if (stream && likely(!(global.tune.options & GTUNE_QUIC_NO_PACING))) pacer = &qcc->tx.pacer; ret = qc_send_mux(qcc->conn->handle.qc, frms, pacer);