Commit 29c2731c authored by Sean Hefty's avatar Sean Hefty Committed by Roland Dreier

IB/cm: Fix handling of duplicate SIDR REQs

Fix handling to duplicate SIDR REQs to avoid sending a reject if a
duplicate is detected.  Duplicates should just be silently discarded.
Signed-off-by: default avatarSean Hefty <sean.hefty@intel.com>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 5d861be8
...@@ -2794,7 +2794,6 @@ static int cm_sidr_req_handler(struct cm_work *work) ...@@ -2794,7 +2794,6 @@ static int cm_sidr_req_handler(struct cm_work *work)
work->mad_recv_wc->recv_buf.grh, work->mad_recv_wc->recv_buf.grh,
&cm_id_priv->av); &cm_id_priv->av);
cm_id_priv->id.remote_id = sidr_req_msg->request_id; cm_id_priv->id.remote_id = sidr_req_msg->request_id;
cm_id_priv->id.state = IB_CM_SIDR_REQ_RCVD;
cm_id_priv->tid = sidr_req_msg->hdr.tid; cm_id_priv->tid = sidr_req_msg->hdr.tid;
atomic_inc(&cm_id_priv->work_count); atomic_inc(&cm_id_priv->work_count);
...@@ -2804,6 +2803,7 @@ static int cm_sidr_req_handler(struct cm_work *work) ...@@ -2804,6 +2803,7 @@ static int cm_sidr_req_handler(struct cm_work *work)
spin_unlock_irq(&cm.lock); spin_unlock_irq(&cm.lock);
goto out; /* Duplicate message. */ goto out; /* Duplicate message. */
} }
cm_id_priv->id.state = IB_CM_SIDR_REQ_RCVD;
cur_cm_id_priv = cm_find_listen(cm_id->device, cur_cm_id_priv = cm_find_listen(cm_id->device,
sidr_req_msg->service_id, sidr_req_msg->service_id,
sidr_req_msg->private_data); sidr_req_msg->private_data);
......
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