void (*poll_controller)(struct net_device *dev);
#endif
+ u16 (*select_queue)(struct net_device *dev,
+ struct sk_buff *skb);
+
#ifdef CONFIG_NET_NS
/* Network namespace this network device is inside */
struct net *nd_net;
{
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);
}
}
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