]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: stktable: use {show,set,clear} table with ptr
authorAurelien DARRAGON <adarragon@haproxy.com>
Mon, 18 Dec 2023 14:37:25 +0000 (15:37 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 21 Dec 2023 13:22:27 +0000 (14:22 +0100)
commit9b2717e7bb754c75816fb9272f3a2bcd6ea258cf
tree877908e767830131cb3b42d4d4ff7947a9f24299
parent6ee3923c526b8bb7addda7da81b2a8046a76012a
MINOR: stktable: use {show,set,clear} table with ptr

This patchs adds support for optional ptr (0xffff form) instead of key
argument to match against existing sticktable entries, ie: if the key is
empty or cannot be matched on the cli due to incompatible characters.
Lookup is performed using a linear search so it will be slower than key
search which relies on eb tree lookup.

Example:

set table mytable key mykey data.gpc0 1

show table mytable
> 0x7fbd00032bd8: key=mykey use=0 exp=86373242 shard=0 gpc0=1

clear table mytable ptr 0x7fbd00032bd8

This patchs depends on:
 - "MINOR: stktable: add table_process_entry helper function"

It should solve GH #2118
src/stick_table.c