From: Willy Tarreau Date: Mon, 12 Oct 2026 18:31:38 +0000 (+0000) Subject: MINOR: global: add tune.options2 to host new GTUNE2_* flags X-Git-Tag: v3.5-dev13~43 X-Git-Url: https://git.kaiwu.me/http/%7Bsubstring-before(@doc,%20'.xml')%7D.html?a=commitdiff_plain;h=39cb750ad9a9430a6634125c0e57b51656740f2c;p=haproxy.git MINOR: global: add tune.options2 to host new GTUNE2_* flags All 32 bits of global.tune.options are now in use, so new global tuning flags cannot be added there anymore. Rather than widening this field, which would require turning every GTUNE_* value into a 64-bit constant (e.g. ~GTUNE_NO_TG_FD_SHARING would otherwise clear the upper bits), let's add a second flags word, tune.options2, whose flags will be named GTUNE2_*. This is a preliminary step for the "tune.h2.fe.enabled" setting and may have to be backported along with it. --- diff --git a/include/haproxy/global-t.h b/include/haproxy/global-t.h index 6f8220589..d676bf73e 100644 --- a/include/haproxy/global-t.h +++ b/include/haproxy/global-t.h @@ -89,6 +89,8 @@ #define GTUNE_NO_MAX_COUNTER (1<<30) #define GTUNE_NO_TG_FD_SHARING (1U<<31) +/* Global tuning options for tune.options2, since tune.options is full */ + /* subsystem-specific debugging options for tune.debug */ #define GDBG_CPU_AFFINITY (1U<< 0) #define GDBG_NO_ELF_SYMS (1U<< 1) @@ -181,6 +183,7 @@ struct global { int max_rules_at_once; /* max number of rules executed in a single evaluation loop */ int maxaccept; /* max number of consecutive accept() */ int options; /* various tuning options */ + uint options2; /* more tuning options (GTUNE2_*) */ uint debug; /* various debugging options (GDBG_*) */ int runqueue_depth;/* max number of tasks to run at once */ uint twork_budget; /* max number of cross-thread work items to run at once */