skb: Add inline helper for getting the skb end offset from head
authorAlexander Duyck <alexander.h.duyck@intel.com>
Fri, 4 May 2012 14:26:56 +0000 (14:26 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Jun 2014 23:02:00 +0000 (16:02 -0700)
commit1102122b2bdf4307cae269c725fab4c9c6141f5b
tree7e0f789b3587400fd8369a0266c5e7013696ab10
parent62e1a647e74f708eeabf1c79f3d40833d8ce45eb
skb: Add inline helper for getting the skb end offset from head

[ Upstream commit ec47ea82477404631d49b8e568c71826c9b663ac ]

With the recent changes for how we compute the skb truesize it occurs to me
we are probably going to have a lot of calls to skb_end_pointer -
skb->head.  Instead of running all over the place doing that it would make
more sense to just make it a separate inline skb_end_offset(skb) that way
we can return the correct value without having gcc having to do all the
optimization to cancel out skb->head - skb->head.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/atm/ambassador.c
drivers/atm/idt77252.c
drivers/net/wimax/i2400m/usb-rx.c
drivers/staging/octeon/ethernet-tx.c
include/linux/skbuff.h
net/core/skbuff.c