]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mux-quic: add option to disable pacing
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 28 Oct 2024 16:30:57 +0000 (17:30 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 31 Oct 2024 14:35:31 +0000 (15:35 +0100)
include/haproxy/global-t.h
src/cfgparse-quic.c
src/mux_quic.c

index a969863a9456abebbe34f0bb14a4dbbb571c5a6c..5bc27d635c01cd233bf899b028f8cb9c0024c81a 100644 (file)
@@ -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) */
index 538327c0c975c6a1529cc5824021fe6375416ecb..5254e881091a98c3fb45c4e325bec94796e4804c 100644 (file)
@@ -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 },
index 10bfca79c7487faacd621b21be10b28a40f7b910..adac5125abf91bbeb057efdbc0a8971eff8f42ce 100644 (file)
@@ -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);