Subject: Re: [RFC] [PATCH] Don't run __qdisc_run() on a stopped TX queue

From: Eric Dumazet <[email-masked]>
Date: Fri, 24 Jul 2009 14:46:06 +0200

Krishna Kumar a écrit :
> From: Krishna Kumar <[email-masked]>
> diff -ruNp org/net/sched/sch_generic.c new/net/sched/sch_generic.c
> --- org/net/sched/sch_generic.c	2009-05-25 07:48:07.000000000 +0530
> +++ new/net/sched/sch_generic.c	2009-07-20 13:09:18.000000000 +0530
> @@ -56,12 +56,8 @@ static inline struct sk_buff *dequeue_sk
>  	struct sk_buff *skb = q->gso_skb;
>  
>  	if (unlikely(skb)) {
> -		struct net_device *dev = qdisc_dev(q);
> -		struct netdev_queue *txq;
> -
>  		/* check the reason of requeuing without tx lock first */
> -		txq = netdev_get_tx_queue(dev, skb_get_queue_mapping(skb));
> -		if (!netif_tx_queue_stopped(txq) && !netif_tx_queue_frozen(txq))
> +		if (!netif_tx_queue_frozen(q->dev_queue))
>  			q->gso_skb = NULL;

This part might be a separate patch...

Are we sure these are equivalent ?

OLD)
	struct net_device *dev = qdisc_dev(q);
	struct netdev_queue *txq;
	txq = netdev_get_tx_queue(dev, skb_get_queue_mapping(skb));

NEW)
	struct netdev_queue *txq = q->dev_queue;