Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Oct 2003 00:05:33 +0200
From:      Andre Oppermann <oppermann@pipeline.ch>
To:        Carl Mascott <cmascott@att.net>
Cc:        freebsd-net@freebsd.org
Subject:   Re: TCP window size issues
Message-ID:  <3F9067AD.A6551D07@pipeline.ch>
References:  <200310172104.h9HL4EK3000733@callisto.local>

next in thread | previous in thread | raw e-mail | index | archive | help
Carl Mascott wrote:
> 
> Actually I have just fixed it in my copy of 4.8-R.  I have a document
> that describes the problem and my solution.  I could send you that
> and/or a set of patches.  You might want to sketch out your own
> solution before you look at mine, though.  Also, I'm not done
> testing mine yet.

The patch in PR11966 has already been applied. It does not fix it.
I've fixed it by redoing this check in tcp_input.c::tcp_mss():

 if ((bufsize = rt->rt_rmx.rmx_sendpipe) == 0)
	bufsize = so->sn_snd.sb_hiwat;

to:

 if ((so->so_snd.sb_hiwat == tcp_sendspace) && rt->rt_rmx.rmx_sendpipe)
	bufsize = rt->rt_rmx.rmx_sendpipe;
 else
	bufsize = so->so_snd.sb_hiwat;


The theory goes that with default buffers so_snd.sb_hiwat and
tcp_sendspace have the same size. If that is actually the case,
we use whatever we've got from the metrics. If not, the user
did some changes and we take that and ignore the metrics value.
This is not yet tested in reality... just theoretical ;-)

Anyway, I'm interested in your solutions as well.

-- 
Andre


> > Carl Mascott wrote:
> > >
> > > 2. The 4.4BSD TCP implementation has never had the correct precedence
> > >    rules for setting window sizes.  App-set values should take
> > >    precedence over all others.  Routing table values should take
> > >    precedence over kernel default values.  The fix for PR 11966
> > >    alters the behavior but still doesn't implement these precedence
> > >    rules.
> >
> > I'll fix this in my tcp_hostcache patch currently under review by
> > Sam Leffler and Ruslan Ermilov (however that is for -CURRENT).



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