summary refs log tree commit diff
path: root/net/ethernet
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-05-02 02:21:44 -0700
committerDavid S. Miller <davem@davemloft.net>2010-05-02 02:21:44 -0700
commit47d29646a2c1c147d8a7598aeac2c87dd71ed638 (patch)
treeb38f05d82883b5c0fc885812172a546af966d419 /net/ethernet
parent43815482370c510c569fd18edb57afcb0fa8cab6 (diff)
downloadlinux-47d29646a2c1c147d8a7598aeac2c87dd71ed638.tar.gz
net: Inline skb_pull() in eth_type_trans().
In commit 6be8ac2f ("[NET]: uninline skb_pull, de-bloats a lot")
we uninlined skb_pull.

But in some critical paths it makes sense to inline this thing
and it helps performance significantly.

Create an skb_pull_inline() so that we can do this in a way that
serves also as annotation.

Based upon a patch by Eric Dumazet.

Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ethernet')
-rw-r--r--net/ethernet/eth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c
index 0c0d272a9888..61ec0329316c 100644
--- a/net/ethernet/eth.c
+++ b/net/ethernet/eth.c
@@ -162,7 +162,7 @@ __be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev)
 
 	skb->dev = dev;
 	skb_reset_mac_header(skb);
-	skb_pull(skb, ETH_HLEN);
+	skb_pull_inline(skb, ETH_HLEN);
 	eth = eth_hdr(skb);
 
 	if (unlikely(is_multicast_ether_addr(eth->h_dest))) {