Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Nov 2002 12:31:26 -0700
From:      "David G. Andersen" <danderse@cs.utah.edu>
To:        hackers@freebsd.org
Subject:   Changing socket buffer timeout to a u_long?
Message-ID:  <20021121123126.E75421@cs.utah.edu>

next in thread | raw e-mail | index | archive | help
Are there compelling reasons not to change the socket buffer
timeout to a u_long from a u_short?  This variable stores
the number of ticks before the socket operation times out.

At present, the maximum SO_RCVTIMEO or SO_SNDTIMEO value one
can set is SHRT_MAX / hz.  With a 100Hz kernel, this comes
to about 330 seconds, but with a 1000Hz kernel or faster,
it's reduced to under 1 minute, which tends to break some
apps when running on a high-hz kernel.

Particularly for weirdos who use HZ=10000 for dummynet purposes
and network measurement, increasing the storage to a u_long
would make life a bit happier for all sorts of code that wants
to set a 1 minute timeout.

  -Dave (not on -hackers anymore, please CC)

-- 
work: dga@lcs.mit.edu                          me:  dga@pobox.com
      MIT Laboratory for Computer Science           http://www.angio.net/
      I do not accept unsolicited commercial email.  Do not spam me.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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