Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Jan 1999 00:22:43 -0600 (CST)
From:      Mohit Aron <aron@cs.rice.edu>
To:        freebsd-hackers@FreeBSD.ORG
Subject:   TCP bug report for FreeBSD-2.2.6
Message-ID:  <199901110622.AAA00358@cs.rice.edu>

next in thread | raw e-mail | index | archive | help
Hi, 
    I'm using FreeBSD-2.2.6. I've discovered that the TCP implementation has a
nasty bug that can cause problems in general for any TCP connection with 
respect to the end and receive buffer sizes used by a connection. The latter
are important for fully utilizing the bandwidth (long fat pipes). I'll outline
the problem below.

RFC 1323 mandates that TCP only exchange the window scale option with the
initial SYN segment. So to use larger windows for the length of the connection,
the application needs to increase the send and receive buffer sizes using
setsockopt() system call BEFORE the connection is established. This holds 
for both the client as well as the server.

As soon as the connection gets established, the tcp_mss() function gets called
that resets the send and receive buffer sizes by copying them over from the
routing entry. Assuming that the routing entry already exists for the peer, 
and it contains the value of send and receive buffer sizes used by some other
application earlier, then TCP would still (wrongly) reset the send and receive
buffer sizes for the connection.

To fix the above problem at the application level, setsockopt() needs to be 
called again AFTER the connection gets established. So in general, to use
large windows in FreeBSD, the send and receive buffer sizes need to be
set both before and after the connection establishment. Can this be fixed 
in future releases ?

I do not know whether the problem exists in other BSD stacks. Can someone 
verify the existence of the problem in other stacks ?



- Mohit

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?199901110622.AAA00358>