Date: Fri, 4 Feb 2011 14:13:16 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r218271 - head/sys/netinet Message-ID: <201102041413.p14EDGsd086603@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Fri Feb 4 14:13:15 2011 New Revision: 218271 URL: http://svn.freebsd.org/changeset/base/218271 Log: When turning off TCP_NOPUSH, only call tcp_output() to immediately flush any pending data if the connection is established. Submitted by: csjp Reviewed by: lstewart MFC after: 1 week Modified: head/sys/netinet/tcp_usrreq.c Modified: head/sys/netinet/tcp_usrreq.c ============================================================================== --- head/sys/netinet/tcp_usrreq.c Fri Feb 4 14:06:57 2011 (r218270) +++ head/sys/netinet/tcp_usrreq.c Fri Feb 4 14:13:15 2011 (r218271) @@ -1328,9 +1328,10 @@ tcp_ctloutput(struct socket *so, struct INP_WLOCK_RECHECK(inp); if (optval) tp->t_flags |= TF_NOPUSH; - else { + else if (tp->t_flags & TF_NOPUSH) { tp->t_flags &= ~TF_NOPUSH; - error = tcp_output(tp); + if (TCPS_HAVEESTABLISHED(tp->t_state)) + error = tcp_output(tp); } INP_WUNLOCK(inp); break;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201102041413.p14EDGsd086603>