netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nft] evaluate: Remove cache_update() in cmd_evaluate_flush()
@ 2017-01-05 18:38 Elise Lennion
  2017-01-05 20:32 ` Anatole Denis
  0 siblings, 1 reply; 2+ messages in thread
From: Elise Lennion @ 2017-01-05 18:38 UTC (permalink / raw)
  To: pablo; +Cc: netfilter-devel, anatole

cache_update() fetches set elements, when the set is big and sorted
this leads to an unnecessary delay on 'nft flush ruleset'.

There is only a possible call to cache_flush() after the update, so
this update isn't needed.

Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
---
 src/evaluate.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/src/evaluate.c b/src/evaluate.c
index cebc5a9..a506f9a 100644
--- a/src/evaluate.c
+++ b/src/evaluate.c
@@ -2951,12 +2951,6 @@ static int cmd_evaluate_list(struct eval_ctx *ctx, struct cmd *cmd)
 
 static int cmd_evaluate_flush(struct eval_ctx *ctx, struct cmd *cmd)
 {
-	int ret;
-
-	ret = cache_update(cmd->op, ctx->msgs);
-	if (ret < 0)
-		return ret;
-
 	switch (cmd->obj) {
 	case CMD_OBJ_RULESET:
 		cache_flush();
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-01-05 20:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-05 18:38 [PATCH nft] evaluate: Remove cache_update() in cmd_evaluate_flush() Elise Lennion
2017-01-05 20:32 ` Anatole Denis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).