]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
tcp: reserve tcp_skb_mss() to tcp stack
authorEric Dumazet <edumazet@google.com>
Thu, 11 Jun 2015 16:15:15 +0000 (09:15 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 11 Jun 2015 23:33:10 +0000 (16:33 -0700)
tcp_gso_segment() and tcp_gro_receive() are not strictly
part of TCP stack. They should not assume tcp_skb_mss(skb)
is in fact skb_shinfo(skb)->gso_size.

This will allow us to change tcp_skb_mss() in following patches.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_offload.c

index 3f7c2fca5431891f473c9ace152a6b3e04443008..9864a2dbadce8457bc0c78fa13475cab6c19ec6b 100644 (file)
@@ -77,7 +77,7 @@ struct sk_buff *tcp_gso_segment(struct sk_buff *skb,
        oldlen = (u16)~skb->len;
        __skb_pull(skb, thlen);
 
-       mss = tcp_skb_mss(skb);
+       mss = skb_shinfo(skb)->gso_size;
        if (unlikely(skb->len <= mss))
                goto out;
 
@@ -242,7 +242,7 @@ found:
                flush |= *(u32 *)((u8 *)th + i) ^
                         *(u32 *)((u8 *)th2 + i);
 
-       mss = tcp_skb_mss(p);
+       mss = skb_shinfo(p)->gso_size;
 
        flush |= (len - 1) >= mss;
        flush |= (ntohl(th2->seq) + skb_gro_len(p)) ^ ntohl(th->seq);