From owner-freebsd-hackers Thu Sep 12 12:05:12 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id MAA23047 for hackers-outgoing; Thu, 12 Sep 1996 12:05:12 -0700 (PDT) Received: from halloran-eldar.lcs.mit.edu (halloran-eldar.lcs.mit.edu [18.26.0.159]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id MAA23039; Thu, 12 Sep 1996 12:05:09 -0700 (PDT) Received: by halloran-eldar.lcs.mit.edu; (5.65v3.2/1.1.8.2/19Aug95-0530PM) id AA29311; Thu, 12 Sep 1996 15:05:04 -0400 Date: Thu, 12 Sep 1996 15:05:04 -0400 From: Garrett Wollman Message-Id: <9609121905.AA29311@halloran-eldar.lcs.mit.edu> To: Luigi Rizzo Cc: hackers@freebsd.org, wollman@lcs.mit.edu, phk@freebsd.org Subject: Changing default TCP window size ? In-Reply-To: <199609112117.XAA08985@labinfo.iet.unipi.it> References: <199609112117.XAA08985@labinfo.iet.unipi.it> Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk < said: > How do I force TCP (or the OS) to use a window size different from the > default 16K ? > The following code > mywin=DESIRED_WINDOW_SIZE; > setsockopt(f, SOL_SOCKET, SO_SNDBUF, (char *)&mywin, sizeof mywin) > appears to set the value correctly (it can be read back with > getsockopt) but then it appears not to have any effect on TCP > (monitoring the connection with netstat -na always shows a Send-Q > around 16KB, and the throughput in window-limited configurations > remains unchanged). This is a conflict that needs to be resolved between the option-processing code and the code that attempts to set the socket buffer size based on what's in the route. I can't give you a fully-fleshed-out solution, but essentially the code needs to check if there is a buffer size specified via setsockopt, and if there is, then it should ignore the values in the route (or perhaps it should use the lock bits in the route to indicate some sort of clamping). I have a long-standing bug report form Matthew Dillon about this, but it has not had a sufficiently high priority to get done. Come up with a good fix and I'll take it. -GAWollman -- Garrett A. Wollman | O Siem / We are all family / O Siem / We're all the same wollman@lcs.mit.edu | O Siem / The fires of freedom Opinions not those of| Dance in the burning flame MIT, LCS, ANA, or NSA| - Susan Aglukark and Chad Irschick