Hi Herbert,
On Sat, Sep 16, 2023 at 11:37:51AM +0800, Herbert Xu wrote:
On Fri, Sep 15, 2023 at 10:05:06AM -0400, Alexander Aring wrote:
quoted
My question is here? Is that allowed to do because a resize event may
change the order how to iterate over a rhashtable.
Walking over an rhashtable should be a last resort. There is
no guarantee of stability.
If you skip entries after a resize then you may miss entries.
One more question: this walk might miss entries but may it also
duplicate the same entries?
If you want a stable walk, allocate an extra 8 bytes and use
a linked list.
I will work on a patch to update netfilter clients for this code to
use a rcu linked list.
Thanks.