Date: Fri, 19 Sep 2014 10:18:14 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271862 - head/sys/netipsec Message-ID: <201409191018.s8JAIEFY033637@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Fri Sep 19 10:18:14 2014 New Revision: 271862 URL: http://svnweb.freebsd.org/changeset/base/271862 Log: Mechanically convert to if_inc_counter(). Modified: head/sys/netipsec/ipsec_input.c head/sys/netipsec/ipsec_output.c Modified: head/sys/netipsec/ipsec_input.c ============================================================================== --- head/sys/netipsec/ipsec_input.c Fri Sep 19 09:20:55 2014 (r271861) +++ head/sys/netipsec/ipsec_input.c Fri Sep 19 10:18:14 2014 (r271862) @@ -376,8 +376,8 @@ ipsec4_common_input_cb(struct mbuf *m, s prot = ip->ip_p; #ifdef DEV_ENC - encif->if_ipackets++; - encif->if_ibytes += m->m_pkthdr.len; + if_inc_counter(encif, IFCOUNTER_IPACKETS, 1); + if_inc_counter(encif, IFCOUNTER_IBYTES, m->m_pkthdr.len); /* * Pass the mbuf to enc0 for bpf and pfil. We will filter the IPIP @@ -663,8 +663,8 @@ ipsec6_common_input_cb(struct mbuf *m, s m_copydata(m, protoff, 1, (unsigned char *) &prot); #ifdef DEV_ENC - encif->if_ipackets++; - encif->if_ibytes += m->m_pkthdr.len; + if_inc_counter(encif, IFCOUNTER_IPACKETS, 1); + if_inc_counter(encif, IFCOUNTER_IBYTES, m->m_pkthdr.len); /* * Pass the mbuf to enc0 for bpf and pfil. We will filter the IPIP Modified: head/sys/netipsec/ipsec_output.c ============================================================================== --- head/sys/netipsec/ipsec_output.c Fri Sep 19 09:20:55 2014 (r271861) +++ head/sys/netipsec/ipsec_output.c Fri Sep 19 10:18:14 2014 (r271862) @@ -441,8 +441,8 @@ ipsec4_process_packet( sav = isr->sav; #ifdef DEV_ENC - encif->if_opackets++; - encif->if_obytes += m->m_pkthdr.len; + if_inc_counter(encif, IFCOUNTER_OPACKETS, 1); + if_inc_counter(encif, IFCOUNTER_OBYTES, m->m_pkthdr.len); /* pass the mbuf to enc0 for bpf processing */ ipsec_bpf(m, sav, AF_INET, ENC_OUT|ENC_BEFORE); @@ -641,8 +641,8 @@ ipsec6_process_packet( dst = &sav->sah->saidx.dst; #ifdef DEV_ENC - encif->if_opackets++; - encif->if_obytes += m->m_pkthdr.len; + if_inc_counter(encif, IFCOUNTER_OPACKETS, 1); + if_inc_counter(encif, IFCOUNTER_OBYTES, m->m_pkthdr.len); /* pass the mbuf to enc0 for bpf processing */ ipsec_bpf(m, isr->sav, AF_INET6, ENC_OUT|ENC_BEFORE);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409191018.s8JAIEFY033637>