[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK-6q+ghZRxrWQg3k0x1-SofoxfVfObJMg8wZ3UUMM4CU2oiWg@mail.gmail.com>
Date: Fri, 15 Sep 2023 10:05:06 -0400
From: Alexander Aring <aahringo@...hat.com>
To: Network Development <netdev@...r.kernel.org>
Cc: Pablo Neira Ayuso <pablo@...filter.org>, kadlec@...filter.org, fw@...len.de,
gfs2@...ts.linux.dev, David Teigland <teigland@...hat.com>, tgraf@...g.ch,
herbert@...dor.apana.org.au
Subject: nft_rhash_walk, rhashtable and resize event
Hi,
I try to find some ways that fits my use case of iterating a
rhashtable. I found [0] but it somehow tries to skip objects again if
a rhashtable resize event occurs during a hash walk. It does that by
skipping the already iterated objects according to a counter that is
tracked, see [0]:
if (iter->count < iter->skip)
from my understanding.
My question is here? Is that allowed to do because a resize event may
change the order how to iterate over a rhashtable.
Thanks.
- Alex
[0] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/net/netfilter/nft_set_hash.c?h=v6.6-rc1#n257
Powered by blists - more mailing lists