Subject: Re: [PATCH 1/13]: netdev: Allocate multiple queues for TX.

From: Jarek Poplawski <[email-masked]>
Date: Wed, 16 Jul 2008 07:01:08 +0000

On 10-07-2008 12:56, David Miller wrote:
...
> diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
> index 243de93..4e2b865 100644
> --- a/net/sched/sch_generic.c
> +++ b/net/sched/sch_generic.c
> @@ -40,20 +40,30 @@
>   */
>  
>  void qdisc_lock_tree(struct net_device *dev)
> -	__acquires(dev->tx_queue.lock)
>  	__acquires(dev->rx_queue.lock)
>  {
> -	spin_lock_bh(&dev->tx_queue.lock);
> +	unsigned int i;
> +
> +	local_bh_disable();
> +	for (i = 0; i < dev->num_tx_queues; i++) {
> +		struct netdev_queue *txq = netdev_get_tx_queue(dev, i);
> +		spin_lock(&txq->lock);

I wonder if it was tested with lockdep? It seems additional
annotation is needed for such nesting (not counting rx_queue.lock
annotation).

Jarek P.

> +	}
>  	spin_lock(&dev->rx_queue.lock);
>  }
>  EXPORT_SYMBOL(qdisc_lock_tree);