diff options
-rw-r--r-- | include/net/ipv6.h | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 47a76bfbf763..d0538dd2c44b 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -110,17 +110,19 @@ struct frag_hdr { | |||
110 | extern int sysctl_mld_max_msf; | 110 | extern int sysctl_mld_max_msf; |
111 | extern struct ctl_path net_ipv6_ctl_path[]; | 111 | extern struct ctl_path net_ipv6_ctl_path[]; |
112 | 112 | ||
113 | #define _DEVINC(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); \ | ||
116 | if (likely(_idev != NULL)) \ | 117 | if (likely(_idev != NULL)) \ |
117 | SNMP_INC_STATS##modifier((_idev)->stats.statname, (field)); \ | 118 | SNMP_INC_STATS##modifier((_idev)->stats.statname, (field)); \ |
118 | SNMP_INC_STATS##modifier(statname##_statistics, (field)); \ | 119 | SNMP_INC_STATS##modifier(statname##_statistics, (field)); \ |
119 | }) | 120 | }) |
120 | 121 | ||
121 | #define _DEVADD(statname, modifier, idev, field, val) \ | 122 | #define _DEVADD(net, statname, modifier, idev, field, val) \ |
122 | ({ \ | 123 | ({ \ |
123 | struct inet6_dev *_idev = (idev); \ | 124 | struct inet6_dev *_idev = (idev); \ |
125 | (void)(net); \ | ||
124 | if (likely(_idev != NULL)) \ | 126 | if (likely(_idev != NULL)) \ |
125 | SNMP_ADD_STATS##modifier((_idev)->stats.statname, (field), (val)); \ | 127 | SNMP_ADD_STATS##modifier((_idev)->stats.statname, (field), (val)); \ |
126 | SNMP_ADD_STATS##modifier(statname##_statistics, (field), (val));\ | 128 | SNMP_ADD_STATS##modifier(statname##_statistics, (field), (val));\ |
@@ -129,27 +131,27 @@ extern struct ctl_path net_ipv6_ctl_path[]; | |||
129 | /* MIBs */ | 131 | /* MIBs */ |
130 | DECLARE_SNMP_STAT(struct ipstats_mib, ipv6_statistics); | 132 | DECLARE_SNMP_STAT(struct ipstats_mib, ipv6_statistics); |
131 | 133 | ||
132 | #define IP6_INC_STATS(net, idev,field) ({ (void)(net); \ | 134 | #define IP6_INC_STATS(net, idev,field) \ |
133 | _DEVINC(ipv6, , idev, field); }) | 135 | _DEVINC(net, ipv6, , idev, field) |
134 | #define IP6_INC_STATS_BH(net, idev,field) ({ (void)(net); \ | 136 | #define IP6_INC_STATS_BH(net, idev,field) \ |
135 | _DEVINC(ipv6, _BH, idev, field); }) | 137 | _DEVINC(net, ipv6, _BH, idev, field) |
136 | #define IP6_ADD_STATS_BH(net, idev,field,val) ({ (void)(net); \ | 138 | #define IP6_ADD_STATS_BH(net, idev,field,val) \ |
137 | _DEVADD(ipv6, _BH, idev, field, val); }) | 139 | _DEVADD(net, ipv6, _BH, idev, field, val) |
138 | 140 | ||
139 | DECLARE_SNMP_STAT(struct icmpv6_mib, icmpv6_statistics); | 141 | DECLARE_SNMP_STAT(struct icmpv6_mib, icmpv6_statistics); |
140 | DECLARE_SNMP_STAT(struct icmpv6msg_mib, icmpv6msg_statistics); | 142 | DECLARE_SNMP_STAT(struct icmpv6msg_mib, icmpv6msg_statistics); |
141 | 143 | ||
142 | #define ICMP6_INC_STATS(net, idev, field) ({ (void)(net); \ | 144 | #define ICMP6_INC_STATS(net, idev, field) \ |
143 | _DEVINC(icmpv6, , idev, field); }) | 145 | _DEVINC(net, icmpv6, , idev, field) |
144 | #define ICMP6_INC_STATS_BH(net, idev, field) ({ (void)(net); \ | 146 | #define ICMP6_INC_STATS_BH(net, idev, field) \ |
145 | _DEVINC(icmpv6, _BH, idev, field); }) | 147 | _DEVINC(net, icmpv6, _BH, idev, field) |
146 | 148 | ||
147 | #define ICMP6MSGOUT_INC_STATS(net, idev, field) ({ (void)(net); \ | 149 | #define ICMP6MSGOUT_INC_STATS(net, idev, field) \ |
148 | _DEVINC(icmpv6msg, , idev, field +256); }) | 150 | _DEVINC(net, icmpv6msg, , idev, field +256) |
149 | #define ICMP6MSGOUT_INC_STATS_BH(net, idev, field) ({ (void)(net); \ | 151 | #define ICMP6MSGOUT_INC_STATS_BH(net, idev, field) \ |
150 | _DEVINC(icmpv6msg, _BH, idev, field +256); }) | 152 | _DEVINC(net, icmpv6msg, _BH, idev, field +256) |
151 | #define ICMP6MSGIN_INC_STATS_BH(net, idev, field) ({ (void)(net); \ | 153 | #define ICMP6MSGIN_INC_STATS_BH(net, idev, field) \ |
152 | _DEVINC(icmpv6msg, _BH, idev, field); }) | 154 | _DEVINC(net, icmpv6msg, _BH, idev, field) |
153 | 155 | ||
154 | struct ip6_ra_chain | 156 | struct ip6_ra_chain |
155 | { | 157 | { |