diff options
Diffstat (limited to 'sys/netinet/ip_icmp.c')
-rw-r--r-- | sys/netinet/ip_icmp.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c index 39d6f7e..deabf44 100644 --- a/sys/netinet/ip_icmp.c +++ b/sys/netinet/ip_icmp.c @@ -92,9 +92,14 @@ SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, icmplim_output, CTLFLAG_RW, "Enable logging of ICMP response rate limiting"); #ifdef INET -VNET_DEFINE(struct icmpstat, icmpstat); -SYSCTL_VNET_STRUCT(_net_inet_icmp, ICMPCTL_STATS, stats, CTLFLAG_RW, - &VNET_NAME(icmpstat), icmpstat, ""); +VNET_PCPUSTAT_DEFINE(struct icmpstat, icmpstat); +VNET_PCPUSTAT_SYSINIT(icmpstat); +SYSCTL_VNET_PCPUSTAT(_net_inet_icmp, ICMPCTL_STATS, stats, struct icmpstat, + icmpstat, "ICMP statistics (struct icmpstat, netinet/icmp_var.h)"); + +#ifdef VIMAGE +VNET_PCPUSTAT_SYSUNINIT(icmpstat); +#endif /* VIMAGE */ static VNET_DEFINE(int, icmpmaskrepl) = 0; #define V_icmpmaskrepl VNET(icmpmaskrepl) @@ -197,7 +202,7 @@ void kmod_icmpstat_inc(int statnum) { - (*((u_long *)&V_icmpstat + statnum))++; + counter_u64_add(VNET(icmpstat)[statnum], 1); } /* |