lkml.org 
[lkml]   [2013]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v3 2/5] staging: et131x: drop packet when error occurs in et131x_tx
From
On Fri, Nov 22, 2013 at 7:56 PM, Denis Kirjanov <kirjanov@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


\
 
 \ /
  Last update: 2013-11-22 13:41    [W:0.052 / U:0.620 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site