Skip to contentSkip to conversation

vxge: don't drop frame on tx queue full

PATCH In review Benjamin LaHaise 1 participant 1 message Aug 4, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/6 vxge: don't drop frame on tx queue full

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.

---
 drivers/net/vxge/vxge-main.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
drivers/net/vxge/vxge-main.c +6 -0
index 7b5402b..7c2241c 100644
@@ -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,
Signature · 1 line
1.6.0.6