diff options
author | Denis V. Lunev <den@openvz.org> | 2008-10-08 13:36:03 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-08 14:16:45 -0400 |
commit | 9261e53701121f83eb9482347d68833e95315362 (patch) | |
tree | 9e3ba61bb72233eb544bc22ebd29a0dafa90a89e /include/net/ipv6.h | |
parent | 087fe24033c4280a15b03cce41eaec844c92f8e5 (diff) |
ipv6: making ip and icmp statistics per/namespace
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ipv6.h')
-rw-r--r-- | include/net/ipv6.h | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index d0538dd2c44b..6d5b58a1c743 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -113,23 +113,20 @@ extern struct ctl_path net_ipv6_ctl_path[]; | |||
113 | #define _DEVINC(net, statname, modifier, idev, field) \ | 113 | #define _DEVINC(net, statname, modifier, idev, field) \ |
114 | ({ \ | 114 | ({ \ |
115 | struct inet6_dev *_idev = (idev); \ | 115 | struct inet6_dev *_idev = (idev); \ |
116 | (void)(net); \ | ||
117 | if (likely(_idev != NULL)) \ | 116 | if (likely(_idev != NULL)) \ |
118 | SNMP_INC_STATS##modifier((_idev)->stats.statname, (field)); \ | 117 | SNMP_INC_STATS##modifier((_idev)->stats.statname, (field)); \ |
119 | SNMP_INC_STATS##modifier(statname##_statistics, (field)); \ | 118 | SNMP_INC_STATS##modifier((net)->mib.statname##_statistics, (field));\ |
120 | }) | 119 | }) |
121 | 120 | ||
122 | #define _DEVADD(net, statname, modifier, idev, field, val) \ | 121 | #define _DEVADD(net, statname, modifier, idev, field, val) \ |
123 | ({ \ | 122 | ({ \ |
124 | struct inet6_dev *_idev = (idev); \ | 123 | struct inet6_dev *_idev = (idev); \ |
125 | (void)(net); \ | ||
126 | if (likely(_idev != NULL)) \ | 124 | if (likely(_idev != NULL)) \ |
127 | SNMP_ADD_STATS##modifier((_idev)->stats.statname, (field), (val)); \ | 125 | SNMP_ADD_STATS##modifier((_idev)->stats.statname, (field), (val)); \ |
128 | SNMP_ADD_STATS##modifier(statname##_statistics, (field), (val));\ | 126 | SNMP_ADD_STATS##modifier((net)->mib.statname##_statistics, (field), (val));\ |
129 | }) | 127 | }) |
130 | 128 | ||
131 | /* MIBs */ | 129 | /* MIBs */ |
132 | DECLARE_SNMP_STAT(struct ipstats_mib, ipv6_statistics); | ||
133 | 130 | ||
134 | #define IP6_INC_STATS(net, idev,field) \ | 131 | #define IP6_INC_STATS(net, idev,field) \ |
135 | _DEVINC(net, ipv6, , idev, field) | 132 | _DEVINC(net, ipv6, , idev, field) |
@@ -138,9 +135,6 @@ DECLARE_SNMP_STAT(struct ipstats_mib, ipv6_statistics); | |||
138 | #define IP6_ADD_STATS_BH(net, idev,field,val) \ | 135 | #define IP6_ADD_STATS_BH(net, idev,field,val) \ |
139 | _DEVADD(net, ipv6, _BH, idev, field, val) | 136 | _DEVADD(net, ipv6, _BH, idev, field, val) |
140 | 137 | ||
141 | DECLARE_SNMP_STAT(struct icmpv6_mib, icmpv6_statistics); | ||
142 | DECLARE_SNMP_STAT(struct icmpv6msg_mib, icmpv6msg_statistics); | ||
143 | |||
144 | #define ICMP6_INC_STATS(net, idev, field) \ | 138 | #define ICMP6_INC_STATS(net, idev, field) \ |
145 | _DEVINC(net, icmpv6, , idev, field) | 139 | _DEVINC(net, icmpv6, , idev, field) |
146 | #define ICMP6_INC_STATS_BH(net, idev, field) \ | 140 | #define ICMP6_INC_STATS_BH(net, idev, field) \ |