]> git.ipfire.org Git - thirdparty/nftables.git/commit
cache: recycle existing cache with incremental updates
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 27 May 2024 11:26:01 +0000 (13:26 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 3 Jun 2024 18:17:49 +0000 (20:17 +0200)
commite791dbe109b6dd891a63a4236df5dc29d7a4b863
treed250b6f445fcd23cc9e2963124c82a2a57fa0a4f
parentbbb0e944b59d355085e8f50b4b7b5057ae0d33a4
cache: recycle existing cache with incremental updates

Cache tracking has improved over time by incrementally adding/deleting
objects when evaluating commands that are going to be sent to the kernel.

nft_cache_is_complete() already checks that the cache contains objects
that are required to handle this batch of commands by comparing cache
flags.

Infer from the current generation ID if no other transaction has
invalidated the existing cache, this allows to skip unnecessary cache
flush then refill situations which slow down incremental updates.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/cache.c