]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
[TCP]: receive buffer growth limiting with mixed MTU
authorJohn Heffner <jheffner@psc.edu>
Fri, 11 Nov 2005 01:11:48 +0000 (17:11 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 11 Nov 2005 01:11:48 +0000 (17:11 -0800)
commit326f36e9e7de362e09745ce6f84b65e7ccac33ba
treebf8e56d28a8de0fbbeb4e79bea565f2e31abe07e
parent9772efb970780aeed488c19d8b4afd46c3b484af
[TCP]: receive buffer growth limiting with mixed MTU

This is a patch for discussion addressing some receive buffer growing issues.
This is partially related to the thread "Possible BUG in IPv4 TCP window
handling..." last week.

Specifically it addresses the problem of an interaction between rcvbuf
moderation (receiver autotuning) and rcv_ssthresh.  The problem occurs when
sending small packets to a receiver with a larger MTU.  (A very common case I
have is a host with a 1500 byte MTU sending to a host with a 9k MTU.)  In
such a case, the rcv_ssthresh code is targeting a window size corresponding
to filling up the current rcvbuf, not taking into account that the new rcvbuf
moderation may increase the rcvbuf size.

One hunk makes rcv_ssthresh use tcp_rmem[2] as the size target rather than
rcvbuf.  The other changes the behavior when it overflows its memory bounds
with in-order data so that it tries to grow rcvbuf (the same as with
out-of-order data).

These changes should help my problem of mixed MTUs, and should also help the
case from last week's thread I think.  (In both cases though you still need
tcp_rmem[2] to be set much larger than the TCP window.)  One question is if
this is too aggressive at trying to increase rcvbuf if it's under memory
stress.

Orignally-from: John Heffner <jheffner@psc.edu>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_input.c