From: Jozsef Kadlecsik <kadlec@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nf-next v10 0/6] ipset: replace internal hash table with rhashtable
Date: Fri, 13 Nov 2026 08:58:06 +0100 (CET) [thread overview]
Message-ID: <bbc263cd-5ceb-f183-439b-44909adef4ed@netfilter.org> (raw)
In-Reply-To: <avXuJ0GBdzyxK-_w@strlen.de>
Hi Florian,
On Thu, 12 Nov 2026, Florian Westphal wrote:
> I pushed a few of the test updates to ipset.git, but not this
> 3-part-series:
>
> https://patchwork.ozlabs.org/project/netfilter-devel/patch/20261111101603.22698-1-fw@strlen.de/
>
> First one passes on either rhashtable branch or main, but I'm not sure
> it should :-)
>
> Resp. I'm not sure what the contract/expected behavior of net,iface set
> type is when the address matches the net/mask entry, but the interface
> doesn't. I followed existing behaviour, so that test would enshrine
> that: it stops matching more candidates.
Hm, it shouldn't. The expected behaviour is as follows: if the net/mask
entry matches but the interface not, then the code should continue trying
to find matching entries but just with the same mask value and not with
other ones. That way the same net/mask entry behind multiple interfaces is
supported and matched.
In the original code the "multi" parameter handles the case: in the
net,iface matching function (i.e. hash_netiface[46]_data_equal()) it is
set to true if net/mask matches and in the outer generic matching function
in mtype_test_cidrs() it is taken into account to break the loop of trying
to match further in the ordered list of possible mask values in the set.
> I'd prefer if you could double-check that the semantics that the test
> is checking are sensible/correct.
>
> 2 and 3 fail on main, in both cases I think these are bugs in
> the existing implementation.
I'll have a look at it.
Best regards,
Jozsef
--
E-mail : kadlec@netfilter.org, kadlec@blackhole.kfki.hu, kadlecsik.jozsef@wigner.hu
Address: Wigner Research Centre for Physics
H-1525 Budapest 114, POB. 49, Hungary
next prev parent reply other threads:[~2026-11-13 7:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 14:38 [PATCH nf-next v10 0/6] ipset: replace internal hash table with rhashtable Florian Westphal
2026-11-12 14:38 ` [PATCH nf-next v10 1/6] rhashtable: Add rhashtable_flush_and_free helper Florian Westphal
2026-11-12 14:38 ` [PATCH nf-next v10 2/6] netfilter: ipset: add rhashtable boilerplate stubs Florian Westphal
2026-11-12 14:38 ` [PATCH nf-next v10 3/6] netfilter: ipset: replace internal hash table with rhashtable Florian Westphal
2026-11-12 14:38 ` [PATCH nf-next v10 4/6] netfilter: ipset: also report mem size for cidr storage to userspace Florian Westphal
2026-11-12 14:38 ` [PATCH nf-next v10 5/6] netfilter: ipset: re-add IP_SET_HASH_WITH_MULTI support Florian Westphal
2026-11-12 14:38 ` [PATCH nf-next v10 6/6] netfilter: ipset: re-add forceadd support Florian Westphal
2026-11-12 15:29 ` [PATCH nf-next v10 0/6] ipset: replace internal hash table with rhashtable Jozsef Kadlecsik
2026-11-12 16:49 ` Florian Westphal
2026-11-13 7:58 ` Jozsef Kadlecsik [this message]
2026-11-13 8:13 ` 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=bbc263cd-5ceb-f183-439b-44909adef4ed@netfilter.org \
--to=kadlec@netfilter.org \
--cc=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.