summaryrefslogtreecommitdiffstats
path: root/include/rule.h
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2021-04-29 22:19:07 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2021-05-02 23:30:35 +0200
commit560963c4d41e153344850e8c98eaac4f131d05cb (patch)
tree4264e7aacfeba866e130e424eb70c85a386fd71a /include/rule.h
parent45a84088ecbdd7403de849e169fe2f57f34a8bf1 (diff)
cache: add hashtable cache for flowtable
Add flowtable hashtable cache. Actually I am not expecting that many flowtables to benefit from the hashtable to be created by streamline this code with tables, chains, sets and policy objects. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/rule.h')
-rw-r--r--include/rule.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/rule.h b/include/rule.h
index f264bc8a..c6fd4c4c 100644
--- a/include/rule.h
+++ b/include/rule.h
@@ -158,6 +158,7 @@ struct table {
struct cache chain_cache;
struct cache set_cache;
struct cache obj_cache;
+ struct cache ft_cache;
struct list_head chains;
struct list_head sets;
struct list_head objs;
@@ -516,6 +517,7 @@ uint32_t obj_type_to_cmd(uint32_t type);
struct flowtable {
struct list_head list;
+ struct cache_item cache;
struct handle handle;
struct scope scope;
struct location location;
@@ -531,8 +533,6 @@ struct flowtable {
extern struct flowtable *flowtable_alloc(const struct location *loc);
extern struct flowtable *flowtable_get(struct flowtable *flowtable);
extern void flowtable_free(struct flowtable *flowtable);
-extern void flowtable_add_hash(struct flowtable *flowtable, struct table *table);
-extern struct flowtable *flowtable_lookup(const struct table *table, const char *name);
extern struct flowtable *flowtable_lookup_fuzzy(const char *ft_name,
const struct nft_cache *cache,
const struct table **table);