netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] use skb_end_offset() in skb_try_coalesce()
@ 2012-09-29  6:15 Weiping Pan
  2012-10-01 17:28 ` Eric Dumazet
  0 siblings, 1 reply; 3+ messages in thread
From: Weiping Pan @ 2012-09-29  6:15 UTC (permalink / raw)
  To: netdev; +Cc: Weiping Pan

Commit ec47ea824774(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>
---
 net/core/skbuff.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index e33ebae..86f040a 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -3488,8 +3488,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);
-- 
1.7.4.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-10-01 20:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-29  6:15 [PATCH net] use skb_end_offset() in skb_try_coalesce() Weiping Pan
2012-10-01 17:28 ` Eric Dumazet
2012-10-01 20:46   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).