]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: ebtree: only consider the branches matching the scope in lookups
authorWilly Tarreau <w@1wt.eu>
Sun, 5 Nov 2017 13:33:01 +0000 (14:33 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 6 Nov 2017 10:20:11 +0000 (11:20 +0100)
commitd1d55ac6196cd64f7408c0a9467139e45b59b732
tree03fc1f695c88e7d46bddbbedb706a106f3019479
parentef8d0dcefdf00b043697df971533daf01290811a
MEDIUM: ebtree: only consider the branches matching the scope in lookups

Now when looking up a node via eb32sc_first(), eb32sc_next(), and
eb32sc_lookup_ge(), we only focus on the branches matching the requested
scope. The code must be careful to miss no branch. It changes a little
bit from the previous one because the scope stored on the intermediary
nodes is not exact (since we don't propagate upwards during deletion),
so in case a lookup fails, we have to walk up and pick the next matching
entry.
ebtree/eb32sctree.c
ebtree/eb32sctree.h