Date: Mon, 8 Jun 2009 06:13:34 +0000 (UTC) From: Kip Macy <kmacy@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r193691 - user/kmacy/releng_7_2_fcs/sys/netinet Message-ID: <200906080613.n586DYDo018062@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kmacy Date: Mon Jun 8 06:13:34 2009 New Revision: 193691 URL: http://svn.freebsd.org/changeset/base/193691 Log: conditionally comment out global stats counters Modified: user/kmacy/releng_7_2_fcs/sys/netinet/ip_output.c user/kmacy/releng_7_2_fcs/sys/netinet/udp_usrreq.c Modified: user/kmacy/releng_7_2_fcs/sys/netinet/ip_output.c ============================================================================== --- user/kmacy/releng_7_2_fcs/sys/netinet/ip_output.c Mon Jun 8 06:12:47 2009 (r193690) +++ user/kmacy/releng_7_2_fcs/sys/netinet/ip_output.c Mon Jun 8 06:13:34 2009 (r193691) @@ -289,7 +289,9 @@ again: } ia = ifatoia(ro->ro_rt->rt_ifa); ifp = ro->ro_rt->rt_ifp; +#ifndef NO_SLOW_STATS ro->ro_rt->rt_rmx.rmx_pksent++; +#endif if (ro->ro_rt->rt_flags & RTF_GATEWAY) dst = (struct sockaddr_in *)ro->ro_rt->rt_gateway; if (ro->ro_rt->rt_flags & RTF_HOST) @@ -612,12 +614,14 @@ passout: * once instead of for every generated packet. */ if (!(flags & IP_FORWARDING) && ia) { +#ifndef NO_SLOW_STATS if (m->m_pkthdr.csum_flags & CSUM_TSO) ia->ia_ifa.if_opackets += m->m_pkthdr.len / m->m_pkthdr.tso_segsz; else ia->ia_ifa.if_opackets++; ia->ia_ifa.if_obytes += m->m_pkthdr.len; +#endif } #ifdef MBUF_STRESS_TEST if (mbuf_frag_size && m->m_pkthdr.len > mbuf_frag_size) Modified: user/kmacy/releng_7_2_fcs/sys/netinet/udp_usrreq.c ============================================================================== --- user/kmacy/releng_7_2_fcs/sys/netinet/udp_usrreq.c Mon Jun 8 06:12:47 2009 (r193690) +++ user/kmacy/releng_7_2_fcs/sys/netinet/udp_usrreq.c Mon Jun 8 06:13:34 2009 (r193691) @@ -1110,8 +1110,9 @@ udp_output(struct inpcb *inp, struct mbu ((struct ip *)ui)->ip_len = sizeof (struct udpiphdr) + len; ((struct ip *)ui)->ip_ttl = inp->inp_ip_ttl; /* XXX */ ((struct ip *)ui)->ip_tos = inp->inp_ip_tos; /* XXX */ +#ifndef NO_SLOW_STATS V_udpstat.udps_opackets++; - +#endif if (unlock_udbinfo == 2) INP_INFO_WUNLOCK(&V_udbinfo); else if (unlock_udbinfo == 1)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906080613.n586DYDo018062>