Thread (6 messages) flat view 6 messages, 3 authors, 2023-09-19

Re: nft_rhash_walk, rhashtable and resize event

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2023-09-18 12:26:25
Also in: gfs2

On Mon, Sep 18, 2023 at 01:59:47PM +0200, Pablo Neira Ayuso wrote:
One more question: this walk might miss entries but may it also
duplicate the same entries?
It depends on what happens during the walk.  If you're lucky
and no resize event occurs during the walk, then you won't miss
any entries or see duplicates.

When a resize event does occur, then we will tell you that it
happened by returning EAGAIN.  It means that you should start
from the beginning and redo the whole walk.  If you do that
then you won't miss anything (although, you may never finish
if the table keeps getting resized).

But obviously duplicates will occur if you take this approach.
I will work on a patch to update netfilter clients for this code to
use a rcu linked list.
Sounds good!

Thanks,
-- 
Email: Herbert Xu [off-list ref]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help