netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [nft PATCH] Enable automerge feature for anonymous sets
@ 2018-02-06 18:18 Phil Sutter
  2018-02-06 23:39 ` Pablo Neira Ayuso
  2018-02-15 15:28 ` Pablo Neira Ayuso
  0 siblings, 2 replies; 5+ messages in thread
From: Phil Sutter @ 2018-02-06 18:18 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: netfilter-devel, Jeff Kletsky

Automatic merging of adjacent/overlapping ranges upon insertion has
clear benefits performance- and readability-wise. The drawbacks which
led to disabling it by default don't apply to anonymous sets since they
are read-only anyway, so enable this feature for them again.

Cc: Jeff Kletsky <netfilter@allycomm.com>
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 src/evaluate.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/evaluate.c b/src/evaluate.c
index aa7c28e8b00ff..076855e257e77 100644
--- a/src/evaluate.c
+++ b/src/evaluate.c
@@ -87,6 +87,7 @@ static struct expr *implicit_set_declaration(struct eval_ctx *ctx,
 	set->handle.set = xstrdup(name);
 	set->key	= key;
 	set->init	= expr;
+	set->automerge	= set->flags & NFT_SET_INTERVAL;
 
 	if (ctx->table != NULL)
 		list_add_tail(&set->list, &ctx->table->sets);
-- 
2.15.1


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

end of thread, other threads:[~2018-02-15 15:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-06 18:18 [nft PATCH] Enable automerge feature for anonymous sets Phil Sutter
2018-02-06 23:39 ` Pablo Neira Ayuso
2018-02-07  9:51   ` Jozsef Kadlecsik
2018-02-07  9:53   ` Phil Sutter
2018-02-15 15:28 ` Pablo Neira Ayuso

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).