]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ipvs: add resizable hash tables
authorJulian Anastasov <ja@ssi.bg>
Tue, 3 Mar 2026 21:04:05 +0000 (23:04 +0200)
committerFlorian Westphal <fw@strlen.de>
Wed, 4 Mar 2026 10:45:45 +0000 (11:45 +0100)
commitb655388111cf7e43f70e49db64bdaa42bcb8a038
treea50a74e2d242fcd8e94617386d7f8313f425f564
parent1ac252ad036cdb18f5fb7f76bb6061adfed9cedf
ipvs: add resizable hash tables

Add infrastructure for resizable hash tables based on hlist_bl
which we will use in followup patches.

The tables allow RCU lookups during resizing, bucket modifications
are protected with per-bucket bit lock and additional custom locking,
the tables are resized when load reaches thresholds determined based
on load factor parameter.

Compared to other implementations we rely on:
* fast entry removal by using node unlinking without pre-lookup
* entry rehashing when hash key changes
* entries can contain multiple hash nodes
* custom locking depending on different contexts
* adjustable load factor to customize the grow/shrink process

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Florian Westphal <fw@strlen.de>
include/net/ip_vs.h
net/netfilter/ipvs/ip_vs_conn.c
net/netfilter/ipvs/ip_vs_core.c