ia64/xen-unstable

changeset 11918:6677b97612a2

[NET] gso: Fix rcv mss estimate

I noticed that with default TCP window sizes TSO + Xen would slow to a
crawl on certain machines. It turned out that there is a bug in the
TCP stack when it comes to receiving LRO (counter part of TSO for rx)
packets.

The following fix has been applied upstream.

[TCP]: Fix rcv mss estimate for LRO

By passing a Linux-generated TSO packet straight back into
Linux, Xen
becomes our first LRO user :) Unfortunately, there is at least
one spot
in our stack that needs to be changed to cope with this.

The receive MSS estimate is computed from the raw packet
size. This is
broken if the packet is GSO/LRO. Fortunately the real MSS can
be found
in gso_size so we simply need to use that if it is non-zero.

Real LRO NICs should of course set the gso_size field in
future.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
author kfraser@localhost.localdomain
date Fri Oct 20 10:46:37 2006 +0100 (2006-10-20)
parents e256d8ccd6ac
children 16f1f8ac8902
files patches/linux-2.6.16.29/net-gso-5-rcv-mss.patch
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/linux-2.6.16.29/net-gso-5-rcv-mss.patch	Fri Oct 20 10:46:37 2006 +0100
     1.3 @@ -0,0 +1,13 @@
     1.4 +diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
     1.5 +index 104af5d..1fa1536 100644
     1.6 +--- a/net/ipv4/tcp_input.c
     1.7 ++++ b/net/ipv4/tcp_input.c
     1.8 +@@ -127,7 +127,7 @@ static void tcp_measure_rcv_mss(struct s
     1.9 + 	/* skb->len may jitter because of SACKs, even if peer
    1.10 + 	 * sends good full-sized frames.
    1.11 + 	 */
    1.12 +-	len = skb->len;
    1.13 ++	len = skb_shinfo(skb)->gso_size ?: skb->len;
    1.14 + 	if (len >= icsk->icsk_ack.rcv_mss) {
    1.15 + 		icsk->icsk_ack.rcv_mss = len;
    1.16 + 	} else {