]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: log/proxy: store log-steps selection using a bitmask, not an eb tree
authorAurelien DARRAGON <adarragon@haproxy.com>
Fri, 29 Aug 2025 09:10:56 +0000 (11:10 +0200)
committerAurelien DARRAGON <adarragon@haproxy.com>
Mon, 15 Sep 2025 08:29:02 +0000 (10:29 +0200)
commit6a92b14cc171914b3ec1badcfa8966b935c9a9c1
tree0c133d0dcd50ffb6f4da6f80cad5e64ed3da2562
parentbe417c1db25bdf59a5d288e1feda146df8cd4fb8
MEDIUM: log/proxy: store log-steps selection using a bitmask, not an eb tree

An eb tree was used to anticipate for infinite amount of custom log steps
configured at a proxy level. In turns out this makes no sense to configure
that much logging steps for a proxy, and the cost of the eb tree is non
negligible in terms of memory footprint, especially when used in a default
section.

Instead, let's use a simple bitmask, which allows up to 64 logging steps
configured at proxy level. If we lack space some day (and need more than
64 logging steps to be configured), we could simply modify
"struct log_steps" to spread the bitmask over multiple 64bits integers,
minor some adjustments where the mask is set and checked.
include/haproxy/log-t.h
include/haproxy/proxy-t.h
src/log.c
src/proxy.c