Sven Auhagen <Sven.Auhagen@xxxxxxxxxx> wrote: > One question regarding option 2. > Don't I need to rcu read lock the nft_set_flush now because when I preallocate the transaction I need to make sure that the nelems do not change before doing the walk? rcu read lock won't make nelems stable either. The preallocation can fall short (nelems increased) or it can have leftover elements (if elements timed out or were deleted) after the walk. So, no, you don't need to hold the rcu read lock, but you can't rely on nelems remaining stable.