<html><body>
<p>Hello Roland,<br>
<br>
In case post_send drain WR failure, release connections in stale task.<br>
<br>
Signed-off-by: Shirley Ma <xma@us.ibm.com><br>
--------------------------<br>
<br>
drivers/infiniband/ulp/ipoib/ipoib_cm.c | 11 +++++++++++<br>
1 files changed, 11 insertions(+), 0 deletions(-)<br>
<br>
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c<br>
index 442dd49..06e5933 100644<br>
--- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c<br>
+++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c<br>
@@ -1344,6 +1344,17 @@ static void ipoib_cm_stale_task(struct work_struct *work)<br>
int ret;<br>
<br>
spin_lock_irq(&priv->lock);<br>
+ /* in case post drain WR failure, clean up connection here */<br>
+ while (!list_empty(&priv->cm.rx_flush_list)) {<br>
+ /* List is sorted by LRU, start from tail,<br>
+ * stop when we see a recently used entry */<br>
+ p = list_entry(priv->cm.rx_flush_list.prev, typeof(*p), list);<br>
+ p->state = IPOIB_CM_RX_ERROR;<br>
+ if (time_before_eq(jiffies, p->jiffies + IPOIB_CM_RX_DRAIN))<br>
+ break;<br>
+ list_move(&p->list, &priv->cm.rx_reap_list);<br>
+ <br>
+ }<br>
/* wait for the CQ drain, and clean up stale connections */<br>
while (!list_empty(&priv->cm.rx_error_list)) {<br>
/* List is sorted by LRU, start from tail,<br>
<br>
<i>(See attached file: post_drain_wr_failure.patch)</i><br>
<br>
Shirley </body></html>