Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Sep 1996 22:51:05 +0200 (MET DST)
From:      Luigi Rizzo <luigi@labinfo.iet.unipi.it>
To:        avalon@coombs.anu.edu.au (Darren Reed)
Cc:        matt@lkg.dec.com, hackers@freebsd.org
Subject:   Re: Changing default TCP window size ?
Message-ID:  <199609122051.WAA10840@labinfo.iet.unipi.it>
In-Reply-To: <199609122042.WAA10821@labinfo.iet.unipi.it> from "Darren Reed" at Sep 13, 96 07:09:37 am

next in thread | previous in thread | raw e-mail | index | archive | help
> In some mail from Matt Thomas, sie said:
> > 
> > You can't do it in -current (as I found on FDDI).  The TCP code forces
> > the buffser to what is in the route and does not allow one to override
> > them.  About a month I sent a set of patches which allows SO_SNDBUF/
> > SO_RCVBUF to work.
> 
> sounds like something else there, I've watched ftp connections with
> tcpdump and in that case, the window grows during the data connection from
> 4k to 16k.

Have played a little bit with Matt's patch (which is quite simple, in
tcp_input.c the two blocks of code conditioned to RTV_SPIPE and
RTV_RPIPE must be changed as follows:

#ifdef RTV_SPIPE
        if ((bufsize = rt->rt_rmx.rmx_sendpipe) == 0 || 
        /* XXX Matt Thomas fix to enable larger windows */
                so->so_snd.sb_hiwat != tcp_sendspace ) 
#endif
...
#ifdef RTV_RPIPE
        if ((bufsize = rt->rt_rmx.rmx_recvpipe) == 0 ||
        /* XXX Matt Thomas fix to enable larger windows */
                so->so_rcv.sb_hiwat != tcp_recvspace)
#endif

and this works, in principle. The problem is, you have to recompile
applications to call setsockopt() with SO_SNDBUF and SO_RCVBUF, or you
need to alter tcp_sendspace and tcp_recvspace (don't know if they can
be modified with sysctl.)

After this, things work up to a window of 65535. For larger windows,
using scaling options, I think there is some problem with option
negotiation, so that if both values are not above 65535 they end up
negotiating the default value (16K) instead of the min() of the two
values.

Still looking at this...

	Luigi
====================================================================
Luigi Rizzo                     Dip. di Ingegneria dell'Informazione
email: luigi@iet.unipi.it       Universita' di Pisa
tel: +39-50-568533              via Diotisalvi 2, 56126 PISA (Italy)
fax: +39-50-568522              http://www.iet.unipi.it/~luigi/
====================================================================



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609122051.WAA10840>