]> git.ipfire.org Git - thirdparty/iptables.git/commit
nft: calculate cache requirements from list of commands
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 6 Jan 2020 12:20:14 +0000 (13:20 +0100)
committerPhil Sutter <phil@nwl.cc>
Mon, 11 May 2020 12:28:28 +0000 (14:28 +0200)
commit9d07514ac5c7a27ec72df5a81bf067073d63bd99
tree129a8f08d7c132296c7d8131c540074995551bac
parenta7f1e208cdf9c6392c99d3c52764701d004bdde7
nft: calculate cache requirements from list of commands

This patch uses the new list of commands to calculate the cache
requirements, the rationale after this updates is the following:

 #1 Parsing, that builds the list of commands and it also calculates
    cache level requirements.
 #2 Cache building.
 #3 Translate commands to jobs
 #4 Translate jobs to netlink

This patch removes the pre-parsing code in xtables-restore.c to
calculate the cache.

After this patch, cache is calculated only once, there is no need
to cancel and refetch for an in-transit transaction.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Phil Sutter <phil@nwl.cc>
iptables/nft-cache.c
iptables/nft-cache.h
iptables/nft-cmd.c
iptables/nft-cmd.h
iptables/nft.c
iptables/nft.h
iptables/xtables-restore.c
iptables/xtables-save.c