[PATCH net-next 1/3] gianfar: Add support for byte queue limits.

Paul Gortmaker paul.gortmaker at windriver.com
Mon Mar 19 08:04:04 EST 2012


On Sun, Mar 18, 2012 at 4:20 PM, Eric Dumazet <eric.dumazet at gmail.com> wrote:
> Le dimanche 18 mars 2012 à 12:56 -0400, Paul Gortmaker a écrit :
>
> ...
>
>>                * we add this skb back into the pool, if it's the right size
>> @@ -2557,13 +2568,15 @@ static int gfar_clean_tx_ring(struct gfar_priv_tx_q *tx_queue)
>>       }
>>
>>       /* If we freed a buffer, we can restart transmission, if necessary */
>> -     if (__netif_subqueue_stopped(dev, tx_queue->qindex) && tx_queue->num_txbdfree)
>> -             netif_wake_subqueue(dev, tx_queue->qindex);
>> +     if (__netif_subqueue_stopped(dev, tqi) && tx_queue->num_txbdfree)
>> +             netif_wake_subqueue(dev, tqi);
>>
>
> You can use netif_tx_queue_stopped(txq) here instead of
> __netif_subqueue_stopped(dev, tqi)

Yes, and it looks better too.  I will do it as a patch #4 since I think
there is some small value in leaving the above patch chunk alone,
since it makes it clear that it was just the introduction of a local
variable and the code was otherwise unchanged here.

Will resend shortly....

Thanks,
Paul.
---

>
>>       /* Update dirty indicators */
>>       tx_queue->skb_dirtytx = skb_dirtytx;
>>       tx_queue->dirty_tx = bdp;
>>
>> +     netdev_tx_completed_queue(txq, howmany, bytes_sent);
>> +
>>       return howmany;
>>  }
>>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


More information about the Linuxppc-dev mailing list