From a3ac2527724dd27628e12caaa55f731b109e4586 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Thu, 1 Apr 2021 22:19:30 +0200 Subject: src: split chain list in table This patch splits table->lists in two: - Chains that reside in the cache are stored in the new tables->cache_chain and tables->cache_chain_ht. The hashtable chain cache allows for fast chain lookups. - Chains that defined via command line / ruleset file reside in tables->chains. Note that chains in the cache (already in the kernel) are not placed in the table->chains. By keeping separated lists, chains defined via command line / ruleset file can be added to cache. Signed-off-by: Pablo Neira Ayuso --- include/rule.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/rule.h b/include/rule.h index f8e61512..6c6ada6b 100644 --- a/include/rule.h +++ b/include/rule.h @@ -156,6 +156,7 @@ struct table { struct location location; struct scope scope; struct list_head *cache_chain_ht; + struct list_head cache_chain; struct list_head chains; struct list_head sets; struct list_head objs; @@ -231,6 +232,7 @@ struct hook_spec { struct chain { struct list_head list; struct list_head cache_hlist; + struct list_head cache_list; struct handle handle; struct location location; unsigned int refcnt; -- cgit v1.2.3