Re: Window Scale option

Jason Thorpe <thorpej@nas.nasa.gov> Mon, 04 May 1998 23:47 UTC

Delivery-Date: Mon, 04 May 1998 19:47:28 -0400
Return-Path: tcplw-relay@services.BSDI.COM
Received: from cnri.reston.va.us (ns.cnri.reston.va.us [132.151.1.1]) by ietf.org (8.8.5/8.8.7a) with ESMTP id TAA15442 for <ietf-archive@ietf.org>; Mon, 4 May 1998 19:47:27 -0400 (EDT)
Received: from services.BSDI.COM (services.BSDI.COM [205.230.225.19]) by cnri.reston.va.us (8.8.5/8.8.7a) with ESMTP id TAA06028 for <IETF-archive@cnri.reston.va.us>; Mon, 4 May 1998 19:49:52 -0400 (EDT)
Received: (from daemon@localhost) by services.BSDI.COM (8.8.7/8.8.8) id RAA26997 for tcplw-list@bsdi.com; Mon, 4 May 1998 17:47:08 -0600 (MDT)
Received: from mailfilter.bsdi.com (mailfilter.BSDI.COM [205.230.225.21]) by services.BSDI.COM (8.8.7/8.8.8) with ESMTP id RAA26992; Mon, 4 May 1998 17:47:05 -0600 (MDT)
Received: from lestat.nas.nasa.gov (lestat.nas.nasa.gov [129.99.50.29]) by mailfilter.bsdi.com (BSDI-MF 1.0) with ESMTP id RAA20561 env-from (thorpej@lestat.nas.nasa.gov); Mon, 4 May 1998 17:46:02 -0600 (MDT)
Received: from localhost (localhost [127.0.0.1]) by lestat.nas.nasa.gov (8.8.8/8.6.12) with SMTP id QAA14532; Mon, 4 May 1998 16:37:11 -0700 (PDT)
Message-Id: <199805042337.QAA14532@lestat.nas.nasa.gov>
X-Authentication-Warning: lestat.nas.nasa.gov: localhost [127.0.0.1] didn't use HELO protocol
To: braden@isi.edu
Cc: kml@nas.nasa.gov, dab@bsdi.com, tcplw@bsdi.com
Subject: Re: Window Scale option
Reply-To: Jason Thorpe <thorpej@nas.nasa.gov>
From: Jason Thorpe <thorpej@nas.nasa.gov>
Date: Mon, 04 May 1998 16:37:10 -0700
Sender: thorpej@nas.nasa.gov

On Mon, 4 May 1998 15:58:36 -0700 
 braden@isi.edu wrote:

 >   *> I guess what I'm really saying is that if you have a user interface
 >   *> to TCP to allow the application to specify the window scale value
 >   *> without having to set the buffer size,
 > 
 > Dave,
 > 
 > Why would you want to do that?  It seems to me that the window scale
 > itself should be *completely* hidden from the application; it is after
 > all a kludge; as you noted earlier, we want to obsolete it eventually
 > with a sensible window size.  The application should know ONLY about
 > buffer sizes!

I agree completely.

In some ways, I like with Kevin's suggestion of setting this on a per-route
basis, but that has the problem of being a little too "global"; it catches
things which really have no reason to advertise large windows (e.g.
interactive sessions).

On the other hand, I also have a problem with modifying every application
that might want to do this (although I've started doing this in NetBSD just
to see how annoying it might turn out to be...).  Consider just the FTP case:

	- Modify inetd(8) so that ftpd(8) can be handed a control
	  socket with a large recieve buffer (for passive upload).

	- Modify ftp(1) to allow a larger rcvbuf to be specified
	  (for normal [data socket] and passive [control socket]
	  download).

	- Modify ftpd(8) to allow a larger rcvbuf to be specified
	  (for normal upload).

 > Oh, you mean that there could be a system call that set the buffer max,
 > without pre-allocation of buffers.  But since it has to be ABLE to
 > allocate that buffer space, you can still lose at the beginning.

Um, isn't that what the BSD stack already does?  setsockopt of SO_RCVBUF
simply sets so->so_rcv.sb_hiwat to the specified value; buffers are allocated
lazily upon packet reception, and simply hung off the socket buffer until
the high water mark is reached... In the even the buffer can't be allocated,
the packet is simply dropped at the NIC level, an ACK is never transmitted,
the sender's retransmit timer fires, and its congestion window closes (icky,
but it works).

Jason R. Thorpe                                       thorpej@nas.nasa.gov
NASA Ames Research Center                            Home: +1 408 866 1912
NAS: M/S 258-5                                       Work: +1 650 604 0935
Moffett Field, CA 94035                             Pager: +1 415 428 6939