iptables: introduce cache evaluation phase
Get series with b4
b4 am [email protected]Versions newest first
- v2 Latest18 patches 11 repliesIn review
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/18 | ebtables-restore: Drop custom table flush routineiptables/ iptables/ iptables/ | +1 | 1 reply | |
| 2/18 | nft: cache: Eliminate init_chain_cache()iptables/ | +4 | 1 reply | |
| 3/18 | nft: cache: Init per table set list along with chain listiptables/ | +4 | 1 reply | |
| 4/18 | nft: cache: Fetch sets per tableiptables/ | +15 | 1 reply | |
| 5/18 | ebtables-restore: Table line to trigger implicit commitiptables/ | +4 | 0 replies | |
| 6/18 | nft: split parsing from netlink commandsiptables/ iptables/ iptables/ +12 more | +715 | 0 replies | |
| 7/18 | nft: calculate cache requirements from list of commandsiptables/ iptables/ iptables/ +5 more | +119 | 0 replies | |
| 8/18 | nft: restore among supportiptables/ iptables/ iptables/ | +32 | 0 replies | |
| 9/18 | nft: remove cache build callsiptables/ iptables/ iptables/ | +0 | 0 replies | |
| 10/18 | nft: missing nft_fini() call in bridge familyiptables/ | +2 | 0 replies | |
| 11/18 | nft: cache: Simplify rule and set fetchersiptables/ | +5 | 0 replies | |
| 12/18 | nft: cache: Improve fake cache integrationiptables/ iptables/ iptables/ | +4 | 0 replies | |
| 13/18 | nft: cache: Introduce struct nft_cache_reqiptables/ iptables/ | +22 | 0 replies | |
| 14/18 | nft-cache: Fetch cache per tableiptables/ iptables/ iptables/ +3 more | +56 | 0 replies | |
| 15/18 | nft-cache: Introduce __fetch_chain_cache()iptables/ | +30 | 0 replies | |
| 16/18 | nft: cache: Fetch cache for specific chainsiptables/ iptables/ iptables/ | +82 | 0 replies | |
| 17/18 | nft: cache: Optimize caching for flush commandiptables/ iptables/ iptables/ | +39 | 0 replies | |
| 18/18 | nft: Fix for '-F' in iptables dumpsiptables/ | +34 | 0 replies |
Reviews trailers per patch
4 of 18 patches have a Reviewed-by or Acked-by.
| Patch | Florian Westphal |
|---|---|
| 1/18 | A-b |
| 2/18 | A-b |
| 3/18 | A-b |
| 4/18 | A-b |
| 5/18 | |
| 6/18 | |
| 7/18 | |
| 8/18 | |
| 9/18 | |
| 10/18 | |
| 11/18 | |
| 12/18 | |
| 13/18 | |
| 14/18 | |
| 15/18 | |
| 16/18 | |
| 17/18 | |
| 18/18 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [iptables PATCH v2 00/18] iptables: introduce cache evaluation phase
Hi Pablo,
As promised, here's a revised version of your cache rework series from January. It restores performance according to my tests (which are yet to be published somewhere) and passes the testsuites.
Patches 1-3 are code simplifications which are not directly related to the actual caching changes.
Patch 4 enhances set fetching by adding support for passing a table name to kernel but no set name. Not a big deal for iptables but it aligns the code with chain fetching.
Patch 5 is a respin of a patch submitted a few weeks ago, namely adding implicit commits to arptables- and ebtables-restore tools which don't support explicit COMMIT lines in input. Big benefit here is that we won't see consecutive commands for different tables anymore, so selective cache fetching doesn't have to deal with too many odd cases.
Patches 6-10 are yours, I rebased and revisited them. Any changes are recorded in per-patch changelogs.
Patch 11 simplifies fetch_set_cache() and fetch_rule_cache() functions as they no longer have to be aware of previous invocations.
Patch 12 improves NFT_CL_FAKE integration considerably, easily possible now that there is nft_cache_level_set() function.
Patch 13 introduces an embedded struct into struct nft_handle which holds cache requirements collected from parsed commands. At first there is just the desired cache level, further patches extend it.
Patches 14-16 re-establish per table/chain cache.
Patch 17 reduces cache requirements for flush command by making nft_xt_builtin_init() cache-aware.
Patch 18 fixes the segfault reported in nfbz#1407.
Pablo Neira Ayuso (5):
nft: split parsing from netlink commands
nft: calculate cache requirements from list of commands
nft: restore among support
nft: remove cache build calls
nft: missing nft_fini() call in bridge family
Phil Sutter (13):
ebtables-restore: Drop custom table flush routine
nft: cache: Eliminate init_chain_cache()
nft: cache: Init per table set list along with chain list
nft: cache: Fetch sets per table
ebtables-restore: Table line to trigger implicit commit
nft: cache: Simplify rule and set fetchers
nft: cache: Improve fake cache integration
nft: cache: Introduce struct nft_cache_req
nft-cache: Fetch cache per table
nft-cache: Introduce __fetch_chain_cache()
nft: cache: Fetch cache for specific chains
nft: cache: Optimize caching for flush command
nft: Fix for '-F' in iptables dumps
iptables/Makefile.am | 2 +- iptables/nft-arp.c | 5 +- iptables/nft-bridge.c | 18 +- iptables/nft-cache.c | 318 +++++++------- iptables/nft-cache.h | 6 +- iptables/nft-cmd.c | 387 ++++++++++++++++++ iptables/nft-cmd.h | 79 ++++ iptables/nft-shared.c | 6 +- iptables/nft-shared.h | 4 +- iptables/nft.c | 369 ++++++++++++----- iptables/nft.h | 62 ++- .../testcases/ip6tables/0004-return-codes_0 | 1 + .../testcases/iptables/0004-return-codes_0 | 6 + .../testcases/nft-only/0006-policy-override_0 | 29 ++ iptables/xtables-arp.c | 26 +- iptables/xtables-eb-standalone.c | 2 + iptables/xtables-eb.c | 26 +- iptables/xtables-restore.c | 126 +----- iptables/xtables-save.c | 3 + iptables/xtables.c | 57 ++- 20 files changed, 1100 insertions(+), 432 deletions(-) create mode 100644 iptables/nft-cmd.c create mode 100644 iptables/nft-cmd.h create mode 100755 iptables/tests/shell/testcases/nft-only/0006-policy-override_0
Signature · 1 line
2.25.1