From 01e5c6f0ed0315046537612f5a80e506d37a7f8e Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Mon, 17 Jun 2019 12:03:08 +0200 Subject: src: add cache level flags The score approach based on command type is confusing. This patch introduces cache level flags, each flag specifies what kind of object type is needed. These flags are set on/off depending on the list of commands coming in this batch. cache_is_complete() now checks if the cache contains the objects that are needed through these new flags. Signed-off-by: Pablo Neira Ayuso --- include/rule.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include/rule.h') diff --git a/include/rule.h b/include/rule.h index 299485ff..aefb24d9 100644 --- a/include/rule.h +++ b/include/rule.h @@ -462,7 +462,6 @@ enum cmd_ops { CMD_EXPORT, CMD_MONITOR, CMD_DESCRIBE, - __CMD_FLUSH_RULESET, }; /** @@ -636,7 +635,7 @@ extern struct error_record *rule_postprocess(struct rule *rule); struct netlink_ctx; extern int do_command(struct netlink_ctx *ctx, struct cmd *cmd); -extern int cache_evaluate(struct nft_ctx *nft, struct list_head *cmds); +extern unsigned int cache_evaluate(struct nft_ctx *nft, struct list_head *cmds); extern int cache_update(struct nft_ctx *ctx, enum cmd_ops cmd, struct list_head *msgs); extern void cache_flush(struct nft_ctx *ctx, struct list_head *msgs); -- cgit v1.2.3