Hello Roland,
In case post_send drain WR failure, release connections in stale task.
Signed-off-by: Shirley Ma <[EMAIL PROTECTED]>
--------------------------
drivers/infiniband/ulp/ipoib/ipoib_cm.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c
b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
index 442dd49..06e5933 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
@@ -1344,6 +1344,17 @@ static void ipoib_cm_stale_task(struct work_struct *work)
int ret;
spin_lock_irq(&priv->lock);
+ /* in case post drain WR failure, clean up connection here */
+ while (!list_empty(&priv->cm.rx_flush_list)) {
+ /* List is sorted by LRU, start from tail,
+ * stop when we see a recently used entry */
+ p = list_entry(priv->cm.rx_flush_list.prev, typeof(*p), list);
+ p->state = IPOIB_CM_RX_ERROR;
+ if (time_before_eq(jiffies, p->jiffies + IPOIB_CM_RX_DRAIN))
+ break;
+ list_move(&p->list, &priv->cm.rx_reap_list);
+
+ }
/* wait for the CQ drain, and clean up stale connections */
while (!list_empty(&priv->cm.rx_error_list)) {
/* List is sorted by LRU, start from tail,
(See attached file: post_drain_wr_failure.patch)
Shirley
post_drain_wr_failure.patch
Description: Binary data
_______________________________________________ general mailing list [email protected] http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
