[PATCH 1/4]: Spidernet stop queue when queue is full

Arnd Bergmann arnd at arndb.de
Wed Oct 4 08:19:42 EST 2006


On Tuesday 03 October 2006 22:57, Linas Vepstas wrote:
> +       if ((chain->head->next == chain->tail->prev) ||
> +          (spider_net_get_descr_status(descr) != SPIDER_NET_DESCR_NOT_IN_USE)) {
>                 result = NETDEV_TX_LOCKED;
>                 goto out;
>         }

...

>  out:
> -       netif_wake_queue(netdev);
> +       card->netdev_stats.tx_dropped++;
> +       netif_stop_queue(netdev);
>         return result;
>  }

Hmm, this looks a little strange to me. I would assume that we should not
stop the queue when the device is locked, but only when it is busy.

I would assume though that the fix is to return NETDEV_TX_BUSY instead
of NETDEV_TX_LOCKED in the case above, while the netif_stop_queue()
is correct here.

	Arnd <><



More information about the Linuxppc-dev mailing list