diff options
author | rwatson <rwatson@FreeBSD.org> | 2009-04-12 13:22:33 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2009-04-12 13:22:33 +0000 |
commit | 4801e9aee9baec5543d3d78abf1d7432044173fe (patch) | |
tree | 8468527867e08bef8398c91c078aae786df7c3f8 /sys/netinet6/mld6.c | |
parent | 6958bbf168b98d4b8a70ef9cf01445b28ff778b0 (diff) | |
download | FreeBSD-src-4801e9aee9baec5543d3d78abf1d7432044173fe.zip FreeBSD-src-4801e9aee9baec5543d3d78abf1d7432044173fe.tar.gz |
Update stats in struct icmpstat and icmp6stat using four new
macros: ICMPSTAT_ADD(), ICMPSTAT_INC(), ICMP6STAT_ADD(), and
ICMP6STAT_INC(), rather than directly manipulating the fields
of these structures across the kernel. This will make it
easier to change the implementation of these statistics,
such as using per-CPU versions of the data structures.
In on case, icmp6stat members are manipulated indirectly, by
icmp6_errcount(), and this will require further work to fix
for per-CPU stats.
MFC after: 3 days
Diffstat (limited to 'sys/netinet6/mld6.c')
-rw-r--r-- | sys/netinet6/mld6.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet6/mld6.c b/sys/netinet6/mld6.c index a672a04..29b71be 100644 --- a/sys/netinet6/mld6.c +++ b/sys/netinet6/mld6.c @@ -288,7 +288,7 @@ mld6_input(struct mbuf *m, int off) #else IP6_EXTHDR_GET(mldh, struct mld_hdr *, m, off, sizeof(*mldh)); if (mldh == NULL) { - V_icmp6stat.icp6s_tooshort++; + ICMP6STAT_INC(icp6s_tooshort); return; } #endif @@ -517,7 +517,7 @@ mld6_sendpkt(struct in6_multi *in6m, int type, const struct in6_addr *dst) im6o.im6o_multicast_loop = (ip6_mrouter != NULL); /* increment output statictics */ - V_icmp6stat.icp6s_outhist[type]++; + ICMP6STAT_INC(icp6s_outhist[type]); ip6_output(mh, &V_ip6_opts, NULL, 0, &im6o, &outif, NULL); if (outif) { |