Skip to content

Commit

Permalink
use skb_end_offset() in skb_try_coalesce()
Browse files Browse the repository at this point in the history
Commit ec47ea8(skb: Add inline helper for getting the skb end offset from
head) introduces this helper function, skb_end_offset(),
we should make use of it.

Signed-off-by: Weiping Pan <wpan@redhat.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Weiping Pan authored and David S. Miller committed Oct 1, 2012
1 parent e4d680c commit f4b549a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/core/skbuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -3483,8 +3483,7 @@ bool skb_try_coalesce(struct sk_buff *to, struct sk_buff *from,
skb_shinfo(from)->nr_frags > MAX_SKB_FRAGS)
return false;

delta = from->truesize -
SKB_TRUESIZE(skb_end_pointer(from) - from->head);
delta = from->truesize - SKB_TRUESIZE(skb_end_offset(from));
}

WARN_ON_ONCE(delta < len);
Expand Down

0 comments on commit f4b549a

Please sign in to comment.