summaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index f027a1ac4fb..7ca9564d2f4 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1670,6 +1670,9 @@ static struct netdev_queue *dev_pick_tx(struct net_device *dev,
{
u16 queue_index = 0;
+ if (dev->select_queue)
+ queue_index = dev->select_queue(dev, skb);
+
skb_set_queue_mapping(skb, queue_index);
return netdev_get_tx_queue(dev, queue_index);
}
@@ -1710,14 +1713,14 @@ int dev_queue_xmit(struct sk_buff *skb)
}
gso:
- txq = dev_pick_tx(dev, skb);
- spin_lock_prefetch(&txq->lock);
-
/* Disable soft irqs for various locks below. Also
* stops preemption for RCU.
*/
rcu_read_lock_bh();
+ txq = dev_pick_tx(dev, skb);
+ spin_lock_prefetch(&txq->lock);
+
/* Updates of qdisc are serialized by queue->lock.
* The struct Qdisc which is pointed to by qdisc is now a
* rcu structure - it may be accessed without acquiring