diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2009-01-05 03:13:19 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-05 03:13:19 +0300 |
commit | b530256d2e0f1a75fab31f9821129fff1bb49faa (patch) | |
tree | e3e615d405921fc157169180d53c91d09b9a7186 /net/ipv4 | |
parent | cfc3a44c3c32abe48898398d9a92e8524c976803 (diff) | |
download | linux-b530256d2e0f1a75fab31f9821129fff1bb49faa.tar.xz |
gro: Use gso_size to store MSS
In order to allow GRO packets without frag_list at all, we need to
store the MSS in the packet itself. The obvious place is gso_size.
The only thing to watch out for is if the packet ends up not being
GRO then we need to clear gso_size before pushing the packet into
the stack.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/tcp.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index f28acf11fc67..4d655e945413 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -2519,9 +2519,7 @@ found: flush |= memcmp(th + 1, th2 + 1, thlen - sizeof(*th)); total = p->len; - mss = total; - if (skb_shinfo(p)->frag_list) - mss = skb_shinfo(p)->frag_list->len; + mss = skb_shinfo(p)->gso_size; flush |= skb->len > mss || skb->len <= 0; flush |= ntohl(th2->seq) + total != ntohl(th->seq); @@ -2557,7 +2555,6 @@ int tcp_gro_complete(struct sk_buff *skb) skb->csum_offset = offsetof(struct tcphdr, check); skb->ip_summed = CHECKSUM_PARTIAL; - skb_shinfo(skb)->gso_size = skb_shinfo(skb)->frag_list->len; skb_shinfo(skb)->gso_segs = NAPI_GRO_CB(skb)->count; if (th->cwr) |