aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/ipv6.h
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2008-10-08 13:35:11 -0400
committerDavid S. Miller <davem@davemloft.net>2008-10-08 14:16:19 -0400
commit087fe24033c4280a15b03cce41eaec844c92f8e5 (patch)
tree3e925e02c9a224c354faafd5b742c73e43e5f598 /include/net/ipv6.h
parent55d43808eb26e689dacb95b11f956a3b1a56a5f3 (diff)
ipv6: added net argument to _DEVINC/_DEVADD
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.h40
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 {
110extern int sysctl_mld_max_msf; 110extern int sysctl_mld_max_msf;
111extern struct ctl_path net_ipv6_ctl_path[]; 111extern 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 */
130DECLARE_SNMP_STAT(struct ipstats_mib, ipv6_statistics); 132DECLARE_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
139DECLARE_SNMP_STAT(struct icmpv6_mib, icmpv6_statistics); 141DECLARE_SNMP_STAT(struct icmpv6_mib, icmpv6_statistics);
140DECLARE_SNMP_STAT(struct icmpv6msg_mib, icmpv6msg_statistics); 142DECLARE_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
154struct ip6_ra_chain 156struct ip6_ra_chain
155{ 157{