netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Patrick McHardy <kaber@trash.net>
Cc: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>,
	ana@soleta.eu,
	Netfilter Development Mailing list
	<netfilter-devel@vger.kernel.org>
Subject: Re: Accounting objects support in nft
Date: Mon, 12 Jan 2015 14:38:14 +0100	[thread overview]
Message-ID: <20150112133814.GA3669@salvia> (raw)
In-Reply-To: <20150112123711.GL3491@acer.localdomain>

On Mon, Jan 12, 2015 at 12:37:11PM +0000, Patrick McHardy wrote:
> On 12.01, Pablo Neira Ayuso wrote:
> > On Mon, Jan 12, 2015 at 12:48:35PM +0100, Arturo Borrero Gonzalez wrote:
> > > On 12 January 2015 at 11:55,  <ana@soleta.eu> wrote:
> > > >
> > > > table ip filter {
> > > >         acct http-traffic { pkts 779 bytes 99495}
> > > >         acct https-traffic { pkts 189 bytes 37824}
> > > >
> > > >         chain output {
> > > >              type filter hook output priority 0;
> > > >              tcp dport http acct http-traffic
> > > >              tcp dport https acct https-traffic
> > > >         }
> > > > }
> > > >
> > >
> > > Interesting, Ana!
> > >
> > > I understand that acct objects are bounded to a table/family.
> > > Why not make them globals? So we could increment same counters from
> > > different families/tables.
> > 
> > Indeed. The existing binding between acct and tables is superfluous.
> > With sets, we need that to check for loops in verdict maps.
> > 
> > So counters can become also top-level identifier as it happens with
> > tables, ie.
> > 
> > counters {
> >         http-traffic { pkts 779 bytes 99495}
> >         acct https-traffic { pkts 189 bytes 37824}
> > }
> > 
> > table ip filter {
> >         chain output {
> >              type filter hook output priority 0;
> >              tcp dport http counter http-traffic
> >              tcp dport https counter https-traffic
> >         }
> > }
> > 
> > Patrick, any comment on that?
> 
> I'm unsure, we don't have any global objects so far, this might open
> another can of flushing/ordering etc problems. If it works without
> problems, I can see both variants being useful. Given that we only
> need a list to store them we might be able to support both by minor
> adjustments to the lookup function.
> 
> If we do actually want to support both, I'd suggest to start using
> just table scope and expand it later.

Agreed.

  reply	other threads:[~2015-01-12 13:35 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-12 10:55 Accounting objects support in nft ana
     [not found] ` <cover.1421059771.git.ana@soleta.eu>
2015-01-12 10:55   ` [nf-next] netfilter: acct: add support to accounters in nftables ana
2015-01-12 11:31     ` Pablo Neira Ayuso
2015-01-12 11:45       ` Patrick McHardy
2015-01-12 12:27         ` Pablo Neira Ayuso
2015-01-12 12:33           ` Patrick McHardy
2015-01-12 12:59             ` Patrick McHardy
2015-01-13 18:01               ` Patrick McHardy
2015-01-12 11:42     ` Patrick McHardy
     [not found] ` <cover.1421059891.git.ana@soleta.eu>
2015-01-12 10:55   ` [libnftnl] src: Add accounters support ana
2015-01-12 10:55 ` [nft 1/2] src: Add the accounter support ana
2015-01-12 10:55 ` [nft 2/2] tests: regression: Accounter support ana
2015-01-12 11:39 ` Accounting objects support in nft Patrick McHardy
2015-01-12 12:19   ` Pablo Neira Ayuso
2015-01-12 11:48 ` Arturo Borrero Gonzalez
2015-01-12 12:35   ` Pablo Neira Ayuso
2015-01-12 12:37     ` Patrick McHardy
2015-01-12 13:38       ` Pablo Neira Ayuso [this message]
2015-01-12 20:43       ` Arturo Borrero Gonzalez
2015-01-13  8:25         ` Ana Rey

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=20150112133814.GA3669@salvia \
    --to=pablo@netfilter.org \
    --cc=ana@soleta.eu \
    --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).