Skip to content

netfilter: ipset: rhashtable conversion

Florian Westphal netfilter-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 3 repliesIn review
  2. v25 patches 1 replySuperseded
  3. v15 patches 0 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5netfilter: ipset: add rhashtable boilerplate stubsnet/netfilter/ipset/ip_set_hash_gen.h+106 -50 replies
2/5netfilter: ipset: add rhltable boilerplate stubsnet/netfilter/ipset/ip_set_hash_gen.h net/netfilter/ipset/ip_set_hash_netiface.c+58 -70 replies
3/5netfilter: ipset: replace internal hash table with rhashtablenet/netfilter/ipset/ip_set_hash_gen.h+462 -9853 replies
4/5netfilter: ipset: re-add forceadd supportnet/netfilter/ipset/ip_set_hash_gen.h+73 -50 replies
5/5netfilter: ipset: also report mem size for cidr storage to userspacenet/netfilter/ipset/ip_set_hash_gen.h+19 -50 replies

Reviews trailers per patch

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

Read the v3 thread

Cover letter [PATCH nf v3 0/5] netfilter: ipset: rhashtable conversion

Mostly identical to v2. See patches for details on what changed.

This series contains the initial rhashtable conversion. I elided several followup commits that remove dead code, e.g. the region locking or the resize callback, this will be sent later as a followup.

1) Add rhashtable boilerplate stubs to netfilter ipset. Implement rhashtable initialization and destruction.

2) Add rhltable boilerplate stubs to Netfilter IPSet. Prepare switching from rhashtable for sets sharing hash keys.

3) Replace ipset internal hash tables with rhashtables. Introduce RHL_MAX_CHAINLEN to explicitly bound chain length. Keep automatic rhashtable shrinking disabled to prevent errors during set dumping.

4) Restore SET_WITH_FORCEADD eviction logic in ipset. Add mtype_remove_random() helper to identify key slots for eviction.

Florian Westphal (5):
netfilter: ipset: add rhashtable boilerplate stubs
netfilter: ipset: add rhltable boilerplate stubs
netfilter: ipset: replace internal hash table with rhashtable
netfilter: ipset: re-add forceadd support
netfilter: ipset: also report mem size for cidr storage to userspace

 net/netfilter/ipset/ip_set_hash_gen.h      | 1629 ++++++++------------
 net/netfilter/ipset/ip_set_hash_netiface.c |   24 +-
 2 files changed, 682 insertions(+), 971 deletions(-)
Signature · 1 line
2.54.0