summaryrefslogtreecommitdiffstats
path: root/include/rule.h
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2021-04-29 21:55:34 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2021-05-02 23:30:35 +0200
commiteac934393c18c094da3dba2131340f3a82459d97 (patch)
tree53f30be475a394382ee905bfd5536c659bfc1a4e /include/rule.h
parent1f4b36a18d945fced71bdfc0a2e369c44b8d8fe3 (diff)
src: consolidate object cache infrastructure
This patch consolidates the object cache infrastructure. Update set and chains to use it. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/rule.h')
-rw-r--r--include/rule.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/include/rule.h b/include/rule.h
index 7896eafe..b238c85b 100644
--- a/include/rule.h
+++ b/include/rule.h
@@ -155,11 +155,9 @@ struct table {
struct handle handle;
struct location location;
struct scope scope;
- struct list_head *cache_chain_ht;
- struct list_head cache_chain;
+ struct cache chain_cache;
+ struct cache set_cache;
struct list_head chains;
- struct list_head *cache_set_ht;
- struct list_head cache_set;
struct list_head sets;
struct list_head objs;
struct list_head flowtables;
@@ -233,8 +231,7 @@ struct hook_spec {
*/
struct chain {
struct list_head list;
- struct list_head cache_hlist;
- struct list_head cache_list;
+ struct cache_item cache;
struct handle handle;
struct location location;
unsigned int refcnt;
@@ -333,8 +330,7 @@ void rule_stmt_insert_at(struct rule *rule, struct stmt *nstmt,
*/
struct set {
struct list_head list;
- struct list_head cache_hlist;
- struct list_head cache_list;
+ struct cache_item cache;
struct handle handle;
struct location location;
unsigned int refcnt;