[openib-general] [PATCH] ipoib

Eli Cohen eli at mellanox.co.il
Sun May 28 05:47:28 PDT 2006


Sorry about the badly formatted previous email - here it is again...

When ipoib_stop is called it first calls netif_stop_queue() to
stop the kernel from passing more packets to the network driver.
After that ipoib_ib_dev_stop() moves the QP to error causing all
pending work requests to complete with error but then the completion
handler may call netif_wake_queue() re-enabling packet transfer.
This patch makes sure to enable calling netif_wake_queue() only
if IPOIB_FLAG_ADMIN_UP is set.

Signed-off-by: Eli Cohen <eli at mellanox.co.il>
Signed-off-by: Michael Tsirkin <mst at mellanox.co.il>

Index: linux-kernel/infiniband/ulp/ipoib/ipoib_ib.c
===================================================================
--- linux-kernel.orig/infiniband/ulp/ipoib/ipoib_ib.c	2006-05-28 
12:53:19.661381000 +0300
+++ linux-kernel/infiniband/ulp/ipoib/ipoib_ib.c	2006-05-28 13:00:02.512096000 
+0300
@@ -269,6 +269,7 @@
 		spin_lock_irqsave(&priv->tx_lock, flags);
 		++priv->tx_tail;
 		if (netif_queue_stopped(dev) &&
+		    test_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags) &&
 		    priv->tx_head - priv->tx_tail <= ipoib_sendq_size >> 1)
 			netif_wake_queue(dev);
 		spin_unlock_irqrestore(&priv->tx_lock, flags);



More information about the general mailing list