From owner-freebsd-net@FreeBSD.ORG Wed May 28 06:06:14 2003 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CC03F37B401 for ; Wed, 28 May 2003 06:06:14 -0700 (PDT) Received: from park.rambler.ru (park.rambler.ru [81.19.64.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4CF3443F3F for ; Wed, 28 May 2003 06:06:13 -0700 (PDT) (envelope-from is@rambler-co.ru) Received: from is.park.rambler.ru (is.park.rambler.ru [81.19.64.102]) by park.rambler.ru (8.12.6/8.12.6) with ESMTP id h4SD5xmF042679; Wed, 28 May 2003 17:05:59 +0400 (MSD) Date: Wed, 28 May 2003 17:05:59 +0400 (MSD) From: Igor Sysoev X-Sender: is@is To: freebsd-net@freebsd.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Tony Finch cc: Jonathan Lemon Subject: turning off TCP_NOPUSH X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 May 2003 13:06:15 -0000 The 1.53 fix http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/netinet/tcp_usrreq.c.diff?r1=1.52&r2=1.53 always calls tcp_output() when TCP_NOPUSH is turned off. I think tcp_output() should be called only if data in the send buffer is less than MSS: tp->t_flags &= ~TF_NOPUSH; - error = tcp_output(tp); + if (so->so_snd.sb_cc < tp->t_maxseg) { + error = tcp_output(tp); + } If the pending data is bigger than MSS then it will be sent without significant delay. Igor Sysoev http://sysoev.ru/en/