[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1272840617-17084-1-git-send-email-xiaosuo@gmail.com>
Date: Mon, 3 May 2010 06:50:17 +0800
From: Changli Gao <xiaosuo@...il.com>
To: David Miller <davem@...emloft.net>
Cc: eric.dumazet@...il.com, netdev@...r.kernel.org,
Changli Gao <xiaosuo@...il.com>
Subject: [PATCH] ethernet: call __skb_pull() in eth_type_trans()
call __skb_pull() in eth_type_trans().
Since the callers of eth_type_trans() always feed it long enough packets,
we can use __skb_pull() to save some cycles.
Signed-off-by: Changli Gao <xiaosuo@...il.com>
----
net/ethernet/eth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c
index 61ec032..aacbaf7 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_inline(skb, ETH_HLEN);
+ __skb_pull(skb, ETH_HLEN);
eth = eth_hdr(skb);
if (unlikely(is_multicast_ether_addr(eth->h_dest))) {
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists