diff options
author | Robert Watson <rwatson@FreeBSD.org> | 2009-08-02 19:43:32 +0000 |
---|---|---|
committer | Robert Watson <rwatson@FreeBSD.org> | 2009-08-02 19:43:32 +0000 |
commit | 315e3e38faa1ac7e775bbbbca0079c23fa3513ea (patch) | |
tree | a40bf95a151eb088ca45c32ee899b724ba74dcea /sys/netinet/ip_divert.c | |
parent | 9734411552a036160bfa03958256bdd3bfe6119f (diff) | |
download | src-315e3e38faa1ac7e775bbbbca0079c23fa3513ea.tar.gz src-315e3e38faa1ac7e775bbbbca0079c23fa3513ea.zip |
Many network stack subsystems use a single global data structure to hold
all pertinent statatistics for the subsystem. These structures are
sometimes "borrowed" by kernel modules that require a place to store
statistics for similar events.
Add KPI accessor functions for statistics structures referenced by kernel
modules so that they no longer encode certain specifics of how the data
structures are named and stored. This change is intended to make it
easier to move to per-CPU network stats following 8.0-RELEASE.
The following modules are affected by this change:
if_bridge
if_cxgb
if_gif
ip_mroute
ipdivert
pf
In practice, most of these statistics consumers should, in fact, maintain
their own statistics data structures rather than borrowing structures
from the base network stack. However, that change is too agressive for
this point in the release cycle.
Reviewed by: bz
Approved by: re (kib)
Notes
Notes:
svn path=/head/; revision=196039
Diffstat (limited to 'sys/netinet/ip_divert.c')
-rw-r--r-- | sys/netinet/ip_divert.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c index 691031014846..31059e9acd76 100644 --- a/sys/netinet/ip_divert.c +++ b/sys/netinet/ip_divert.c @@ -186,7 +186,7 @@ void div_input(struct mbuf *m, int off) { - IPSTAT_INC(ips_noproto); + KMOD_IPSTAT_INC(ips_noproto); m_freem(m); } @@ -310,8 +310,8 @@ divert_packet(struct mbuf *m, int incoming) INP_INFO_RUNLOCK(&V_divcbinfo); if (sa == NULL) { m_freem(m); - IPSTAT_INC(ips_noproto); - IPSTAT_DEC(ips_delivered); + KMOD_IPSTAT_INC(ips_noproto); + KMOD_IPSTAT_DEC(ips_delivered); } } @@ -396,7 +396,7 @@ div_output(struct socket *so, struct mbuf *m, struct sockaddr_in *sin, ip->ip_off = ntohs(ip->ip_off); /* Send packet to output processing */ - IPSTAT_INC(ips_rawout); /* XXX */ + KMOD_IPSTAT_INC(ips_rawout); /* XXX */ #ifdef MAC mac_inpcb_create_mbuf(inp, m); @@ -567,7 +567,7 @@ div_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *nam, /* Packet must have a header (but that's about it) */ if (m->m_len < sizeof (struct ip) && (m = m_pullup(m, sizeof (struct ip))) == 0) { - IPSTAT_INC(ips_toosmall); + KMOD_IPSTAT_INC(ips_toosmall); m_freem(m); return EINVAL; } |