diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2008-10-08 09:35:07 (GMT) |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2008-10-08 09:35:07 (GMT) |
commit | 0d55af8791bfb42e04cc456b348910582f230343 (patch) | |
tree | 619c5a6a46691ca90237d6ad239a4fb4391e61b9 /include/net/netfilter/nf_conntrack.h | |
parent | 6058fa6bb96a5b6145cba10c5171f09c2783ca69 (diff) | |
download | linux-fsl-qoriq-0d55af8791bfb42e04cc456b348910582f230343.tar.xz |
netfilter: netns nf_conntrack: per-netns statistics
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'include/net/netfilter/nf_conntrack.h')
-rw-r--r-- | include/net/netfilter/nf_conntrack.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h index f5447f1..c955610 100644 --- a/include/net/netfilter/nf_conntrack.h +++ b/include/net/netfilter/nf_conntrack.h @@ -290,12 +290,12 @@ extern unsigned int nf_conntrack_htable_size; extern int nf_conntrack_checksum; extern int nf_conntrack_max; -DECLARE_PER_CPU(struct ip_conntrack_stat, nf_conntrack_stat); -#define NF_CT_STAT_INC(count) (__get_cpu_var(nf_conntrack_stat).count++) -#define NF_CT_STAT_INC_ATOMIC(count) \ +#define NF_CT_STAT_INC(net, count) \ + (per_cpu_ptr((net)->ct.stat, raw_smp_processor_id())->count++) +#define NF_CT_STAT_INC_ATOMIC(net, count) \ do { \ local_bh_disable(); \ - __get_cpu_var(nf_conntrack_stat).count++; \ + per_cpu_ptr((net)->ct.stat, raw_smp_processor_id())->count++; \ local_bh_enable(); \ } while (0) |