svn commit: r193691 - user/kmacy/releng_7_2_fcs/sys/netinet
Kip Macy
kmacy at FreeBSD.org
Mon Jun 8 06:13:35 UTC 2009
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)
More information about the svn-src-user
mailing list