]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: pools: distinguish the requested alignment from the type-specific one
authorWilly Tarreau <w@1wt.eu>
Mon, 11 Aug 2025 13:24:33 +0000 (15:24 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 11 Aug 2025 17:55:30 +0000 (19:55 +0200)
commitd240f387ca16177f12d5a02ba102740e45c1a18a
tree05be301e347f3469e8715de3ebbd6fa950d3432d
parent5e2837cfb42cdac6761696276c1c1ecde80b4d72
MINOR: pools: distinguish the requested alignment from the type-specific one

We're letting users request an alignment but that can violate one imposed
by a type, especially if we start seeing REGISTER_TYPED_POOL() grow in
adoption, encouraging users to specify alignment on their types. On the
other hand, if we ask the user to always specify the alignment, no control
is possible and the error is easy. Let's have a second field in the pool
registration, for the type-specific one. We'll set it to zero when unknown,
and to the types's alignment when known. This way it will become possible
to compare them at startup time to detect conflicts. For now no macro
permits to set both separately so this is not visible.
include/haproxy/pool-t.h
include/haproxy/pool.h