netdev: Fix lockdep warnings in multiqueue configurations.
When support for multiple TX queues were added, the netif_tx_lock() routines we converted to iterate over all TX queues and grab each queue's spinlock. This causes heartburn for lockdep and it's not a healthy thing to do with lots of TX queues anyways. So modify this to use a top-level lock and a "frozen" state for the individual TX queues. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -135,7 +135,8 @@ static inline int qdisc_restart(struct Qdisc *q)
|
||||
txq = netdev_get_tx_queue(dev, skb_get_queue_mapping(skb));
|
||||
|
||||
HARD_TX_LOCK(dev, txq, smp_processor_id());
|
||||
if (!netif_subqueue_stopped(dev, skb))
|
||||
if (!netif_tx_queue_stopped(txq) &&
|
||||
!netif_tx_queue_frozen(txq))
|
||||
ret = dev_hard_start_xmit(skb, dev, txq);
|
||||
HARD_TX_UNLOCK(dev, txq);
|
||||
|
||||
@@ -162,7 +163,8 @@ static inline int qdisc_restart(struct Qdisc *q)
|
||||
break;
|
||||
}
|
||||
|
||||
if (ret && netif_tx_queue_stopped(txq))
|
||||
if (ret && (netif_tx_queue_stopped(txq) ||
|
||||
netif_tx_queue_frozen(txq)))
|
||||
ret = 0;
|
||||
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user