summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/netinet6/raw_ip6.h
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/sys/netinet6/raw_ip6.h')
-rw-r--r--freebsd/sys/netinet6/raw_ip6.h24
1 files changed, 13 insertions, 11 deletions
diff --git a/freebsd/sys/netinet6/raw_ip6.h b/freebsd/sys/netinet6/raw_ip6.h
index cc4bcdd0..5eec5fff 100644
--- a/freebsd/sys/netinet6/raw_ip6.h
+++ b/freebsd/sys/netinet6/raw_ip6.h
@@ -37,21 +37,23 @@
* ICMPv6 stat is counted separately. see netinet/icmp6.h
*/
struct rip6stat {
- u_quad_t rip6s_ipackets; /* total input packets */
- u_quad_t rip6s_isum; /* input checksum computations */
- u_quad_t rip6s_badsum; /* of above, checksum error */
- u_quad_t rip6s_nosock; /* no matching socket */
- u_quad_t rip6s_nosockmcast; /* of above, arrived as multicast */
- u_quad_t rip6s_fullsock; /* not delivered, input socket full */
+ uint64_t rip6s_ipackets; /* total input packets */
+ uint64_t rip6s_isum; /* input checksum computations */
+ uint64_t rip6s_badsum; /* of above, checksum error */
+ uint64_t rip6s_nosock; /* no matching socket */
+ uint64_t rip6s_nosockmcast; /* of above, arrived as multicast */
+ uint64_t rip6s_fullsock; /* not delivered, input socket full */
- u_quad_t rip6s_opackets; /* total output packets */
+ uint64_t rip6s_opackets; /* total output packets */
};
#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