diff options
author | rwatson <rwatson@FreeBSD.org> | 2009-04-12 11:42:40 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2009-04-12 11:42:40 +0000 |
commit | 5dc0256f1481f91aa761b11afb7454bdcbb19b7d (patch) | |
tree | 1c2af20a61d5cccd88db042b98dc9009fe9c5206 /sys/contrib | |
parent | f4376efe43486d410755216aacd2459e2c05a8c3 (diff) | |
download | FreeBSD-src-5dc0256f1481f91aa761b11afb7454bdcbb19b7d.zip FreeBSD-src-5dc0256f1481f91aa761b11afb7454bdcbb19b7d.tar.gz |
Update stats in struct udpstat using two new macros, UDPSTAT_ADD()
and UDPSTAT_INC(), 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/contrib')
-rw-r--r-- | sys/contrib/pf/net/pf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/contrib/pf/net/pf.c b/sys/contrib/pf/net/pf.c index 241f2b1..7ecc2d3 100644 --- a/sys/contrib/pf/net/pf.c +++ b/sys/contrib/pf/net/pf.c @@ -6293,7 +6293,7 @@ pf_route(struct mbuf **m, struct pf_rule *r, int dir, struct ifnet *oifp, if (m0->m_pkthdr.csum_flags & M_TCPV4_CSUM_OUT) TCPSTAT_INC(tcpstat.tcps_outhwcsum); else if (m0->m_pkthdr.csum_flags & M_UDPV4_CSUM_OUT) - V_udpstat.udps_outhwcsum++; + UDPSTAT_INC(udps_outhwcsum); error = (*ifp->if_output)(ifp, m0, sintosa(dst), NULL); goto done; } @@ -6641,7 +6641,7 @@ pf_check_proto_cksum(struct mbuf *m, int off, int len, u_int8_t p, sa_family_t a case IPPROTO_UDP: { INIT_VNET_INET(curvnet); - V_udpstat.udps_badsum++; + UDPSTAT_INC(udps_badsum); break; } case IPPROTO_ICMP: @@ -6744,7 +6744,7 @@ pf_check_proto_cksum(struct mbuf *m, int off, int len, u_int8_t p, TCPSTAT_INC(tcps_rcvbadsum); break; case IPPROTO_UDP: - V_udpstat.udps_badsum++; + UDPSTAT_INC(udps_badsum); break; case IPPROTO_ICMP: V_icmpstat.icps_checksum++; |