gfs2 filesystem and dlm development
 help / color / mirror / Atom feed
* nft_rhash_walk, rhashtable and resize event
@ 2023-09-15 14:05 Alexander Aring
  2023-09-16  3:37 ` Herbert Xu
  0 siblings, 1 reply; 6+ messages in thread
From: Alexander Aring @ 2023-09-15 14:05 UTC (permalink / raw)
  To: Network Development
  Cc: Pablo Neira Ayuso, kadlec, fw, gfs2, David Teigland, tgraf,
	herbert

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-09-19  3:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-15 14:05 nft_rhash_walk, rhashtable and resize event Alexander Aring
2023-09-16  3:37 ` Herbert Xu
2023-09-18 11:59   ` Pablo Neira Ayuso
2023-09-18 12:25     ` Herbert Xu
2023-09-18 12:38       ` Alexander Aring
2023-09-19  3:24         ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox