diff options
author | ae <ae@FreeBSD.org> | 2013-07-09 09:54:54 +0000 |
---|---|---|
committer | ae <ae@FreeBSD.org> | 2013-07-09 09:54:54 +0000 |
commit | e5b002a3b846f3fa0b14374e1b0d808d000cdc8d (patch) | |
tree | 4dab69938b5c5c45e03f05d5cea4786a9c644184 /sys/netinet/icmp6.h | |
parent | 705a50a05300cbec6176269dfe8b9e5ae0b12dab (diff) | |
download | FreeBSD-src-e5b002a3b846f3fa0b14374e1b0d808d000cdc8d.zip FreeBSD-src-e5b002a3b846f3fa0b14374e1b0d808d000cdc8d.tar.gz |
Migrate structs ip6stat, icmp6stat and rip6stat to PCPU counters.
Diffstat (limited to 'sys/netinet/icmp6.h')
-rw-r--r-- | sys/netinet/icmp6.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/netinet/icmp6.h b/sys/netinet/icmp6.h index 3508276..50d480c 100644 --- a/sys/netinet/icmp6.h +++ b/sys/netinet/icmp6.h @@ -617,19 +617,23 @@ struct icmp6stat { }; #ifdef _KERNEL +#include <sys/counter.h> + +VNET_PCPUSTAT_DECLARE(struct icmp6stat, icmp6stat); /* * In-kernel consumers can use these accessor macros directly to update * stats. */ -#define ICMP6STAT_ADD(name, val) V_icmp6stat.name += (val) +#define ICMP6STAT_ADD(name, val) \ + VNET_PCPUSTAT_ADD(struct icmp6stat, icmp6stat, name, (val)) #define ICMP6STAT_INC(name) ICMP6STAT_ADD(name, 1) /* * Kernel module consumers must use this accessor macro. */ void kmod_icmp6stat_inc(int statnum); -#define KMOD_ICMP6STAT_INC(name) \ - kmod_icmp6stat_inc(offsetof(struct icmp6stat, name) / sizeof(u_quad_t)) +#define KMOD_ICMP6STAT_INC(name) \ + kmod_icmp6stat_inc(offsetof(struct icmp6stat, name) / sizeof(uint64_t)) #endif /* |