Skip to content

Commit

Permalink
vxge: don't drop frame on tx queue full
Browse files Browse the repository at this point in the history
The vxge driver will drop a packet in its transmit function if the number
of TxDs available hits 0.  Instead of doing that, simply stop the transmit
queue when transmitting a packet with the last available TxD.

Signed-off-by: Benjamin LaHaise <ben.lahaise@neterion.com>
Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Benjamin LaHaise authored and David S. Miller committed Aug 5, 2009
1 parent 36e89d7 commit 4403b37
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/net/vxge/vxge-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -895,6 +895,12 @@ vxge_xmit(struct sk_buff *skb, struct net_device *dev)
goto _exit2;
}

/* Last TXD? Stop tx queue to avoid dropping packets. TX
* completion will resume the queue.
*/
if (avail == 1)
vxge_stop_tx_queue(fifo);

status = vxge_hw_fifo_txdl_reserve(fifo_hw, &dtr, &dtr_priv);
if (unlikely(status != VXGE_HW_OK)) {
vxge_debug_tx(VXGE_ERR,
Expand Down

0 comments on commit 4403b37

Please sign in to comment.