]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
Refresh of umad-free
authorSean Hefty <sean.hefty@intel.com>
Thu, 25 Mar 2010 22:52:42 +0000 (15:52 -0700)
committerSean Hefty <sean.hefty@intel.com>
Thu, 25 Mar 2010 22:52:42 +0000 (15:52 -0700)
trunk/ulp/dapl2/dapl/common/dapl_cr_callback.c
trunk/ulp/libibumad/src/umad.cpp

index 3997b38266aafbd692bdab3202c043d8d7bdc0ad..188e319ea4aae35741891dec0e5315f63c1d3f67 100644 (file)
@@ -125,6 +125,8 @@ void dapls_cr_callback(IN dp_ib_cm_handle_t ib_cm_handle, IN const ib_cm_events_
        } else {
                /* see if there is an EP connected with this CM handle */
                ep_ptr = dapli_get_sp_ep(ib_cm_handle, sp_ptr, dat_event_num);
+if (ep_ptr != ib_cm_handle->ep)
+       dapl_log(DAPL_DBG_TYPE_ERR, "ep_ptr mismatch!!!\n");
 
                /* if we lost a race with the CM just exit. */
                if (ep_ptr == NULL) {
index 8fd70b1fec9fba55967188f5de1b1b3aba451eb5..a25810774ffc19fa9858f8395b41f206c2b28a34 100644 (file)
@@ -171,7 +171,7 @@ int umad_get_ca(char *ca_name, umad_ca_t *ca)
        struct ibv_context      *context;\r
        ibv_device_attr         dev_attr;\r
        int                                     cnt, i, ret = 0;\r
-       uint8_t                         *ports;\r
+       uint8_t                         *ports, *port_alloc;\r
        size_t                          port_size;\r
 \r
        list = ibv_get_device_list(&cnt);\r
@@ -202,8 +202,8 @@ int umad_get_ca(char *ca_name, umad_ca_t *ca)
        }\r
 \r
        port_size = sizeof(umad_port_t) + sizeof(uint16_t) * UMAD_MAX_PKEYS;\r
-       ports = new uint8_t[port_size * dev_attr.phys_port_cnt];\r
-       if (ports == NULL) {\r
+       port_alloc = new uint8_t[port_size * dev_attr.phys_port_cnt];\r
+       if (port_alloc == NULL) {\r
                ret = -ENOMEM;\r
                goto close;\r
        }\r
@@ -212,7 +212,8 @@ int umad_get_ca(char *ca_name, umad_ca_t *ca)
        umad_convert_ca_attr(ca, &dev_attr);\r
        memset(ca->ports, 0, sizeof(ca->ports));\r
 \r
-       for (i = 1; i <= dev_attr.phys_port_cnt; i++, ports += port_size) {\r
+       for (i = 1, ports = port_alloc; i <= dev_attr.phys_port_cnt;\r
+                i++, ports += port_size) {\r
 \r
                ca->ports[i] = (umad_port_t *) ports;\r
                strcpy(ca->ports[i]->ca_name, ca_name);\r
@@ -221,7 +222,7 @@ int umad_get_ca(char *ca_name, umad_ca_t *ca)
 \r
                ret = umad_query_port(context, ca->ports[i]);\r
                if (ret != 0) {\r
-                       delete ports;\r
+                       delete port_alloc;\r
                        goto close;\r
                }\r
        }\r