mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
cfc3a44c3c
commit
b530256d2e
3 changed files with 4 additions and 4 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue