From owner-freebsd-net@FreeBSD.ORG Wed Jul 29 10:29:28 2009 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C24C106566B for ; Wed, 29 Jul 2009 10:29:28 +0000 (UTC) (envelope-from ap00@mail.ru) Received: from mx4.mail.ru (mx4.mail.ru [94.100.176.18]) by mx1.freebsd.org (Postfix) with ESMTP id E30F98FC1A for ; Wed, 29 Jul 2009 10:29:27 +0000 (UTC) (envelope-from ap00@mail.ru) Received: from mx48.mail.ru (mx48.mail.ru [94.100.176.62]) by mx4.mail.ru (mPOP.Fallback_MX) with ESMTP id CDE518223E5 for ; Wed, 29 Jul 2009 14:15:06 +0400 (MSD) Received: from [91.190.115.253] (port=49549 helo=pstation) by mx48.mail.ru with asmtp id 1MW6BQ-000JWf-00 for freebsd-net@freebsd.org; Wed, 29 Jul 2009 14:14:52 +0400 Date: Wed, 29 Jul 2009 14:17:08 +0400 From: Anthony Pankov X-Mailer: The Bat! (v1.51) Personal X-Priority: 3 (Normal) Message-ID: <98265976953.20090729141708@mail.ru> To: freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mras: Ok Subject: TCP initial window size X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Anthony Pankov List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Jul 2009 10:29:28 -0000 Can anybody explain me about initial TCP window sent to the client (in syn/ack packet), please. Is it unmanageable and always set to net.inet.tcp.recvspace? (Due to use of syncache and syncache code is (tcp_syncache.c): /* Initial receive window: clip sbspace to [0 .. TCP_MAXWIN] */ win = sbspace(&so->so_rcv); win = imax(win, 0); win = imin(win, TCP_MAXWIN); sc->sc_wnd = win; ) If it is, then what bad things will happen if i replace code above by code like this: if (tcp_do_rfc3390) sc->sc_wnd = min(4*(sc->sc_peer_mss ? sc->sc_peer_mss:tcp_mssdflt ), max(2 * (sc->sc_peer_mss ? sc->sc_peer_mss:tcp_mssdflt), 4380)); else sc->sc_wnd = (sc->sc_peer_mss ? sc->sc_peer_mss:tcp_mssdflt) * ss_fltsz; Also, does local connection use syncache? System: FreeBSD 6.2-RELEASE-p9 -- Best regards, Anthony mailto:ap00@mail.ru