]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: config: allow cpu-map to take commas in lists of ranges
authorWilly Tarreau <w@1wt.eu>
Fri, 5 May 2023 14:10:05 +0000 (16:10 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 5 May 2023 16:41:52 +0000 (18:41 +0200)
commit615c301db45a8ab18c7fc7fc778531d74223a3ca
tree2dec21f0fb08f11df32f9261fa895d548dbc9d62
parent2273af11e003503767075a1f19bf1201ac8f100f
MINOR: config: allow cpu-map to take commas in lists of ranges

The function that cpu-map uses to parse CPU sets, parse_cpu_set(), was
etended in 2.4 with commit a80823543 ("MINOR: cfgparse: support the
comma separator on parse_cpu_set") to support commas between ranges.
But since it was quite late in the development cycle, by then it was
decided not to add a last-minute surprise and not to magically support
commas in cpu-map, hence the "comma_allowed" argument.

Since then we know that it was not the best choice, because the comma
is silently ignored in the cpu-map syntax, causing all sorts of
surprises in field with threads running on a single node for example.
In addition it's quite common to copy-paste a taskset line and put it
directly into the haproxy configuration.

This commit relaxes this rule an finally allows cpu-map to support
commas between ranges. It simply consists in removing the comma_allowed
argument in the parse_cpu_set() function. The doc was updated to
reflect this.
doc/configuration.txt
include/haproxy/cfgparse.h
src/cfgparse-global.c
src/cfgparse.c