[openib-general] [PATCH] ipoib: fix ah leak at interface down
Michael S. Tsirkin
mst at mellanox.co.il
Mon May 29 08:15:47 PDT 2006
Ugh, it seems Eli's client has wrapped some lines again.
Here it is in a format that actually can be applied, and a slighly
more detailed description of the problem it fixes for us.
If this makes sense, please push into 2.6.17.
---
When ipoib_stop is called it first calls netif_stop_queue() to stop the kernel
from passing more packets to the network driver. However, the completion
handler may call netif_wake_queue() re-enabling packet transfer.
This might result in leaks (we see ah leaks which we think can be attributed to
this bug) as new packets get posted while the interface is going down.
Signed-off-by: Eli Cohen <eli at mellanox.co.il>
Signed-off-by: Michael Tsirkin <mst at mellanox.co.il>
Index: linux-2.6.16/drivers/infiniband/ulp/ipoib/ipoib_ib.c
===================================================================
--- linux-2.6.16.orig/drivers/infiniband/ulp/ipoib/ipoib_ib.c 2006-05-28 10:38:01.000000000 +0300
+++ linux-2.6.16/drivers/infiniband/ulp/ipoib/ipoib_ib.c 2006-05-29 17:28:12.000000000 +0300
@@ -269,6 +269,7 @@ static void ipoib_ib_handle_wc(struct ne
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);
--
MST
More information about the general
mailing list