Commit f4b549a5 authored by Weiping Pan's avatar Weiping Pan Committed by David S. Miller

use skb_end_offset() in skb_try_coalesce()

Commit ec47ea82(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: default avatarWeiping Pan <wpan@redhat.com>
Acked-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e4d680c7
...@@ -3483,8 +3483,7 @@ bool skb_try_coalesce(struct sk_buff *to, struct sk_buff *from, ...@@ -3483,8 +3483,7 @@ bool skb_try_coalesce(struct sk_buff *to, struct sk_buff *from,
skb_shinfo(from)->nr_frags > MAX_SKB_FRAGS) skb_shinfo(from)->nr_frags > MAX_SKB_FRAGS)
return false; return false;
delta = from->truesize - delta = from->truesize - SKB_TRUESIZE(skb_end_offset(from));
SKB_TRUESIZE(skb_end_pointer(from) - from->head);
} }
WARN_ON_ONCE(delta < len); WARN_ON_ONCE(delta < len);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment