aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/ipv6.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/ipv6.h')
-rw-r--r--include/net/ipv6.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index 0b8c9b990ac4..3c266ad99a02 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -113,9 +113,24 @@ extern int sysctl_mld_max_msf;
113 113
114/* MIBs */ 114/* MIBs */
115DECLARE_SNMP_STAT(struct ipstats_mib, ipv6_statistics); 115DECLARE_SNMP_STAT(struct ipstats_mib, ipv6_statistics);
116#define IP6_INC_STATS(field) SNMP_INC_STATS(ipv6_statistics, field) 116#define IP6_INC_STATS(idev,field) ({ \
117#define IP6_INC_STATS_BH(field) SNMP_INC_STATS_BH(ipv6_statistics, field) 117 struct inet6_dev *_idev = (idev); \
118#define IP6_INC_STATS_USER(field) SNMP_INC_STATS_USER(ipv6_statistics, field) 118 if (likely(_idev != NULL)) \
119 SNMP_INC_STATS(_idev->stats.ipv6, field); \
120 SNMP_INC_STATS(ipv6_statistics, field); \
121})
122#define IP6_INC_STATS_BH(idev,field) ({ \
123 struct inet6_dev *_idev = (idev); \
124 if (likely(_idev != NULL)) \
125 SNMP_INC_STATS_BH(_idev->stats.ipv6, field); \
126 SNMP_INC_STATS_BH(ipv6_statistics, field); \
127})
128#define IP6_INC_STATS_USER(idev,field) ({ \
129 struct inet6_dev *_idev = (idev); \
130 if (likely(_idev != NULL)) \
131 SNMP_INC_STATS_USER(_idev->stats.ipv6, field); \
132 SNMP_INC_STATS_USER(ipv6_statistics, field); \
133})
119DECLARE_SNMP_STAT(struct icmpv6_mib, icmpv6_statistics); 134DECLARE_SNMP_STAT(struct icmpv6_mib, icmpv6_statistics);
120#define ICMP6_INC_STATS(idev, field) ({ \ 135#define ICMP6_INC_STATS(idev, field) ({ \
121 struct inet6_dev *_idev = (idev); \ 136 struct inet6_dev *_idev = (idev); \