diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2006-08-31 18:11:02 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-22 18:18:44 -0400 |
commit | ff9b5e0f08cb650d113eef0c654f931c0a7ae730 (patch) | |
tree | 65ac7b9220184e96c89626a39df3d45715e7171c /net | |
parent | 3015d5d4e5b15eddea272a697e83391100581932 (diff) |
[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: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/tcp_input.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index caf3c41dcc8c..511b738f118a 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -127,7 +127,7 @@ static void tcp_measure_rcv_mss(struct sock *sk, | |||
127 | /* skb->len may jitter because of SACKs, even if peer | 127 | /* skb->len may jitter because of SACKs, even if peer |
128 | * sends good full-sized frames. | 128 | * sends good full-sized frames. |
129 | */ | 129 | */ |
130 | len = skb->len; | 130 | len = skb_shinfo(skb)->gso_size ?: skb->len; |
131 | if (len >= icsk->icsk_ack.rcv_mss) { | 131 | if (len >= icsk->icsk_ack.rcv_mss) { |
132 | icsk->icsk_ack.rcv_mss = len; | 132 | icsk->icsk_ack.rcv_mss = len; |
133 | } else { | 133 | } else { |