[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1572528956-8504-1-git-send-email-dag.moxnes@oracle.com>
Date: Thu, 31 Oct 2019 14:35:56 +0100
From: Dag Moxnes <dag.moxnes@...cle.com>
To: santosh.shilimkar@...cle.com, netdev@...r.kernel.org,
linux-rdma@...r.kernel.org, rds-devel@....oracle.com
Cc: davem@...emloft.net, dag.moxnes@...cle.com, haakon.bugge@...cle.com
Subject: [PATCH net-next] rds: Cancel pending connections on connection request
RDS connections can enter the RDS_CONN_CONNECTING state in two ways:
1. It can be started using the connection workqueue (this can happen
both on queue_reconnect and upon send if the workqueue is not up)
2. It can enter the RDS_CONN_CONNECTING state due to an incoming
connection request
In case RDS connections enter RDS_CONN_CONNECTION state due to an incoming
connection request, the connection workqueue might already be scheduled. In
this case the connection workqueue needs to be cancelled.
Signed-off-by: Dag Moxnes <dag.moxnes@...cle.com>
---
net/rds/ib_cm.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c
index 6b345c858d..1fdd76f70d 100644
--- a/net/rds/ib_cm.c
+++ b/net/rds/ib_cm.c
@@ -880,6 +880,12 @@ int rds_ib_cm_handle_connect(struct rdma_cm_id *cm_id,
rds_ib_stats_inc(s_ib_connect_raced);
}
goto out;
+ } else {
+ /* Cancel any pending reconnect */
+ struct rds_conn_path *cp = &conn->c_path[0];
+
+ cancel_delayed_work_sync(&cp->cp_conn_w);
+ rds_clear_reconnect_pending_work_bit(cp);
}
ic = conn->c_transport_data;
--
2.20.1
Powered by blists - more mailing lists