From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Cc: netfilter-devel@vger.kernel.org, kaber@trash.net
Subject: Re: [nft RFC PATCH] src: add set optimization options
Date: Wed, 3 Sep 2014 12:09:59 +0200 [thread overview]
Message-ID: <20140903100959.GA17083@salvia> (raw)
In-Reply-To: <20140813081649.25737.82564.stgit@nfdev.cica.es>
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?
> Also valid for maps:
>
> nft add map filter map1 { type ipv4_addr : verdict policy performace ; }
> [...]
>
>
> This is the output format, which can be imported later with `nft -f':
>
> table filter {
> set set1 {
> type ipv4_addr policy memory size 1024
> }
> }
>
> Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
> ---
>
> This is my proposal for set internal mechanism selection in nft.
>
> My idea is: given the kernel uses optional arguments to choose the
> set mechanism, in userspace the configuration should be also optional.
>
> The patch is not fully tested, there are still some issues; It seems that the
> kernel is lacking some details.
> For example, it doesn't dump back to userspace the policy configuration.
>
> In my opinion, we should be able to inform userspace of the configuration, in a
> way that userspace can differentiate between default values and fixed ones.
> For example, NFT_SET_POL_PERFORMANCE seems to be the default in kernel, but
> we don't want every set to be printed with "policy performance".
>
> Please, feel free to comment.
Just one minor comment:
struct {
uint32_t flags;
uint32_t policy;
struct {
uint32_t size;
} desc;
} mechanism;
};
I prefer if you map 1:1 what we have in the kernel:
struct set {
...
uint32_t policy;
struct {
uint32_t size;
uint32_t flags;
} desc;
};
Thanks!
next prev parent reply other threads:[~2014-09-03 10:09 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 [this message]
2014-09-03 10:22 ` Patrick McHardy
2014-09-12 18:35 ` Arturo Borrero Gonzalez
2014-09-12 18:45 ` Patrick McHardy
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=20140903100959.GA17083@salvia \
--to=pablo@netfilter.org \
--cc=arturo.borrero.glez@gmail.com \
--cc=kaber@trash.net \
--cc=netfilter-devel@vger.kernel.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).