summaryrefslogtreecommitdiffstats
path: root/sys/netinet/igmp.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2009-04-11 23:35:20 +0000
committerrwatson <rwatson@FreeBSD.org>2009-04-11 23:35:20 +0000
commit692f8aa2fac966ef1adc29843ad741d355db1ecd (patch)
tree10c5a6d474eb50a7cbc30483b13c043872a03382 /sys/netinet/igmp.c
parent000707192e4b75299e3d0c78425c7da549319f08 (diff)
downloadFreeBSD-src-692f8aa2fac966ef1adc29843ad741d355db1ecd.zip
FreeBSD-src-692f8aa2fac966ef1adc29843ad741d355db1ecd.tar.gz
Update stats in struct ipstat using four new macros, IPSTAT_ADD(),
IPSTAT_INC(), IPSTAT_SUB(), and IPSTAT_DEC(), rather than directly manipulating the fields 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. MFC after: 3 days
Diffstat (limited to 'sys/netinet/igmp.c')
-rw-r--r--sys/netinet/igmp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/igmp.c b/sys/netinet/igmp.c
index 6b46d55..6102a61 100644
--- a/sys/netinet/igmp.c
+++ b/sys/netinet/igmp.c
@@ -3413,7 +3413,7 @@ igmp_intr(struct mbuf *m)
CTR3(KTR_IGMPV3, "%s: dropped %p as ifindex %u went away.",
__func__, m, ifindex);
m_freem(m);
- V_ipstat.ips_noroute++;
+ IPSTAT_INC(ips_noroute);
goto out;
}
@@ -3441,7 +3441,7 @@ igmp_intr(struct mbuf *m)
if (m0 == NULL) {
CTR2(KTR_IGMPV3, "%s: dropped %p", __func__, m);
m_freem(m);
- V_ipstat.ips_odropped++;
+ IPSTAT_INC(ips_odropped);
goto out;
}
}
OpenPOWER on IntegriCloud