Skip to content

Commit

Permalink
net: minor: tcp: use tcp_skb_mss helper in tcp_tso_segment
Browse files Browse the repository at this point in the history
We have the minimal inline helper tcp_skb_mss to access
skb_shinfo(skb)->gso_size, so also use it here to get mss.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Daniel Borkmann authored and David S. Miller committed Jun 7, 2013
1 parent 350e780 commit 5ee9859
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/ipv4/tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2905,7 +2905,7 @@ struct sk_buff *tcp_tso_segment(struct sk_buff *skb,
oldlen = (u16)~skb->len;
__skb_pull(skb, thlen);

mss = skb_shinfo(skb)->gso_size;
mss = tcp_skb_mss(skb);
if (unlikely(skb->len <= mss))
goto out;

Expand Down Expand Up @@ -3071,7 +3071,7 @@ struct sk_buff **tcp_gro_receive(struct sk_buff **head, struct sk_buff *skb)
flush |= *(u32 *)((u8 *)th + i) ^
*(u32 *)((u8 *)th2 + i);

mss = skb_shinfo(p)->gso_size;
mss = tcp_skb_mss(p);

flush |= (len - 1) >= mss;
flush |= (ntohl(th2->seq) + skb_gro_len(p)) ^ ntohl(th->seq);
Expand Down

0 comments on commit 5ee9859

Please sign in to comment.