On Fri, Nov 22, 2013 at 7:56 PM, Denis Kirjanov <kirja...@gmail.com> wrote:
> If you have no free TX descriptors that means that something went
> wrong and it's a BUG. You have to tell the stack to stop sending
> packets using netif_stop_queue() and reenable transmissions once tx
> descriptors will be available. There are a lot of live examples in the
> source tree.
>
The stop queue code dose not show in the diff, actually it is at the
beginning of et131x_tx:

/* stop the queue if it's getting full */
if (adapter->tx_ring.used >= NUM_TCB - 1 &&
    !netif_queue_stopped(netdev))
        netif_stop_queue(netdev);

I think the logic is when there is only one descriptor left, stop the
queue and transmit this packet, if tx queue is full, it must have been
stopped, so just drop the packet.

Cheers
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to