From: Florian Westphal <fw@strlen.de>
To: <netfilter-devel@vger.kernel.org>
Cc: Florian Westphal <fw@strlen.de>
Subject: [PATCH nf-next v12 0/5] ipset: replace internal hash table with rhashtable
Date: Mon, 30 Nov 2026 18:00:12 +0100 [thread overview]
Message-ID: <20261130170017.28897-1-fw@strlen.de> (raw)
v12:
patch 3: revert v11 yielding in mtype_list; it makes things
unecessarily complex and requires pathological case where
rhashtable is huge, virtually empty and all elements are
timed out.
No other changes.
v11:
- Only first patch is unchanged (I ignored AI comments)
- patch 2 only has commit message changed
- squash patch 4 into patch 3, AI complained about Fixes-tag and
stable backport (it was dependant on rhashtable too)
- changes in patches 3, 4, 5, see those patches for details.
1) Add rhashtable_flush_and_free, From Herbert Xu.
The initial user of this function is added in patch 3.
2) Add rhashtable boilerplate stubs to ipset. Implement its initialization
and destruction logic.
3) Replace ipset internal hash tables with rhashtables.
This drops functionality, in particular, MULTI sets will not work
correctly. This is restored in patch 5.
4) Reimplement hash:net,iface (IP_SET_HASH_WITH_MULTI) using a
group-of-elements structure with explicit exact-over-wildcard match
priority. Update gc, list, flush, and destroy paths for the extra group
level.
5) Restore SET_WITH_FORCEADD eviction support to netfilter ipset. Add
mtype_remove_random() helper to facilitate element eviction during
additions.
Florian Westphal (4):
netfilter: ipset: add rhashtable boilerplate stubs
netfilter: ipset: replace internal hash table with rhashtable
netfilter: ipset: re-add IP_SET_HASH_WITH_MULTI support
netfilter: ipset: re-add forceadd support
Herbert Xu (1):
rhashtable: Add rhashtable_flush_and_free helper
include/linux/rhashtable.h | 40 +-
lib/rhashtable.c | 186 +-
net/netfilter/ipset/ip_set_hash_gen.h | 2210 ++++++++++--------
net/netfilter/ipset/ip_set_hash_ip.c | 6 +-
net/netfilter/ipset/ip_set_hash_ipmac.c | 6 +-
net/netfilter/ipset/ip_set_hash_ipmark.c | 6 +-
net/netfilter/ipset/ip_set_hash_ipport.c | 6 +-
net/netfilter/ipset/ip_set_hash_ipportip.c | 6 +-
net/netfilter/ipset/ip_set_hash_ipportnet.c | 6 +-
net/netfilter/ipset/ip_set_hash_mac.c | 3 +-
net/netfilter/ipset/ip_set_hash_net.c | 6 +-
net/netfilter/ipset/ip_set_hash_netiface.c | 73 +-
net/netfilter/ipset/ip_set_hash_netnet.c | 6 +-
net/netfilter/ipset/ip_set_hash_netport.c | 6 +-
net/netfilter/ipset/ip_set_hash_netportnet.c | 6 +-
15 files changed, 1502 insertions(+), 1070 deletions(-)
--
2.56.1
next reply other threads:[~2026-11-30 17:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 17:00 Florian Westphal [this message]
2026-11-30 17:00 ` [PATCH nf-next v12 1/5] rhashtable: Add rhashtable_flush_and_free helper Florian Westphal
2026-11-30 17:00 ` [PATCH nf-next v12 2/5] netfilter: ipset: add rhashtable boilerplate stubs Florian Westphal
2026-11-30 17:00 ` [PATCH nf-next v12 3/5] netfilter: ipset: replace internal hash table with rhashtable Florian Westphal
2026-12-01 6:00 ` Florian Westphal
2026-11-30 17:00 ` [PATCH nf-next v12 4/5] netfilter: ipset: re-add IP_SET_HASH_WITH_MULTI support Florian Westphal
2026-11-30 17:00 ` [PATCH nf-next v12 5/5] netfilter: ipset: re-add forceadd support Florian Westphal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261130170017.28897-1-fw@strlen.de \
--to=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.