netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>,
	Netfilter Development Mailing list
	<netfilter-devel@vger.kernel.org>
Subject: Re: [nft RFC PATCH] src: add set optimization options
Date: Fri, 12 Sep 2014 19:45:31 +0100	[thread overview]
Message-ID: <20140912184530.GA3740@acer.localdomain> (raw)
In-Reply-To: <CAOkSjBiWRHDx13UW34gMa_wfD2VZseETE+BQss3Qi2JbhAcRCw@mail.gmail.com>

On Fri, Sep 12, 2014 at 08:35:03PM +0200, Arturo Borrero Gonzalez wrote:
> On 3 September 2014 12:22, Patrick McHardy <kaber@trash.net> wrote:
> > On Wed, Sep 03, 2014 at 12:09:59PM +0200, Pablo Neira Ayuso wrote:
> >> Cc'ing Patrick.
> >>
> >> On Wed, Aug 13, 2014 at 10:17:06AM +0200, Arturo Borrero Gonzalez wrote:
> >> > This patch adds options to choose set optimization mechanisms.
> >> >
> >> > The syntax is one of:
> >> >
> >> >  nft add set filter set1 { type ipv4_addr size 1024 ; }
> >> >  nft add set filter set1 { type ipv4_addr policy memory ; }
> >> >  nft add set filter set1 { type ipv4_addr policy performance ; }
> >> >  nft add set filter set1 { type ipv4_addr policy memory size 1024 ; }
> >> >  nft add set filter set1 { type ipv4_addr size 1024 policy memory ; }
> >> >  nft add set filter set1 { type ipv4_addr policy performance size 1024 ; }
> >> >  nft add set filter set1 { type ipv4_addr size 1024 policy performance ; }
> >>
> >> @Patrick: Does this syntax look reasonable to you?
> >
> > I think I would prefer having statements instead of everything combined.
> >
> 
> Could you please elaborate on this?

Something like this:

{
	type ipve_addr
	size 1024
	policy performance
}

or seperate by colons in case they are on a single line.

> >> > Also valid for maps:
> >> >
> >> >  nft add map filter map1 { type ipv4_addr : verdict policy performace ; }

This gets a bit unreadable so { type ipv4_addr : verdict; policy performance; }
seems better to me.

> > This is what I have in my patchset:
> >
> > +struct set_desc {
> > +       unsigned int            size;
> > +       struct expr             *range;
> > +};
> >
> > Range is another way to express the maximum size and at the same time a
> > common prefix.
> >
> > I can dust off my patch and send it later so we combine what we have.
> 
> Would you send that patch?

Yep, just started to work on my tree five minutes ago. I'll forward-port
everything and will send the patch once I'm done.

      reply	other threads:[~2014-09-12 18:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-13  8:17 [nft RFC PATCH] src: add set optimization options Arturo Borrero Gonzalez
2014-09-03 10:09 ` Pablo Neira Ayuso
2014-09-03 10:22   ` Patrick McHardy
2014-09-12 18:35     ` Arturo Borrero Gonzalez
2014-09-12 18:45       ` Patrick McHardy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140912184530.GA3740@acer.localdomain \
    --to=kaber@trash.net \
    --cc=arturo.borrero.glez@gmail.com \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).