Skip to content

Commit

Permalink
net: remove useless prefetch() call
Browse files Browse the repository at this point in the history
There is no gain using prefetch() in dev_hard_start_xmit(), since
we already had to read ops->ndo_select_queue pointer in dev_pick_tx(),
and both pointers are probably located in the same cache line.

This prefetch call slows down fast path because of a stall in address
computation.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Mar 21, 2009
1 parent 8d2f9e8 commit ed734a9
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1670,7 +1670,6 @@ int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
const struct net_device_ops *ops = dev->netdev_ops;
int rc;

prefetch(&dev->netdev_ops->ndo_start_xmit);
if (likely(!skb->next)) {
if (!list_empty(&ptype_all))
dev_queue_xmit_nit(skb, dev);
Expand Down

0 comments on commit ed734a9

Please sign in to comment.