]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: stktable: leverage smp_fetch_* helpers from sample conv
authorAurelien DARRAGON <adarragon@haproxy.com>
Tue, 14 Jan 2025 21:25:23 +0000 (22:25 +0100)
committerAurelien DARRAGON <adarragon@haproxy.com>
Wed, 15 Jan 2025 13:04:55 +0000 (14:04 +0100)
commite6429166b981937ab5b0fa3d0d816a8afd68f2c2
tree4ab86a79c13ff6d96fd9a537cfe12565132e1c0a
parent6c9b315187c57986321fded0b5b77a1bf37fcc51
MEDIUM: stktable: leverage smp_fetch_* helpers from sample conv

In this patch we try to prevent code duplication: some fetches and sample
converters do the exact same thing, except that the converter takes the
argument as input data. Until now, both the converter and the fetch
had their own implementation (copy pasted), with the fetch specific or
converter specific lookup part.

Thanks to previous commits, we now have generic sample fetch helpers
that take the stkctr as argument, so let's leverage them directly
from the converter functions when available. This allows to remove
a lot of code duplication and should make code maintenance easier in the
future.
src/stick_table.c