From: Patrick McHardy <kaber@trash.net>
To: ana@soleta.eu
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [nf-next] netfilter: acct: add support to accounters in nftables
Date: Mon, 12 Jan 2015 11:42:31 +0000 [thread overview]
Message-ID: <20150112114230.GB3491@acer.localdomain> (raw)
In-Reply-To: <99c6e9b457ccc93fb761f6fa7f87fb9e6affc4ee.1421059771.git.ana@soleta.eu>
On 12.01, ana@soleta.eu wrote:
> From: Ana Rey <ana@soleta.eu>
>
> This adds accounting objects support to allow us to manipulate the nftables's
> extended accounting intraestructure.
>
> +/**
> + * struct nft_acct - nf_tables acct instance
> + *
> + * @list: table acct list node
> + * @name: name of the acct
> + * @pkts: number of packets
> + * @bytes: number of bytes
> + * use: number of rule references to this acct
> + */
> +struct nft_acct {
> + struct list_head list;
> + char name[NFT_ACCT_MAXNAMELEN];
> + atomic64_t pkts;
> + atomic64_t bytes;
> + u32 use;
> +};
Also I think it would be nice to use the same accounting structure
for regular counters and these counters regarding the accounting
part. I'm not saying we should necessarily use the nft_counter
variant with a seqlock, but whatever reasoning we use to decide
for one variant should fully apply to the other as well.
The nft_acct would then simply be a container with a list_head,
a use counter and an embedded nft counter structure.
next prev parent reply other threads:[~2015-01-12 11:42 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 [this message]
[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
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=20150112114230.GB3491@acer.localdomain \
--to=kaber@trash.net \
--cc=ana@soleta.eu \
--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).