Skip to content

cache rework

Pablo Neira Ayuso netfilter-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6nft: add struct nft_cacheiptables/nft.c iptables/nft.h+25 -190 replies
2/6nft: statify nft_rebuild_cache()iptables/nft.c iptables/nft.h+1 -20 replies
3/6nft: add __nft_table_builtin_find()iptables/nft.c+12 -60 replies
4/6nft: add flush_cache()iptables/nft.c+19 -110 replies
5/6nft: cache table listiptables/nft.c iptables/nft.h+58 -450 replies
6/6nft: ensure cache consistencyiptables/nft.c+16 -60 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH iptables 0/6] cache rework

This patchset updates the cache logic:

* Update nft_table_list_get() to use a list of tables from the cache, instead of listing them from the kernel.

* Ensure cache consistency by checking for generation ID is consistent when building up the cache.

Without this, we may end up with an inconsistent cache, hence defeating the refresh transaction logic.

The other patches are just a few preparation patches to allow to maintain the original cache and a cache that is refreshed everytime this hits ERESTART.

My plan is to send another batch to revisit the refresh transaction logic after this patchset, since 0004-restore-race_0 still does not work after this.

Pablo Neira Ayuso (6):
nft: add struct nft_cache
nft: statify nft_rebuild_cache()
nft: add __nft_table_builtin_find()
nft: add flush_cache()
nft: cache table list
nft: ensure cache consistency

 iptables/nft.c | 195 ++++++++++++++++++++++++++++++++++-----------------------
 iptables/nft.h |  15 +++--
 2 files changed, 126 insertions(+), 84 deletions(-)
Signature · 1 line
2.11.0