From owner-svn-src-all@FreeBSD.ORG Fri Sep 19 10:18:15 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 48A7A3E2; Fri, 19 Sep 2014 10:18:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A10EC93; Fri, 19 Sep 2014 10:18:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8JAIEpU033643; Fri, 19 Sep 2014 10:18:14 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8JAIEFY033637; Fri, 19 Sep 2014 10:18:14 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409191018.s8JAIEFY033637@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 19 Sep 2014 10:18:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271862 - head/sys/netipsec X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Sep 2014 10:18:15 -0000 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);