From owner-svn-src-all@FreeBSD.ORG Tue Sep 15 22:54:38 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5836A106568F for ; Tue, 15 Sep 2009 22:54:38 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 9BFA58FC17 for ; Tue, 15 Sep 2009 22:54:37 +0000 (UTC) Received: (qmail 7248 invoked from network); 15 Sep 2009 21:59:31 -0000 Received: from localhost (HELO [127.0.0.1]) ([127.0.0.1]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 15 Sep 2009 21:59:31 -0000 Message-ID: <4AB014ED.3080304@freebsd.org> Date: Wed, 16 Sep 2009 00:27:57 +0200 From: Andre Oppermann User-Agent: Thunderbird 1.5.0.14 (Windows/20071210) MIME-Version: 1.0 To: Andre Oppermann References: <200909152223.n8FMNjBX004826@svn.freebsd.org> In-Reply-To: <200909152223.n8FMNjBX004826@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r197236 - in head/sys: conf kern netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 15 Sep 2009 22:54:38 -0000 Andre Oppermann wrote: > Author: andre > Date: Tue Sep 15 22:23:45 2009 > New Revision: 197236 > URL: http://svn.freebsd.org/changeset/base/197236 > > Log: > -Put the optimized soreceive_stream() under a compile time option called > TCP_SORECEIVE_STREAM for the time being. > > Requested by: brooks > > Once compiled in make it easily switchable for testers by using a tuneable > net.inet.tcp.soreceive_stream > and a corresponding read-only sysctl to report the current state. > > Suggested by: rwatson > > MFC after: 2 days > -This line, and those below, will be ignored-- This is funny... :-) Missed the dash. > > Description of fields to fill in above: 76 columns --| > > PR: If a GNATS PR is affected by the change. > > Submitted by: If someone else sent in the change. > > Reviewed by: If someone else reviewed your modification. > > Approved by: If you needed approval for this commit. > > Obtained from: If the change is from a third party. > > MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email. > > Security: Vulnerability reference (one per line) or description. > > Empty fields above will be automatically removed. > > M sys/conf/options > M sys/kern/uipc_socket.c > M sys/netinet/tcp_subr.c > M sys/netinet/tcp_usrreq.c > > Modified: > head/sys/conf/options > head/sys/kern/uipc_socket.c > head/sys/netinet/tcp_subr.c > head/sys/netinet/tcp_usrreq.c > > Modified: head/sys/conf/options > ============================================================================== > --- head/sys/conf/options Tue Sep 15 22:09:42 2009 (r197235) > +++ head/sys/conf/options Tue Sep 15 22:23:45 2009 (r197236) > @@ -416,6 +416,7 @@ SLIP_IFF_OPTS opt_slip.h > TCPDEBUG > TCP_OFFLOAD_DISABLE opt_inet.h #Disable code to dispatch tcp offloading > TCP_SIGNATURE opt_inet.h > +TCP_SORECEIVE_STREAM opt_inet.h > VLAN_ARRAY opt_vlan.h > XBONEHACK > FLOWTABLE opt_route.h > > Modified: head/sys/kern/uipc_socket.c > ============================================================================== > --- head/sys/kern/uipc_socket.c Tue Sep 15 22:09:42 2009 (r197235) > +++ head/sys/kern/uipc_socket.c Tue Sep 15 22:23:45 2009 (r197236) > @@ -1870,6 +1870,7 @@ release: > /* > * Optimized version of soreceive() for stream (TCP) sockets. > */ > +#ifdef TCP_SORECEIVE_STREAM > int > soreceive_stream(struct socket *so, struct sockaddr **psa, struct uio *uio, > struct mbuf **mp0, struct mbuf **controlp, int *flagsp) > @@ -2062,6 +2063,7 @@ out: > sbunlock(sb); > return (error); > } > +#endif /* TCP_SORECEIVE_STREAM */ > > /* > * Optimized version of soreceive() for simple datagram cases from userspace. > > Modified: head/sys/netinet/tcp_subr.c > ============================================================================== > --- head/sys/netinet/tcp_subr.c Tue Sep 15 22:09:42 2009 (r197235) > +++ head/sys/netinet/tcp_subr.c Tue Sep 15 22:23:45 2009 (r197236) > @@ -259,6 +259,12 @@ SYSCTL_VNET_INT(_net_inet_tcp_inflight, > &VNET_NAME(tcp_inflight_stab), 0, > "Inflight Algorithm Stabilization 20 = 2 packets"); > > +#ifdef TCP_SORECEIVE_STREAM > +static int tcp_soreceive_stream = 0; > +SYSCTL_INT(_net_inet_tcp, OID_AUTO, soreceive_stream, CTLFLAG_RDTUN, > + &tcp_soreceive_stream, 0, "Using soreceive_stream for TCP sockets"); > +#endif > + > VNET_DEFINE(uma_zone_t, sack_hole_zone); > #define V_sack_hole_zone VNET(sack_hole_zone) > > @@ -420,6 +426,14 @@ tcp_init(void) > tcp_finwait2_timeout = TCPTV_FINWAIT2_TIMEOUT; > tcp_tcbhashsize = hashsize; > > +#ifdef TCP_SORECEIVE_STREAM > + TUNABLE_INT_FETCH("net.inet.tcp.soreceive_stream", &tcp_soreceive_stream); > + if (tcp_soreceive_stream) { > + tcp_usrreqs.pru_soreceive = soreceive_stream; > + tcp6_usrreqs.pru_soreceive = soreceive_stream; > + } > +#endif > + > #ifdef INET6 > #define TCP_MINPROTOHDR (sizeof(struct ip6_hdr) + sizeof(struct tcphdr)) > #else /* INET6 */ > > Modified: head/sys/netinet/tcp_usrreq.c > ============================================================================== > --- head/sys/netinet/tcp_usrreq.c Tue Sep 15 22:09:42 2009 (r197235) > +++ head/sys/netinet/tcp_usrreq.c Tue Sep 15 22:23:45 2009 (r197236) > @@ -1015,9 +1015,6 @@ struct pr_usrreqs tcp_usrreqs = { > .pru_send = tcp_usr_send, > .pru_shutdown = tcp_usr_shutdown, > .pru_sockaddr = in_getsockaddr, > -#if 0 > - .pru_soreceive = soreceive_stream, > -#endif > .pru_sosetlabel = in_pcbsosetlabel, > .pru_close = tcp_usr_close, > }; > @@ -1039,9 +1036,6 @@ struct pr_usrreqs tcp6_usrreqs = { > .pru_send = tcp_usr_send, > .pru_shutdown = tcp_usr_shutdown, > .pru_sockaddr = in6_mapped_sockaddr, > -#if 0 > - .pru_soreceive = soreceive_stream, > -#endif > .pru_sosetlabel = in_pcbsosetlabel, > .pru_close = tcp_usr_close, > }; > >