]> git.kaiwu.me - haproxy.git/commitdiff
MINOR: global: add tune.options2 to host new GTUNE2_* flags
authorWilly Tarreau <w@1wt.eu>
Mon, 12 Oct 2026 18:31:38 +0000 (18:31 +0000)
committerWilly Tarreau <w@1wt.eu>
Tue, 17 Nov 2026 10:08:46 +0000 (11:08 +0100)
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.

include/haproxy/global-t.h

index 6f8220589cda3a0346925a38ded1da24ad16b2e9..d676bf73e7890fa6d29d0ad265455fa7a58d5db8 100644 (file)
@@ -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 */