From owner-svn-src-stable@FreeBSD.ORG Wed Jul 3 13:00:36 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5BC828B1; Wed, 3 Jul 2013 13:00:36 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 33EA01AE3; Wed, 3 Jul 2013 13:00:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r63D0agA070806; Wed, 3 Jul 2013 13:00:36 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r63D0Zqw070804; Wed, 3 Jul 2013 13:00:35 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201307031300.r63D0Zqw070804@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Wed, 3 Jul 2013 13:00:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r252565 - stable/9/sys/netinet6 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2013 13:00:36 -0000 Author: ae Date: Wed Jul 3 13:00:35 2013 New Revision: 252565 URL: http://svnweb.freebsd.org/changeset/base/252565 Log: MFC r252007: Use RIP6STAT_INC() macro for raw ip6 statistics accounting. Modified: stable/9/sys/netinet6/raw_ip6.c stable/9/sys/netinet6/raw_ip6.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet6/raw_ip6.c ============================================================================== --- stable/9/sys/netinet6/raw_ip6.c Wed Jul 3 12:58:53 2013 (r252564) +++ stable/9/sys/netinet6/raw_ip6.c Wed Jul 3 13:00:35 2013 (r252565) @@ -160,7 +160,7 @@ rip6_input(struct mbuf **mp, int *offp, struct mbuf *opts = NULL; struct sockaddr_in6 fromsa; - V_rip6stat.rip6s_ipackets++; + RIP6STAT_INC(rip6s_ipackets); if (faithprefix_p != NULL && (*faithprefix_p)(&ip6->ip6_dst)) { /* XXX Send icmp6 host/port unreach? */ @@ -199,11 +199,11 @@ rip6_input(struct mbuf **mp, int *offp, } INP_RLOCK(in6p); if (in6p->in6p_cksum != -1) { - V_rip6stat.rip6s_isum++; + RIP6STAT_INC(rip6s_isum); if (in6_cksum(m, proto, *offp, m->m_pkthdr.len - *offp)) { INP_RUNLOCK(in6p); - V_rip6stat.rip6s_badsum++; + RIP6STAT_INC(rip6s_badsum); continue; } } @@ -279,7 +279,7 @@ rip6_input(struct mbuf **mp, int *offp, m_freem(n); if (opts) m_freem(opts); - V_rip6stat.rip6s_fullsock++; + RIP6STAT_INC(rip6s_fullsock); } else sorwakeup(last->inp_socket); opts = NULL; @@ -312,14 +312,14 @@ rip6_input(struct mbuf **mp, int *offp, m_freem(m); if (opts) m_freem(opts); - V_rip6stat.rip6s_fullsock++; + RIP6STAT_INC(rip6s_fullsock); } else sorwakeup(last->inp_socket); INP_RUNLOCK(last); } else { - V_rip6stat.rip6s_nosock++; + RIP6STAT_INC(rip6s_nosock); if (m->m_flags & M_MCAST) - V_rip6stat.rip6s_nosockmcast++; + RIP6STAT_INC(rip6s_nosockmcast); if (proto == IPPROTO_NONE) m_freem(m); else { @@ -559,7 +559,7 @@ rip6_output(m, va_alist) icmp6_ifoutstat_inc(oifp, type, code); ICMP6STAT_INC(icp6s_outhist[type]); } else - V_rip6stat.rip6s_opackets++; + RIP6STAT_INC(rip6s_opackets); goto freectl; Modified: stable/9/sys/netinet6/raw_ip6.h ============================================================================== --- stable/9/sys/netinet6/raw_ip6.h Wed Jul 3 12:58:53 2013 (r252564) +++ stable/9/sys/netinet6/raw_ip6.h Wed Jul 3 13:00:35 2013 (r252565) @@ -48,6 +48,8 @@ struct rip6stat { }; #ifdef _KERNEL +#define RIP6STAT_ADD(name, val) V_rip6stat.name += (val) +#define RIP6STAT_INC(name) RIP6STAT_ADD(name, 1) VNET_DECLARE(struct rip6stat, rip6stat); #define V_rip6stat VNET(rip6stat) #endif