aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2008-10-08 05:35:07 -0400
committerPatrick McHardy <kaber@trash.net>2008-10-08 05:35:07 -0400
commit0d55af8791bfb42e04cc456b348910582f230343 (patch)
tree619c5a6a46691ca90237d6ad239a4fb4391e61b9 /include/net
parent6058fa6bb96a5b6145cba10c5171f09c2783ca69 (diff)
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')
-rw-r--r--include/net/netfilter/nf_conntrack.h8
-rw-r--r--include/net/netns/conntrack.h1
2 files changed, 5 insertions, 4 deletions
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h
index f5447f143047..c95561050f78 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;
290extern int nf_conntrack_checksum; 290extern int nf_conntrack_checksum;
291extern int nf_conntrack_max; 291extern int nf_conntrack_max;
292 292
293DECLARE_PER_CPU(struct ip_conntrack_stat, nf_conntrack_stat); 293#define NF_CT_STAT_INC(net, count) \
294#define NF_CT_STAT_INC(count) (__get_cpu_var(nf_conntrack_stat).count++) 294 (per_cpu_ptr((net)->ct.stat, raw_smp_processor_id())->count++)
295#define NF_CT_STAT_INC_ATOMIC(count) \ 295#define NF_CT_STAT_INC_ATOMIC(net, count) \
296do { \ 296do { \
297 local_bh_disable(); \ 297 local_bh_disable(); \
298 __get_cpu_var(nf_conntrack_stat).count++; \ 298 per_cpu_ptr((net)->ct.stat, raw_smp_processor_id())->count++; \
299 local_bh_enable(); \ 299 local_bh_enable(); \
300} while (0) 300} while (0)
301 301
diff --git a/include/net/netns/conntrack.h b/include/net/netns/conntrack.h
index 9d5c1623c51f..fc0a46d64cc9 100644
--- a/include/net/netns/conntrack.h
+++ b/include/net/netns/conntrack.h
@@ -12,6 +12,7 @@ struct netns_ct {
12 struct hlist_head *hash; 12 struct hlist_head *hash;
13 struct hlist_head *expect_hash; 13 struct hlist_head *expect_hash;
14 struct hlist_head unconfirmed; 14 struct hlist_head unconfirmed;
15 struct ip_conntrack_stat *stat;
15#ifdef CONFIG_NF_CONNTRACK_EVENTS 16#ifdef CONFIG_NF_CONNTRACK_EVENTS
16 struct nf_conntrack_ecache *ecache; 17 struct nf_conntrack_ecache *ecache;
17#endif 18#endif