diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2008-11-25 20:59:52 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-25 20:59:52 -0500 |
commit | 59c9940ed0ef026673cac52f2eaed77af7d486da (patch) | |
tree | d7d4e38e693178f16000eaa5ae03f415f3197f7a /include/net | |
parent | 4fb236bac9fc7d51e2267866de6d4c30e549d2f8 (diff) |
netns xfrm: per-netns MIBs
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/netns/mib.h | 3 | ||||
-rw-r--r-- | include/net/xfrm.h | 13 |
2 files changed, 9 insertions, 7 deletions
diff --git a/include/net/netns/mib.h b/include/net/netns/mib.h index 10cb7c336de5..0b44112e2366 100644 --- a/include/net/netns/mib.h +++ b/include/net/netns/mib.h | |||
@@ -20,6 +20,9 @@ struct netns_mib { | |||
20 | DEFINE_SNMP_STAT(struct icmpv6_mib, icmpv6_statistics); | 20 | DEFINE_SNMP_STAT(struct icmpv6_mib, icmpv6_statistics); |
21 | DEFINE_SNMP_STAT(struct icmpv6msg_mib, icmpv6msg_statistics); | 21 | DEFINE_SNMP_STAT(struct icmpv6msg_mib, icmpv6msg_statistics); |
22 | #endif | 22 | #endif |
23 | #ifdef CONFIG_XFRM_STATISTICS | ||
24 | DEFINE_SNMP_STAT(struct linux_xfrm_mib, xfrm_statistics); | ||
25 | #endif | ||
23 | }; | 26 | }; |
24 | 27 | ||
25 | #endif | 28 | #endif |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index d076f3d34278..78ec3e8a95ed 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -38,14 +38,13 @@ | |||
38 | MODULE_ALIAS("xfrm-type-" __stringify(family) "-" __stringify(proto)) | 38 | MODULE_ALIAS("xfrm-type-" __stringify(family) "-" __stringify(proto)) |
39 | 39 | ||
40 | #ifdef CONFIG_XFRM_STATISTICS | 40 | #ifdef CONFIG_XFRM_STATISTICS |
41 | DECLARE_SNMP_STAT(struct linux_xfrm_mib, xfrm_statistics); | 41 | #define XFRM_INC_STATS(net, field) SNMP_INC_STATS((net)->mib.xfrm_statistics, field) |
42 | #define XFRM_INC_STATS(field) SNMP_INC_STATS(xfrm_statistics, field) | 42 | #define XFRM_INC_STATS_BH(net, field) SNMP_INC_STATS_BH((net)->mib.xfrm_statistics, field) |
43 | #define XFRM_INC_STATS_BH(field) SNMP_INC_STATS_BH(xfrm_statistics, field) | 43 | #define XFRM_INC_STATS_USER(net, field) SNMP_INC_STATS_USER((net)-mib.xfrm_statistics, field) |
44 | #define XFRM_INC_STATS_USER(field) SNMP_INC_STATS_USER(xfrm_statistics, field) | ||
45 | #else | 44 | #else |
46 | #define XFRM_INC_STATS(field) | 45 | #define XFRM_INC_STATS(net, field) ((void)(net)) |
47 | #define XFRM_INC_STATS_BH(field) | 46 | #define XFRM_INC_STATS_BH(net, field) ((void)(net)) |
48 | #define XFRM_INC_STATS_USER(field) | 47 | #define XFRM_INC_STATS_USER(net, field) ((void)(net)) |
49 | #endif | 48 | #endif |
50 | 49 | ||
51 | extern u32 sysctl_xfrm_aevent_etime; | 50 | extern u32 sysctl_xfrm_aevent_etime; |