diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2020-07-28 17:57:20 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2020-07-29 23:40:58 +0200 |
commit | ac4b25b3ca045fbbed86773a91da52d9d7ee3091 (patch) | |
tree | 57024629c8e76a4ce911c84a0a209c3332cef2ff /include/rule.h | |
parent | 8eece29518257536711657c42047f14e22a7e8f2 (diff) |
src: remove cache lookups after the evaluation phase
This patch adds a new field to the cmd structure for elements to store a
reference to the set. This saves an extra lookup in the netlink bytecode
generation step.
This patch also allows to incrementally update during the evaluation
phase according to the command actions, which is required by the follow
up ("evaluate: remove table from cache on delete table") bugfix patch.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/rule.h')
-rw-r--r-- | include/rule.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/rule.h b/include/rule.h index 4de7a0d9..60eadfa3 100644 --- a/include/rule.h +++ b/include/rule.h @@ -683,6 +683,10 @@ struct cmd { void *data; struct expr *expr; struct set *set; + struct { + struct expr *expr; /* same offset as cmd->expr */ + struct set *set; + } elem; struct rule *rule; struct chain *chain; struct table *table; |