Linux Netfilter development
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: <netfilter-devel@vger.kernel.org>
Cc: Jozsef Kadlecsik <kadlec@netfilter.org>, Florian Westphal <fw@strlen.de>
Subject: [PATCH nf v3 0/5] netfilter: ipset: rhashtable conversion
Date: Fri, 28 Aug 2026 17:22:51 +0200	[thread overview]
Message-ID: <20260828152256.8759-1-fw@strlen.de> (raw)

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(-)

-- 
2.54.0


             reply	other threads:[~2026-08-28 15:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-28 15:22 Florian Westphal [this message]
2026-08-28 15:22 ` [PATCH nf v3 1/5] netfilter: ipset: add rhashtable boilerplate stubs Florian Westphal
2026-08-28 15:22 ` [PATCH nf v3 2/5] netfilter: ipset: add rhltable " Florian Westphal
2026-08-28 15:22 ` [PATCH nf v3 3/5] netfilter: ipset: replace internal hash table with rhashtable Florian Westphal
2026-09-02  4:32   ` Florian Westphal
2026-09-02  7:35     ` Jozsef Kadlecsik
2026-09-02  7:42     ` Jozsef Kadlecsik
2026-08-28 15:22 ` [PATCH nf v3 4/5] netfilter: ipset: re-add forceadd support Florian Westphal
2026-08-28 15:22 ` [PATCH nf v3 5/5] netfilter: ipset: also report mem size for cidr storage to userspace 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=20260828152256.8759-1-fw@strlen.de \
    --to=fw@strlen.de \
    --cc=kadlec@netfilter.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox