From: Amaury Denoyelle Date: Thu, 15 Apr 2021 16:07:07 +0000 (+0200) Subject: MINOR: config: add a diag for invalid cpu-map statement X-Git-Tag: v2.4-dev17~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2944ecf5d3fd28fe1b7405840a068732bfa035c;p=thirdparty%2Fhaproxy.git MINOR: config: add a diag for invalid cpu-map statement If a cpu-statement is refering to multiple processes and threads, it is silently ignored. Add a diag message to report it to the user. --- diff --git a/src/cfgparse-global.c b/src/cfgparse-global.c index 41f9daa5b6..c26c086d01 100644 --- a/src/cfgparse-global.c +++ b/src/cfgparse-global.c @@ -1156,6 +1156,9 @@ int cfg_parse_global(const char *file, int linenum, char **args, int kwm) } } } + + HA_DIAG_WARNING_COND(proc != 0x1 && thread != 0x1, + "parsing [%s:%d] : cpu-map statement is considered invalid and thus ignored as it addresses multiple processes and threads at the same time. At least one of them should be 1 and only 1.", file, linenum); } #else ha_alert("parsing [%s:%d] : '%s' is not enabled, please check build options for USE_CPU_AFFINITY.\n",