[ofa-general] [PATCH] ib/cm: fix handling of duplicate SIDR REQs
Sean Hefty
sean.hefty at intel.com
Mon Jul 2 15:47:21 PDT 2007
Fix handling to duplicate SIDR REQs to avoid sending a reject if
one is detected. Duplicates should simply be discarded.
Signed-off-by: Sean Hefty <sean.hefty at intel.com>
---
I went with moving where the state was set, as it seemed a little cleaner
to me. The REQ_RCVD state implies that we can send a SIDR REP by calling
ib_send_cm_sidr_rep(), which is not the case. The REQ_RCVD state also
indicates that the cm_id_priv is located in the remote_sidr_table, but the
insertion failed, so we should not try to remove the item later.
drivers/infiniband/core/cm.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
index c7007c4..9135a8c 100644
--- a/drivers/infiniband/core/cm.c
+++ b/drivers/infiniband/core/cm.c
@@ -2794,7 +2794,6 @@ static int cm_sidr_req_handler(struct cm_work *work)
work->mad_recv_wc->recv_buf.grh,
&cm_id_priv->av);
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;
atomic_inc(&cm_id_priv->work_count);
@@ -2804,6 +2803,7 @@ static int cm_sidr_req_handler(struct cm_work *work)
spin_unlock_irq(&cm.lock);
goto out; /* Duplicate message. */
}
+ cm_id_priv->id.state = IB_CM_SIDR_REQ_RCVD;
cur_cm_id_priv = cm_find_listen(cm_id->device,
sidr_req_msg->service_id,
sidr_req_msg->private_data);
More information about the general
mailing list