From a0fe76973a89628bbcd7a93577076e67e111a4a4 Mon Sep 17 00:00:00 2001 From: Jeremie Courreges-Anglas Date: Sun, 5 Feb 2017 16:04:15 +0000 Subject: Use percpu counters for ip6stat Try to follow the existing examples. Some notes: - don't implement counters_dec() yet, which could be used in two similar chunks of code. Let's see if there are more users first. - stop incrementing IPv6-specific mbuf stats, IPv4 has no equivalent. Input from mpi@, ok bluhm@ mpi@ --- sys/netinet6/ip6_mroute.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/netinet6/ip6_mroute.c') diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c index 0abe20f8094..f767c07e198 100644 --- a/sys/netinet6/ip6_mroute.c +++ b/sys/netinet6/ip6_mroute.c @@ -873,7 +873,7 @@ ip6_mforward(struct ip6_hdr *ip6, struct ifnet *ifp, struct mbuf *m) * (although such packets must normally set 1 to the hop limit field). */ if (IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_src)) { - ip6stat.ip6s_cantforward++; + ip6stat_inc(ip6s_cantforward); if (ip6_log_time + ip6_log_interval < time_uptime) { char src[INET6_ADDRSTRLEN], dst[INET6_ADDRSTRLEN]; @@ -1158,7 +1158,7 @@ ip6_mdq(struct mbuf *m, struct ifnet *ifp, struct mf6c *rt) in6_addr2scopeid(ifp->if_index, &ip6->ip6_src) != in6_addr2scopeid(mif6table[mifi].m6_ifp->if_index, &ip6->ip6_src))) { - ip6stat.ip6s_badscope++; + ip6stat_inc(ip6s_badscope); continue; } -- cgit v1.2.3