Commit 84351367 authored by Jenny Derzhavetz's avatar Jenny Derzhavetz Committed by Sasha Levin

iser-target: Separate flows for np listeners and connections cma events

[ Upstream commit f81bf458 ]

No need to restrict this check to specific events.
Signed-off-by: default avatarJenny Derzhavetz <jennyf@mellanox.com>
Signed-off-by: default avatarSagi Grimberg <sagig@mellanox.com>
Cc: stable@vger.kernel.org # v3.10+
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
parent 82ba90c0
...@@ -928,14 +928,9 @@ isert_disconnected_handler(struct rdma_cm_id *cma_id, ...@@ -928,14 +928,9 @@ isert_disconnected_handler(struct rdma_cm_id *cma_id,
enum rdma_cm_event_type event) enum rdma_cm_event_type event)
{ {
struct isert_np *isert_np = cma_id->context; struct isert_np *isert_np = cma_id->context;
struct isert_conn *isert_conn; struct isert_conn *isert_conn = cma_id->qp->qp_context;
bool terminating = false; bool terminating = false;
if (isert_np->np_cm_id == cma_id)
return isert_np_cma_handler(cma_id->context, event);
isert_conn = cma_id->qp->qp_context;
mutex_lock(&isert_conn->mutex); mutex_lock(&isert_conn->mutex);
terminating = (isert_conn->state == ISER_CONN_TERMINATING); terminating = (isert_conn->state == ISER_CONN_TERMINATING);
isert_conn_terminate(isert_conn); isert_conn_terminate(isert_conn);
...@@ -973,11 +968,15 @@ isert_connect_error(struct rdma_cm_id *cma_id) ...@@ -973,11 +968,15 @@ isert_connect_error(struct rdma_cm_id *cma_id)
static int static int
isert_cma_handler(struct rdma_cm_id *cma_id, struct rdma_cm_event *event) isert_cma_handler(struct rdma_cm_id *cma_id, struct rdma_cm_event *event)
{ {
struct isert_np *isert_np = cma_id->context;
int ret = 0; int ret = 0;
isert_info("event %d status %d id %p np %p\n", event->event, isert_info("event %d status %d id %p np %p\n", event->event,
event->status, cma_id, cma_id->context); event->status, cma_id, cma_id->context);
if (isert_np->np_cm_id == cma_id)
return isert_np_cma_handler(cma_id->context, event->event);
switch (event->event) { switch (event->event) {
case RDMA_CM_EVENT_CONNECT_REQUEST: case RDMA_CM_EVENT_CONNECT_REQUEST:
ret = isert_connect_request(cma_id, event); ret = isert_connect_request(cma_id, event);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment