gro: Inline skb_gro_header and cache frag0 virtual address
authorHerbert Xu <herbert@gondor.apana.org.au>
Tue, 26 May 2009 18:50:21 +0000 (18:50 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 May 2009 10:25:55 +0000 (03:25 -0700)
commit78a478d0efd9e86e5345b436e130497b4e5846e8
tree273e7565811add8216267f5893335bdb7928a6b7
parent42da6994ca6d20ad1d4e30255dee98047db454e7
gro: Inline skb_gro_header and cache frag0 virtual address

The function skb_gro_header is called four times per packet which
quickly adds up at 10Gb/s.  This patch inlines it to allow better
optimisations.

Some architectures perform multiplication for page_address, which
is done by each skb_gro_header invocation.  This patch caches that
value in skb->cb to avoid the unnecessary multiplications.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h
net/core/dev.c