summaryrefslogtreecommitdiffstats
path: root/sys/netipsec/ipsec_mbuf.c
diff options
context:
space:
mode:
authorae <ae@FreeBSD.org>2013-06-20 09:55:53 +0000
committerae <ae@FreeBSD.org>2013-06-20 09:55:53 +0000
commit1e4c88cc8b89f670f8e6f11dd0db6d4cc0f53c16 (patch)
treea157f9c42f0efea665bf8a24f6e83ac24e7980a3 /sys/netipsec/ipsec_mbuf.c
parent10da02bc8d0c85c86d78640dee43641acfc687aa (diff)
downloadFreeBSD-src-1e4c88cc8b89f670f8e6f11dd0db6d4cc0f53c16.zip
FreeBSD-src-1e4c88cc8b89f670f8e6f11dd0db6d4cc0f53c16.tar.gz
Use IPSECSTAT_INC() and IPSEC6STAT_INC() macros for ipsec statistics
accounting. MFC after: 2 weeks
Diffstat (limited to 'sys/netipsec/ipsec_mbuf.c')
-rw-r--r--sys/netipsec/ipsec_mbuf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netipsec/ipsec_mbuf.c b/sys/netipsec/ipsec_mbuf.c
index bc87409..fb105d4 100644
--- a/sys/netipsec/ipsec_mbuf.c
+++ b/sys/netipsec/ipsec_mbuf.c
@@ -135,7 +135,7 @@ m_makespace(struct mbuf *m0, int skip, int hlen, int *off)
m = n; /* header is at front ... */
*off = 0; /* ... of new mbuf */
}
- V_ipsec4stat.ips_mbinserted++;
+ IPSECSTAT_INC(ips_mbinserted);
} else {
/*
* Copy the remainder to the back of the mbuf
@@ -241,7 +241,7 @@ m_striphdr(struct mbuf *m, int skip, int hlen)
/* Remove the header and associated data from the mbuf. */
if (roff == 0) {
/* The header was at the beginning of the mbuf */
- V_ipsec4stat.ips_input_front++;
+ IPSECSTAT_INC(ips_input_front);
m_adj(m1, hlen);
if ((m1->m_flags & M_PKTHDR) == 0)
m->m_pkthdr.len -= hlen;
@@ -253,7 +253,7 @@ m_striphdr(struct mbuf *m, int skip, int hlen)
* so first let's remove the remainder of the header from
* the beginning of the remainder of the mbuf chain, if any.
*/
- V_ipsec4stat.ips_input_end++;
+ IPSECSTAT_INC(ips_input_end);
if (roff + hlen > m1->m_len) {
/* Adjust the next mbuf by the remainder */
m_adj(m1->m_next, roff + hlen - m1->m_len);
@@ -278,7 +278,7 @@ m_striphdr(struct mbuf *m, int skip, int hlen)
* The header lies in the "middle" of the mbuf; copy
* the remainder of the mbuf down over the header.
*/
- V_ipsec4stat.ips_input_middle++;
+ IPSECSTAT_INC(ips_input_middle);
bcopy(mtod(m1, u_char *) + roff + hlen,
mtod(m1, u_char *) + roff,
m1->m_len - (roff + hlen));
OpenPOWER on IntegriCloud