diff options
author | rwatson <rwatson@FreeBSD.org> | 2009-04-11 23:35:20 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2009-04-11 23:35:20 +0000 |
commit | 692f8aa2fac966ef1adc29843ad741d355db1ecd (patch) | |
tree | 10c5a6d474eb50a7cbc30483b13c043872a03382 /sys/netinet/ip_options.c | |
parent | 000707192e4b75299e3d0c78425c7da549319f08 (diff) | |
download | FreeBSD-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/ip_options.c')
-rw-r--r-- | sys/netinet/ip_options.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/ip_options.c b/sys/netinet/ip_options.c index 74d54f2..dbb7d81 100644 --- a/sys/netinet/ip_options.c +++ b/sys/netinet/ip_options.c @@ -218,7 +218,7 @@ nosourcerouting: #ifdef IPSTEALTH dropit: #endif - V_ipstat.ips_cantforward++; + IPSTAT_INC(ips_cantforward); m_freem(m); return (1); } @@ -366,7 +366,7 @@ dropit: return (0); bad: icmp_error(m, type, code, 0, 0); - V_ipstat.ips_badoptions++; + IPSTAT_INC(ips_badoptions); return (1); } |