Skip to content

netfilter: ipset fixes and rhastable prep work

Florian Westphal netfilter-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5netfilter: ipset: rework cidr bookkeepingnet/netfilter/ipset/ip_set_hash_gen.h net/netfilter/ipset/ip_set_hash_ipportnet.c net/netfilter/ipset/ip_set_hash_net.c +4 more+182 -930 replies
2/5netfilter: ipset: switch ext_size to atomic64_tinclude/linux/netfilter/ipset/ip_set.h net/netfilter/ipset/ip_set_bitmap_gen.h net/netfilter/ipset/ip_set_core.c +2 more+9 -90 replies
3/5netfilter: ipset: add small wrappers for hash and bucket sizesnet/netfilter/ipset/ip_set_hash_gen.h+31 -80 replies
4/5netfilter: ipset: add and use mtype_del_cidr_all helpernet/netfilter/ipset/ip_set_hash_gen.h+16 -180 replies
5/5netfilter: ipset: switch to rcu workinclude/linux/netfilter/ipset/ip_set.h net/netfilter/ipset/ip_set_core.c+31 -190 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH nf 0/5] netfilter: ipset fixes and rhastable prep work

This series contains a few fixes and prepation work for the ipset rhashtable conversion. The rhashtable conversion patch set is too large to post in one pile and has one external dependency that is not yet in nf (queued in crypto tree).

I discussed this with Jozsef and we think that targeting the rhashtable conversion to nf tree is preferrable to nf-next due to the volume of LLM reports.

1) Rework ipset CIDR bookkeeping with an RCU-based method to ensure safety on weakly-ordered architectures. Replace in-place updates with structure replacement. From Jozsef Kadlecsik.

2) Switch ext_size to atomic64_t in ipset to prevent races during parallel updates. Also from Jozsef.

3) Add small wrappers for hash and bucket sizes in netfilter ipset. Prepare for rhashtable conversion.

4) Add and use mtype_del_cidr_all helper in netfilter ipset. Reduce size of upcoming rhashtable conversion.

5) Switch ipset destruction to use RCU work. Fix a bug where rhashtable destruction triggered a sleeping function. Enable future decoupling of set destruction and GC work.

Florian Westphal (3):
netfilter: ipset: add small wrappers for hash and bucket sizes
netfilter: ipset: add and use mtype_del_cidr_all helper
netfilter: ipset: switch to rcu work

Jozsef Kadlecsik (2):
netfilter: ipset: rework cidr bookkeeping
netfilter: ipset: switch ext_size to atomic64_t

 include/linux/netfilter/ipset/ip_set.h       |   6 +-
 net/netfilter/ipset/ip_set_bitmap_gen.h      |   4 +-
 net/netfilter/ipset/ip_set_core.c            |  52 ++--
 net/netfilter/ipset/ip_set_hash_gen.h        | 304 +++++++++++++------
 net/netfilter/ipset/ip_set_hash_ipportnet.c  |   4 +-
 net/netfilter/ipset/ip_set_hash_net.c        |   4 +-
 net/netfilter/ipset/ip_set_hash_netiface.c   |   4 +-
 net/netfilter/ipset/ip_set_hash_netnet.c     |  12 +-
 net/netfilter/ipset/ip_set_hash_netport.c    |   4 +-
 net/netfilter/ipset/ip_set_hash_netportnet.c |  12 +-
 net/netfilter/ipset/ip_set_list_set.c        |   4 +-
 11 files changed, 266 insertions(+), 144 deletions(-)
Signature · 1 line
2.54.0