summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/raw_ip6.h
diff options
context:
space:
mode:
authorae <ae@FreeBSD.org>2013-07-09 09:54:54 +0000
committerae <ae@FreeBSD.org>2013-07-09 09:54:54 +0000
commite5b002a3b846f3fa0b14374e1b0d808d000cdc8d (patch)
tree4dab69938b5c5c45e03f05d5cea4786a9c644184 /sys/netinet6/raw_ip6.h
parent705a50a05300cbec6176269dfe8b9e5ae0b12dab (diff)
downloadFreeBSD-src-e5b002a3b846f3fa0b14374e1b0d808d000cdc8d.zip
FreeBSD-src-e5b002a3b846f3fa0b14374e1b0d808d000cdc8d.tar.gz
Migrate structs ip6stat, icmp6stat and rip6stat to PCPU counters.
Diffstat (limited to 'sys/netinet6/raw_ip6.h')
-rw-r--r--sys/netinet6/raw_ip6.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/netinet6/raw_ip6.h b/sys/netinet6/raw_ip6.h
index 265d578..5eec5ff 100644
--- a/sys/netinet6/raw_ip6.h
+++ b/sys/netinet6/raw_ip6.h
@@ -48,10 +48,12 @@ struct rip6stat {
};
#ifdef _KERNEL
-#define RIP6STAT_ADD(name, val) V_rip6stat.name += (val)
+#include <sys/counter.h>
+
+VNET_PCPUSTAT_DECLARE(struct rip6stat, rip6stat);
+#define RIP6STAT_ADD(name, val) \
+ VNET_PCPUSTAT_ADD(struct rip6stat, rip6stat, name, (val))
#define RIP6STAT_INC(name) RIP6STAT_ADD(name, 1)
-VNET_DECLARE(struct rip6stat, rip6stat);
-#define V_rip6stat VNET(rip6stat)
-#endif
+#endif /* _KERNEL */
#endif
OpenPOWER on IntegriCloud