Skip to content

cache consolidation

Pablo Neira Ayuso netfilter-devel 4 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest14 patches 0 repliesNew
  2. v416 patches 0 repliesSuperseded
  3. v37 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v17 patches2 repliesSuperseded

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14src: add cache infrastructure and use it for table objectsinclude/rule.h src/cli.c src/evaluate.c +2 more+86 -240 replies
2/14src: add cmd_evaluate_list()src/evaluate.c+23 -00 replies
3/14rule: add reference counter to the table objectinclude/rule.h src/rule.c+13 -00 replies
4/14src: add table declaration to cachesrc/evaluate.c src/rule.c+15 -150 replies
5/14src: use cache infrastructure for set objectssrc/evaluate.c src/rule.c+79 -860 replies
6/14src: add set declaration to cachesrc/evaluate.c+9 -00 replies
7/14src: early allocation of the set IDsrc/netlink.c src/rule.c+4 -40 replies
8/14rule: add chain reference counterinclude/rule.h src/rule.c+12 -00 replies
9/14src: use cache infrastructure for chain objectssrc/rule.c+22 -390 replies
10/14evaluate: add cmd_evaluate_rename()src/evaluate.c+20 -00 replies
11/14src: add chain declarations to cachesrc/evaluate.c+18 -20 replies
12/14src: use cache infrastructure for rule objectssrc/rule.c+12 -100 replies
13/14src: use cache infrastructure for set element objectssrc/rule.c+11 -250 replies
14/14src: get rid of EINTR handling for nft_netlink()src/main.c src/rule.c+6 -90 replies

Reviews trailers per patch

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

Read the v5 thread

Cover letter [PATCH nft v5 00/14] cache consolidation

Hi,

This is another round of the patchset to consolidate the nft cache:

http://marc.info/?l=netfilter-devel&m=143620630223923&w=2

The idea consists of creating a cache of tables that is populated with chains, rules, sets and elements.

The major change in this round is the fact that the cache is built later on from the evaluation step where we have more context on what is going on. At that stage, we know if this is a listing, in that case nft populates a full blown cache. Otherwise, it only retrieves the table and set objects which is the bare minimum that we require at this stage (at least by now). With the previous patchset, with inconditional full blown cache retrieval, I noticed a slowdown when working with large rulesets, so this new round patchset round addresses this.

In the interactive mode, this cache is refreshed for every command to make sure that we work with a ruleset that is current. We can avoid this by checking for the generation counter, but will be looking into how to speed up this with follow up patches when this is in master.

Comments welcome. Thanks.

Pablo Neira Ayuso (14):
src: add cache infrastructure and use it for table objects
src: add cmd_evaluate_list()
rule: add reference counter to the table object
src: add table declaration to cache
src: use cache infrastructure for set objects
src: add set declaration to cache
src: early allocation of the set ID
rule: add chain reference counter
src: use cache infrastructure for chain objects
evaluate: add cmd_evaluate_rename()
src: add chain declarations to cache
src: use cache infrastructure for rule objects
src: use cache infrastructure for set element objects
src: get rid of EINTR handling for nft_netlink()

 include/rule.h |    9 ++
 src/cli.c      |    1 +
 src/evaluate.c |  146 +++++++++++++++++-------
 src/main.c     |    7 +-
 src/netlink.c  |    4 -
 src/rule.c     |  337 ++++++++++++++++++++++++++++++++------------------------
 6 files changed, 310 insertions(+), 194 deletions(-)
Signature · 1 line
1.7.10.4