diff options
author | Eric Dumazet <edumazet@google.com> | 2015-06-11 12:15:15 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-06-11 19:33:10 -0400 |
commit | a7eea416cb08a514f94c0ca5ff30c18783fab054 (patch) | |
tree | 78f17fe6f80ec35b08f71cffd333274bea1896a7 /net/ipv4/tcp_offload.c | |
parent | 57225e7720ac3d7ffcb0086c716753abf6e54e8d (diff) |
tcp: reserve tcp_skb_mss() to tcp stack
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>
Diffstat (limited to 'net/ipv4/tcp_offload.c')
-rw-r--r-- | net/ipv4/tcp_offload.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/tcp_offload.c b/net/ipv4/tcp_offload.c index 3f7c2fca5431..9864a2dbadce 100644 --- a/net/ipv4/tcp_offload.c +++ b/net/ipv4/tcp_offload.c | |||
@@ -77,7 +77,7 @@ struct sk_buff *tcp_gso_segment(struct sk_buff *skb, | |||
77 | oldlen = (u16)~skb->len; | 77 | oldlen = (u16)~skb->len; |
78 | __skb_pull(skb, thlen); | 78 | __skb_pull(skb, thlen); |
79 | 79 | ||
80 | mss = tcp_skb_mss(skb); | 80 | mss = skb_shinfo(skb)->gso_size; |
81 | if (unlikely(skb->len <= mss)) | 81 | if (unlikely(skb->len <= mss)) |
82 | goto out; | 82 | goto out; |
83 | 83 | ||
@@ -242,7 +242,7 @@ found: | |||
242 | flush |= *(u32 *)((u8 *)th + i) ^ | 242 | flush |= *(u32 *)((u8 *)th + i) ^ |
243 | *(u32 *)((u8 *)th2 + i); | 243 | *(u32 *)((u8 *)th2 + i); |
244 | 244 | ||
245 | mss = tcp_skb_mss(p); | 245 | mss = skb_shinfo(p)->gso_size; |
246 | 246 | ||
247 | flush |= (len - 1) >= mss; | 247 | flush |= (len - 1) >= mss; |
248 | flush |= (ntohl(th2->seq) + skb_gro_len(p)) ^ ntohl(th->seq); | 248 | flush |= (ntohl(th2->seq) + skb_gro_len(p)) ^ ntohl(th->seq); |