[ofa-general] [PATCH] fix flow of handling duplicate SIDR REQs

Sean Hefty sean.hefty at intel.com
Mon Jul 2 13:38:00 PDT 2007


> Can you clarify what "waiting to set the cm id state" means?

Something like this:

diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
index c7007c4..3dca385 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);

@@ -2813,6 +2812,7 @@ static int cm_sidr_req_handler(struct cm_work *work)
                /* todo: reply with no match */
                goto out; /* No match. */
        }
+       cm_id_priv->id.state = IB_CM_SIDR_REQ_RCVD;
        atomic_inc(&cur_cm_id_priv->refcount);
        spin_unlock_irq(&cm.lock);

 
> Assuming you refer to "todo: reply with no match" in cm_sidr_req_handler,
> what else need to be added to the current code? is  it sending the REP
> with a different status (ie not 2) or sending a REJ?

This is all that needs to be done.  The status should be 1, not 2.  At this
point, it's likely just a couple lines to fix.

- Sean



More information about the general mailing list