[ofw] [PATCH] match WinOF 2.2 DAPL release

Smith, Stan stan.smith at intel.com
Thu Mar 18 13:08:34 PDT 2010


Revision: 2754
Author: stansmith
Date: 12:30:11 PM, Thursday, March 18, 2010
Message:
[DAPL] match WinOF 2.2 DAPL release.

signed-off-by: stan smith <stan.smith at intel.com>

----
Modified : /gen1/trunk/ulp/dapl2/dapl/openib_scm/cm.c

--- a/ulp/dapl2/dapl/openib_scm/cm.c    Thu Mar 18 12:31:39 2010
+++ b/ulp/dapl2/dapl/openib_scm/cm.c    Thu Mar 18 12:31:21 2010
@@ -311,13 +311,13 @@
 void dapls_cm_release(dp_ib_cm_handle_t cm_ptr)
 {
        dapl_os_lock(&cm_ptr->lock);
-       cm_ptr->ref_count--;
-       if (cm_ptr->ref_count) {
-                dapl_os_unlock(&cm_ptr->lock);
-               return;
-       }
-       dapl_os_unlock(&cm_ptr->lock);
-       dapli_cm_dealloc(cm_ptr);
+       cm_ptr->ref_count--;
+       if (cm_ptr->ref_count) {
+                dapl_os_unlock(&cm_ptr->lock);
+               return;
+       }
+       dapl_os_unlock(&cm_ptr->lock);
+       dapli_cm_dealloc(cm_ptr);
 }

 static dp_ib_cm_handle_t dapli_cm_alloc(DAPL_EP *ep_ptr)
@@ -848,7 +848,7 @@
        struct sockaddr_in addr;
        ib_cm_srvc_handle_t cm_ptr = NULL;
        DAT_RETURN dat_status = DAT_SUCCESS;
-       int opt = 1;
+       int opt = 1;

        dapl_dbg_log(DAPL_DBG_TYPE_CM,
                     " setup listen(ia_ptr %p ServiceID %d sp_ptr %p)\n",
@@ -870,7 +870,7 @@
                goto bail;
        }

-       setsockopt(cm_ptr->socket, SOL_SOCKET, SO_REUSEADDR, (char*)&opt, sizeof(opt));
+       setsockopt(cm_ptr->socket, SOL_SOCKET, SO_REUSEADDR, (char*)&opt, sizeof(opt));
        addr.sin_port = htons(serviceID + 1000);
        addr.sin_family = AF_INET;
        addr.sin_addr = ((struct sockaddr_in *) &ia_ptr->hca_ptr->hca_address)->sin_addr;
@@ -1143,6 +1143,10 @@
        cm_ptr->hca = ia_ptr->hca_ptr;
        cm_ptr->state = DCM_ACCEPTED;

+       /* Link CM to EP, already queued on work thread */
+       dapl_ep_link_cm(ep_ptr, cm_ptr);
+       cm_ptr->ep = ep_ptr;
+
        local.p_size = htons(p_size);
        iov[0].iov_base = (void *)&local;
        iov[0].iov_len = exp;
@@ -1160,6 +1164,8 @@
                         strerror(errno), len,
                         inet_ntoa(((struct sockaddr_in *)
                                   &cm_ptr->msg.daddr.so)->sin_addr));
+               dapl_ep_unlink_cm(ep_ptr, cm_ptr);
+               cm_ptr->ep = NULL;
                goto bail;
        }

@@ -1176,9 +1182,6 @@

        dapl_dbg_log(DAPL_DBG_TYPE_EP, " PASSIVE: accepted!\n");

-       /* Link CM to EP, already queued on work thread */
-       dapl_ep_link_cm(ep_ptr, cm_ptr);
-       cm_ptr->ep = ep_ptr;
        return DAT_SUCCESS;
 bail:
        /* schedule cleanup from workq */



More information about the ofw mailing list