From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Arturo Borrero Gonzalez <arturo@netfilter.org>
Cc: Tomas Mudrunka <mudrunka@spoje.net>,
Netfilter Users Mailing list <netfilter@vger.kernel.org>
Subject: Re: Counters for individual elements in maps and sets?
Date: Fri, 10 Nov 2017 08:07:50 +0100 [thread overview]
Message-ID: <20171110070750.GA6027@salvia> (raw)
In-Reply-To: <CAOkSjBhjbdmBw3QgHDcRjuO6KfVfWEhT5Owrdkx3=bkhCH1FKQ@mail.gmail.com>
On Tue, Nov 07, 2017 at 07:44:13PM +0100, Arturo Borrero Gonzalez wrote:
> On 7 November 2017 at 14:09, Tomas Mudrunka <mudrunka@spoje.net> wrote:
> > Hello,
> > i've figured it's possible to simplify my rules by using maps and sets
> > instead of using individual rules, but i need to account traffic for each
> > address in the map separately. Maybe this can be implemented using flags in
> > map/set, so i will be able to enable it like this:
> >
> > map prometheus {
> > type ipv4_addr : classid;
> > flags interval, counter;
> > elements = {
> > 1.1.1.2 : 2:2222 counter packets 10 bytes 5120,
> > 1.1.1.3 : 3:3333 counter packets 3 bytes 489
> > }
> > }
> >
> > just to make it clear, the same map without counters looks like this right
> > now:
> >
> > map prometheus {
> > type ipv4_addr : classid
> > flags interval
> > elements = {
> > 1.1.1.2 : 2:2222,
> > 1.1.1.3 : 3:3333
> > }
> > }
> >
> >
> > Will it be ever possible to have per element counters for maps and sets?
> >
>
> you are probably looking for something like this:
> https://wiki.nftables.org/wiki-nftables/index.php/Flow_tables
This looks like a different usecase we don't support yet, that doesn't
fit into flow tables.
There's a ticket in bugzilla asking for something like this, we plan
to add support for this indeed.
next prev parent reply other threads:[~2017-11-10 7:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-07 13:09 Counters for individual elements in maps and sets? Tomas Mudrunka
2017-11-07 18:44 ` Arturo Borrero Gonzalez
2017-11-10 7:07 ` Pablo Neira Ayuso [this message]
2017-11-10 13:09 ` Tomas Mudrunka
2017-11-11 20:29 ` Raymond Burkholder
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=20171110070750.GA6027@salvia \
--to=pablo@netfilter.org \
--cc=arturo@netfilter.org \
--cc=mudrunka@spoje.net \
--cc=netfilter@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