[DAPL2] InfiniBand Extensions bug resolved - atomics now working.
authorstansmith <stansmith@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 17 Oct 2007 17:12:43 +0000 (17:12 +0000)
committerstansmith <stansmith@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 17 Oct 2007 17:12:43 +0000 (17:12 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@862 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

ulp/dapl2/README.windows [new file with mode: 0644]
ulp/dapl2/dapl/common/dapl_cr_callback.c
ulp/dapl2/dapl/ibal/dapl_ibal_cm.c
ulp/dapl2/dapl/ibal/dapl_ibal_dto.h
ulp/dapl2/dapl/ibal/dapl_ibal_extensions.c
ulp/dapl2/dapl/ibal/dapl_ibal_qp.c
ulp/dapl2/dat/include/dat/dat.h

diff --git a/ulp/dapl2/README.windows b/ulp/dapl2/README.windows
new file mode 100644 (file)
index 0000000..52964dc
--- /dev/null
@@ -0,0 +1,190 @@
+[10-17-07] Last update.\r
+\r
+==========\r
+BUILD:\r
+==========\r
+\r
+The default build includes both debug(checked) & non-debug (free) version of\r
+dat2d.dll and dapl2d.dll uDAPL provider, free versions are dat2.dll & dapl2.dll.\r
+Included in the build are test suites dtest (simple DAT example), dtestx\r
+(DAT IB extensions test) and the main DAT/uDAPL tester dapl2test (see dt-svr &\r
+dt-cli, see manual.htm for details).\r
+Additionally, DAT v1.1 and/or DAT v2.0 build environments can be installed; see\r
+manual.htm for details.\r
+\r
+Building a free/non-debug version:\r
+----------------------------------\r
+Requires Windows Server 2003 DDK & Platform SDK.\r
+From a DDK command window (free build) for a specific architecture\r
+(x86, x64, ia64);\r
+\r
+cd gen1\trunk\ulp\dapl2\r
+build -wg\r
+Binaries are located in gen1\bin\{kernel|user}\os-arch-folder\...\r
+\r
+Building debug version:\r
+-----------------------\r
+Same as above except the DDK command window is for a Checked build\r
+\r
+\r
+Installing:\r
+-----------\r
+\r
+dat2.dll & dapl.dll --> %SystemRoot%\r
+\r
+===================\r
+CONFIGURATION:\r
+===================\r
+\r
+sample C:\dat\dat.conf \r
+\r
+#\r
+# DAT 1.2 configuration file,\r
+#\r
+# Each entry should have the following fields:\r
+#\r
+# <ia_name> <api_version> <threadsafety> <default> <lib_path> \\r
+#           <provider_version> <ia_params> <platform_params>\r
+#\r
+# For openib-cma provider you can specify <ia_params> as either:\r
+#      network address, network hostname, or netdev name and 0 for port\r
+#\r
+#\r
+ibnic0v2 u2.0 nonthreadsafe default C:\Windows\dapl2.dll ri.2.0 "IbalHca0 1" ""\r
+\r
+\r
+=============================\r
+Bugs/Known issues\r
+=============================\r
+\r
+\r
+\r
+=============================\r
+4.0 SAMPLE uDAPL APPLICATION:\r
+=============================\r
+\r
+There are 2 sample programs provided with this package.\r
+\r
+(dapl2/test/dtest/)\r
+(dapl2/test/dtestx/)\r
+\r
+NAME\r
+      dtest - simple uDAPL send/receive and RDMA test\r
+\r
+SYNOPSIS\r
+      dtest [-P provider] [-b buf size] [-B burst count][-v] [-c] [-p] [-d] [-s]\r
+\r
+      dtest [-P provider] [-b buf size] [-B burst count][-v] [-c] [-p] [-d] [-h HOSTNAME]\r
+\r
+DESCRIPTION\r
+      dtest  is a simple test used to exercise and verify the uDAPL interfaces.\r
+      At least two instantiations of the test must be run. One acts as the\r
+      server and the other the client. The server side of the test listens for\r
+      connection requests, until timing out or killed. Upon receipt of a cd\r
+      connection request, the connection is established, the server and client\r
+      sides exchange information necessary to perform RDMA writes and reads.\r
+\r
+OPTIONS\r
+       -P=PROVIDER\r
+          use PROVIDER to specify uDAPL interface using C:\DAT\dat.conf\r
+          (default ibnic0v2)\r
+\r
+       -b=BUFFER_SIZE\r
+          use buffer size BUFFER_SIZE for RDMA(default 64)\r
+\r
+       -B=BURST_COUNT\r
+          use busrt count BURST_COUNT for interations (default 10)\r
+\r
+       -v, verbose output(default off)\r
+\r
+       -c, use consumer notification events (default off)\r
+\r
+       -p, use polling (default wait for event)\r
+\r
+       -d, delay in seconds before close (default off)\r
+\r
+       -s, run as server (default - run as server)\r
+\r
+       -h=HOSTNAME\r
+          use HOSTNAME to specify server hostname or IP address (default - none)\r
+\r
+EXAMPLES\r
+       dtest -v -s\r
+           Starts a server process with debug verbosity using provider ibnic0v2\r
+\r
+       dtest -h server1-ib0\r
+\r
+           Starts a client process, using ibnic0v2 provider to connect to\r
+           hostname server1-ib0.\r
+\r
+SEE ALSO\r
+       dapltest(1)\r
+\r
+AUTHORS\r
+       Arlin Davis\r
+              <ardavis@ichips.intel.com>\r
+\r
+BUGS\r
+\r
+/dapl/test/dapltest/\r
+\r
+NAME\r
+        dapltest - test for the Direct Access Programming Library (DAPL)\r
+\r
+DESCRIPTION\r
+       Dapltest  is  a  set  of tests developed to exercise, characterize, and\r
+       verify the DAPL interfaces during development and porting. At least two\r
+       instantiations of the test must be run. One acts as the server, fielding\r
+       requests and spawning server-side test threads as needed. Other client(s)\r
+       connect to the server and issue test requests. The server side of the\r
+       test, once  invoked, listens  continuously for client connection requests\r
+       until stopped or killed. Upon receipt of a connection request, the\r
+       connection is established, the server and client sides swap version\r
+       numbers to  verify that they are able to communicate, and the client\r
+       sends the test request to the server. If the version numbers match, and\r
+       the test request is well-formed, the server spawns  the  threads\r
+       needed to run the test before awaiting further connections.\r
+\r
+USAGE\r
+       See manual.htm and or dt-svr.bat & dt-cli.bat.\r
+\r
+EXAMPLES\r
+       dapltest -T S -d -D ibnic0v2\r
+\r
+           Starts a server process with debug verbosity.\r
+\r
+       dapltest -T T -d -s host1-ib0 -D ibnic0v2 -i 100 client SR 4096 2 \\r
+           server SR 4096 2\r
+\r
+           Runs a transaction test, with both sides sending one buffer with\r
+           two 4KB segments, one hundred times.\r
+\r
+       dapltest -T P -d -s host1-ib0 -D ibnic0v2 -i 100 SR 4096 2\r
+\r
+           Runs a performance test, with the client sending one buffer with\r
+           two 4KB segments, one hundred times.\r
+\r
+       dapltest -T Q -s host1-ib0 -D ibnic0v2\r
+\r
+           Asks the server to clean up and exit.\r
+\r
+       dapltest -T L -D ibnic0v2 -d -w 16 -m 1000\r
+\r
+           Runs all of the limit tests, setting up 16 complete sets of DAPL\r
+           objects, and creating at most a thousand instances when trying to\r
+           exhaust resources.\r
+\r
+       dapltest -T T -V -d -t 2 -w 4 -i 55555 -s linux3 -D ibnic0v2 \\r
+           client RW 4096 1 server RW  2048  4 client SR 1024 4 server SR 4096 \\r
+           2 client SR 1024 3 -f server SR 2048 1 -f\r
+\r
+           Runs a more complicated transaction test, with two thread using four\r
+           EPs each, sending a more complicated buffer pattern for a larger\r
+           number of iterations, validating the data received.\r
+\r
+       BUGS   (and To Do List)\r
+\r
+           Use of CNOs (-Q) is not yet supported.\r
+\r
+           Further limit tests could be added.\r
+\r
index 0359ddb..5f9878d 100644 (file)
@@ -443,12 +443,13 @@ dapli_connection_request (
     sp_handle.psp_handle = (DAT_PSP_HANDLE)sp_ptr;\r
 \r
     dat_status = dapls_evd_post_cr_arrival_event (\r
-       evd_ptr,\r
-       DAT_CONNECTION_REQUEST_EVENT,\r
-       sp_handle,\r
-       (DAT_IA_ADDRESS_PTR)&sp_ptr->header.owner_ia->hca_ptr->hca_address,\r
-       sp_ptr->conn_qual,\r
-       (DAT_CR_HANDLE)cr_ptr);\r
+                                               evd_ptr,\r
+                                               DAT_CONNECTION_REQUEST_EVENT,\r
+                                               sp_handle,\r
+                                               (DAT_IA_ADDRESS_PTR)\r
+                               &sp_ptr->header.owner_ia->hca_ptr->hca_address,\r
+                                               sp_ptr->conn_qual,\r
+                                               (DAT_CR_HANDLE)cr_ptr);\r
 \r
     if (dat_status != DAT_SUCCESS)\r
     {\r
index bb7bfe8..f6c6459 100644 (file)
@@ -840,7 +840,7 @@ dapli_ib_cm_rep_cb (
     cm_rtu.pfn_cm_dreq_cb = dapli_ib_cm_dreq_cb;\r
     cm_rtu.p_rtu_pdata    = NULL;\r
     cm_rtu.access_ctrl = \r
-                               IB_AC_LOCAL_WRITE|IB_AC_RDMA_WRITE|IB_AC_MW_BIND|IB_AC_ATOMIC;\r
+               IB_AC_LOCAL_WRITE|IB_AC_RDMA_WRITE|IB_AC_MW_BIND|IB_AC_ATOMIC;\r
     if ((ep_ptr->param.ep_attr.max_rdma_read_in > 0) || \r
                (ep_ptr->param.ep_attr.max_rdma_read_out > 0))\r
     {\r
@@ -1014,7 +1014,7 @@ dapli_ib_cm_req_cb ( IN  ib_cm_req_rec_t  *p_cm_req_rec )
                      sp_ptr->header.magic == DAPL_MAGIC_RSP );\r
 \r
     /* preserve ibal's connection handle storage so we have a consistent\r
-     * pointer value. The reasons this is done dynamically instead of static\r
+     * pointer value. The reasons this is done dynamically instead of static\r
      * allocation in an end_point is the pointer value is set in the SP list\r
      * of CR's here and searched for from disconnect callbacks. If the pointer\r
      * value changes, you never find the CR on the sp list...\r
@@ -1382,7 +1382,8 @@ dapls_ib_connect (
        }\r
     else\r
     {\r
-  */      /*\r
+  */\r
+        /*\r
          * Query SA to get the path record from pair of GIDs\r
          */\r
         dapl_os_memzero (&query_req, sizeof (ib_query_req_t));\r
@@ -1623,7 +1624,8 @@ dapls_ib_setup_conn_listener (
      * communication. We have to get back here when we decide to support\r
      * fail-over and high-availability.\r
      */\r
-    p_active_port = dapli_ibal_get_port ( p_ca, (uint8_t)ia_ptr->hca_ptr->port_num );\r
+    p_active_port = dapli_ibal_get_port( p_ca,\r
+                                       (uint8_t)ia_ptr->hca_ptr->port_num );\r
 \r
     if (NULL == p_active_port)\r
     {\r
@@ -2017,7 +2019,9 @@ dapls_ib_accept_connection (
      * We will limit the access right and flow_ctrl upon DAT consumers \r
      * requirements\r
      */\r
-    cm_rep.access_ctrl = IB_AC_LOCAL_WRITE|IB_AC_RDMA_WRITE|IB_AC_MW_BIND;\r
+    cm_rep.access_ctrl =\r
+               IB_AC_LOCAL_WRITE|IB_AC_RDMA_WRITE|IB_AC_MW_BIND|IB_AC_ATOMIC;\r
+\r
     if ((ep_ptr->param.ep_attr.max_rdma_read_in > 0) \r
                || (ep_ptr->param.ep_attr.max_rdma_read_out > 0))\r
     {\r
index 462682e..fda81de 100644 (file)
@@ -705,7 +705,7 @@ dapls_ib_post_ext_send (
                wr.wr_type = WR_COMPARE_SWAP;\r
                dapl_dbg_log(DAPL_DBG_TYPE_ERR/*DAPL_DBG_TYPE_EP XXX*/, \r
                             " post_ext: OP_COMP_AND_SWAP=%llx,%llx rkey 0x%x "\r
-                            "va %#016Lx\n",\r
+                            "va %llx\n",\r
                             compare_add, swap, remote_iov->rmr_context,\r
                             remote_iov->virtual_address);\r
                \r
@@ -718,14 +718,14 @@ dapls_ib_post_ext_send (
          case OP_FETCH_AND_ADD:\r
                wr.wr_type = WR_FETCH_ADD;\r
                dapl_dbg_log(DAPL_DBG_TYPE_EP, \r
-                            " post_ext: OP_FETCH_AND_ADD=%lx,"\r
-                            "%lx rkey 0x%x va %#016Lx\n",\r
-                            compare_add, remote_iov->rmr_context,\r
-                            remote_iov->virtual_address);\r
+                            " post_ext: OP_FETCH_AND_ADD=%lx,%lx rkey 0x%x\n",\r
+                               remote_iov->virtual_address, compare_add,\r
+                               remote_iov->rmr_context);\r
 \r
                wr.remote_ops.vaddr = remote_iov->virtual_address;\r
                wr.remote_ops.rkey = remote_iov->rmr_context;\r
                wr.remote_ops.atomic1 = compare_add;\r
+               wr.remote_ops.atomic2 = 0;\r
                break;\r
 \r
          default:\r
@@ -740,8 +740,8 @@ dapls_ib_post_ext_send (
        wr.send_opt |= (DAT_COMPLETION_SOLICITED_WAIT_FLAG & \r
                                completion_flags) ? IB_SEND_OPT_SOLICITED : 0;\r
 \r
-       dapl_dbg_log(DAPL_DBG_TYPE_EP, \r
-                    " post_snd1: op 0x%x flags 0x%x sglist %p, %d\n", \r
+       dapl_dbg_log(DAPL_DBG_TYPE_EP, " post_snd1: wr_type 0x%x snd_opt 0x%x "\r
+                                       "ds_arry %llx num_ds %d\n", \r
                     wr.wr_type, wr.send_opt, wr.ds_array, wr.num_ds);\r
 \r
        ib_status = ib_post_send(ep_ptr->qp_handle, &wr, &bad_wr);\r
index 9e718aa..b2231f9 100644 (file)
@@ -207,7 +207,8 @@ dapli_post_ext( IN       DAT_EP_HANDLE              ep_handle,
                if ( dat_status != DAT_SUCCESS )\r
                {\r
 #ifdef DAPL_DBG\r
-                       dapl_dbg_log(DAPL_DBG_TYPE_ERR,"%s() cookie alloc %x\n",\r
+                       dapl_dbg_log(DAPL_DBG_TYPE_ERR,\r
+                                       "%s() cookie alloc faulure %x\n",\r
                                        __FUNCTION__,dat_status);\r
 #endif\r
                        goto bail;\r
index 1ca461f..70c70ae 100644 (file)
@@ -32,52 +32,55 @@ dapls_ib_cq_late_alloc ( IN  ib_pd_handle_t        pd_handle,
                          IN  DAPL_EVD              *evd_ptr );\r
 \r
 static void\r
-dapli_ib_qp_async_error_cb(\r
-    IN    ib_async_event_rec_t* p_err_rec )\r
+dapli_ib_qp_async_error_cb( IN  ib_async_event_rec_t* p_err_rec )\r
 {\r
-       DAPL_EP                         *ep_ptr = (DAPL_EP *)p_err_rec->context;\r
-       DAPL_EVD                        *evd_ptr;\r
-       DAPL_IA                         *ia_ptr;\r
+       DAPL_EP                 *ep_ptr = (DAPL_EP *)p_err_rec->context;\r
+       DAPL_EVD                *evd_ptr;\r
+       DAPL_IA                 *ia_ptr;\r
        dapl_ibal_ca_t          *p_ca;\r
-    dapl_ibal_evd_cb_t *evd_cb;\r
+        dapl_ibal_evd_cb_t     *evd_cb;\r
 \r
-    dapl_dbg_log (DAPL_DBG_TYPE_ERR,"--> DiQpAEC QP event %s qp context %p\n", \r
-            ib_get_async_event_str(p_err_rec->code), p_err_rec->context);\r
-    dapl_dbg_log (DAPL_DBG_TYPE_ERR,"--> DiQpAEC qp_handle %p qpn %u\n", \r
-            ((DAPL_EP *)p_err_rec->context)->qp_handle, \r
-                       ((DAPL_EP *)p_err_rec->context)->qpn);\r
+        dapl_dbg_log (DAPL_DBG_TYPE_ERR,"--> DiQpAEC QP event %s qp ctx %p\n", \r
+               ib_get_async_event_str(p_err_rec->code), p_err_rec->context);\r
+        dapl_dbg_log (DAPL_DBG_TYPE_ERR,"--> DiQpAEC qp_handle %p qpn %u\n", \r
+               ((DAPL_EP *)p_err_rec->context)->qp_handle, \r
+               ((DAPL_EP *)p_err_rec->context)->qpn);\r
 \r
        /*\r
-     * Verify handles EP, EVD, and hca_handle\r
-     */\r
-       if ( DAPL_BAD_HANDLE (ep_ptr, DAPL_MAGIC_EP ) ||\r
-         DAPL_BAD_HANDLE (ep_ptr->param.connect_evd_handle, DAPL_MAGIC_EVD) )\r
+        * Verify handles EP, EVD, and hca_handle\r
+        */\r
+       if (DAPL_BAD_HANDLE (ep_ptr, DAPL_MAGIC_EP ) ||\r
+           DAPL_BAD_HANDLE (ep_ptr->param.connect_evd_handle, DAPL_MAGIC_EVD))\r
        {\r
-               dapl_dbg_log (DAPL_DBG_TYPE_ERR,"--> DiQpAEC: invalid EP %p \n", ep_ptr);\r
+               dapl_dbg_log (DAPL_DBG_TYPE_ERR,\r
+                               "--> DiQpAEC: invalid EP %p \n", ep_ptr);\r
                return;\r
        }\r
        ia_ptr = ep_ptr->header.owner_ia;\r
-    evd_ptr = ia_ptr->async_error_evd;\r
+       evd_ptr = ia_ptr->async_error_evd;\r
 \r
        if (DAPL_BAD_HANDLE (evd_ptr, DAPL_MAGIC_EVD) ||\r
            ! (evd_ptr->evd_flags & DAT_EVD_ASYNC_FLAG))\r
        {\r
-               dapl_dbg_log (DAPL_DBG_TYPE_ERR,"--> DiQpAEC: invalid EVD %p \n", evd_ptr);\r
+               dapl_dbg_log (DAPL_DBG_TYPE_ERR,\r
+                               "--> DiQpAEC: invalid EVD %p \n", evd_ptr);\r
                return;\r
        }\r
        p_ca = (dapl_ibal_ca_t *) ia_ptr->hca_ptr->ib_hca_handle;\r
        if (p_ca == NULL)\r
-    {\r
-        dapl_dbg_log (DAPL_DBG_TYPE_ERR,"--> DiQpAEC: can't find %s HCA\n", \r
-                (ia_ptr->header.provider)->device_name);\r
-        return;\r
-    }\r
+       {\r
+               dapl_dbg_log (DAPL_DBG_TYPE_ERR,\r
+                               "--> DiQpAEC: can't find %s HCA\n", \r
+                               (ia_ptr->header.provider)->device_name);\r
+               return;\r
+       }\r
 \r
        /* find QP error callback using ia_ptr for context */\r
        evd_cb = dapli_find_evd_cb_by_context (ia_ptr, p_ca);\r
        if ((evd_cb == NULL) || (evd_cb->pfn_async_qp_err_cb == NULL))\r
        {\r
-               dapl_dbg_log (DAPL_DBG_TYPE_ERR,"--> DiQpAEC: no ERROR cb on %p found \n", p_ca);\r
+               dapl_dbg_log (DAPL_DBG_TYPE_ERR,\r
+                       "--> DiQpAEC: no ERROR cb on %p found \n", p_ca);\r
                return;\r
        }\r
 \r
@@ -89,8 +92,9 @@ dapli_ib_qp_async_error_cb(
        dapls_ib_disconnect ( ep_ptr, DAT_CLOSE_ABRUPT_FLAG );\r
        \r
        /* maps to dapl_evd_qp_async_error_callback(), context is EP */\r
-       evd_cb->pfn_async_qp_err_cb( (ib_hca_handle_t)p_ca, \r
-                                                               (ib_error_record_t*)&p_err_rec->code, ep_ptr);\r
+       evd_cb->pfn_async_qp_err_cb(    (ib_hca_handle_t)p_ca, \r
+                                       (ib_error_record_t*)&p_err_rec->code,\r
+                                       ep_ptr);\r
 }\r
 \r
 /*\r
@@ -307,16 +311,16 @@ dapls_ib_qp_free (
                       ep_ptr->qp_handle,\r
                       ib_get_port_state_str(ep_ptr->qp_state));\r
 \r
-    if (( ep_ptr->qp_handle != IB_INVALID_HANDLE ) &&\r
-        ( ep_ptr->qp_state != DAPL_QP_STATE_UNATTACHED ))\r
-    {\r
+       if (( ep_ptr->qp_handle != IB_INVALID_HANDLE ) &&\r
+           ( ep_ptr->qp_state != DAPL_QP_STATE_UNATTACHED ))\r
+       {\r
                qp_handle = ep_ptr->qp_handle;\r
                ep_ptr->qp_handle = IB_INVALID_HANDLE;\r
                ep_ptr->qp_state = DAPL_QP_STATE_UNATTACHED;\r
                ib_destroy_qp ( qp_handle, NULL /* callback */);\r
-               dapl_dbg_log (DAPL_DBG_TYPE_EP, \r
-                       "--> DsQF: freed QP %p\n", qp_handle ); \r
-    }\r
+               dapl_dbg_log (DAPL_DBG_TYPE_EP, "--> DsQF: freed QP %p\n",\r
+                               qp_handle ); \r
+       }\r
 \r
     return DAT_SUCCESS;\r
 }\r
@@ -365,31 +369,31 @@ dapls_ib_qp_modify (
     qp_handle     = ep_ptr->qp_handle;\r
     need_modify   = DAT_FALSE;\r
     dat_status    = DAT_SUCCESS;\r
-       if ( ia_ptr == NULL || ia_ptr->header.magic != DAPL_MAGIC_IA )\r
-       {\r
-               dat_status = DAT_INVALID_HANDLE;\r
-               goto bail;\r
-       }\r
+    if ( ia_ptr == NULL || ia_ptr->header.magic != DAPL_MAGIC_IA )\r
+    {\r
+       dat_status = DAT_INVALID_HANDLE;\r
+       goto bail;\r
+    }\r
     /* \r
-     * Query the QP to get the current state */\r
+     * Query the QP to get the current state.\r
+     */\r
     ib_status = ib_query_qp ( qp_handle, &qp_attr );\r
                        \r
     if ( ib_status != IB_SUCCESS )\r
     {\r
-       dapl_dbg_log (DAPL_DBG_TYPE_ERR, "--> DsIQM: Query QP failed = %s\n", ib_get_err_str(ib_status));\r
+       dapl_dbg_log (DAPL_DBG_TYPE_ERR, "--> DsIQM: Query QP failed = %s\n",\r
+                       ib_get_err_str(ib_status));\r
         dat_status = DAT_INTERNAL_ERROR;\r
         goto bail;\r
     }\r
 \r
     qp_state = qp_attr.state;\r
 \r
-       dapl_dbg_log (DAPL_DBG_TYPE_EP,\r
-                                       "--> DsIQM: modify qp state=%d\n",qp_state);\r
+    dapl_dbg_log (DAPL_DBG_TYPE_EP, "--> DsIQM: modify qp state=%d\n",qp_state);\r
     /*\r
      * Check if we have the right qp_state or not\r
      */\r
-    if ( (qp_state != IB_QPS_RTR ) && \r
-         (qp_state != IB_QPS_RTS ) )\r
+    if ( (qp_state != IB_QPS_RTR ) && (qp_state != IB_QPS_RTS ) )\r
     {\r
        dapl_dbg_log (DAPL_DBG_TYPE_EP,\r
                       "--> DsIQM: postpone to modify qp to EP values later\n");\r
@@ -420,9 +424,8 @@ dapls_ib_qp_modify (
     if ( (ep_attr->max_recv_dtos > 0) &&\r
                ((DAT_UINT32)ep_attr->max_recv_dtos != qp_attr.rq_depth) )\r
     {\r
-               dapl_dbg_log (DAPL_DBG_TYPE_EP,\r
-                                       "--> DsIQM: rq_depth modified (%d,%d)\n",\r
-                                       qp_attr.rq_depth, ep_attr->max_recv_dtos);\r
+       dapl_dbg_log (DAPL_DBG_TYPE_EP,"--> DsIQM: rq_depth modified (%d,%d)\n",\r
+                       qp_attr.rq_depth, ep_attr->max_recv_dtos);\r
 \r
         *p_rq_depth = ep_attr->max_recv_dtos;\r
         *p_qp_opts |= IB_MOD_QP_RQ_DEPTH;\r
@@ -432,21 +435,20 @@ dapls_ib_qp_modify (
     if ( (ep_attr->max_request_dtos > 0) &&\r
                ((DAT_UINT32)ep_attr->max_request_dtos != qp_attr.sq_depth) ) \r
     {\r
-               dapl_dbg_log (DAPL_DBG_TYPE_EP,\r
-                                       "--> DsIQM: sq_depth modified (%d,%d)\n",\r
-                                       qp_attr.sq_depth, ep_attr->max_request_dtos);\r
+       dapl_dbg_log (DAPL_DBG_TYPE_EP,\r
+                       "--> DsIQM: sq_depth modified (%d,%d)\n",\r
+                       qp_attr.sq_depth, ep_attr->max_request_dtos);\r
 \r
         *p_sq_depth = ep_attr->max_request_dtos;\r
         *p_qp_opts |= IB_MOD_QP_SQ_DEPTH;\r
         need_modify = DAT_TRUE;\r
-       }\r
+    }\r
 \r
     qp_mod.req_state  = qp_state;\r
 \r
     if ( need_modify == DAT_TRUE )\r
     {\r
-               ib_status = ib_modify_qp (qp_handle, &qp_mod);\r
-\r
+       ib_status = ib_modify_qp (qp_handle, &qp_mod);\r
         if ( ib_status != IB_SUCCESS)\r
         {\r
            dapl_dbg_log (DAPL_DBG_TYPE_ERR, "--> %s: ib_status = %d\n",\r
@@ -467,7 +469,7 @@ dapls_modify_qp_state_to_error ( ib_qp_handle_t  qp_handle )
     ib_qp_mod_t      qp_mod;\r
     ib_api_status_t  ib_status;\r
 \r
-    dapl_dbg_log (DAPL_DBG_TYPE_EP, "--> DsIQM_Err: QP state change\n");\r
+    dapl_dbg_log (DAPL_DBG_TYPE_EP, "--> DsIQM_Err: QP state change --> Err\n");\r
 \r
     dapl_os_memzero (&qp_mod, sizeof (ib_qp_mod_t));\r
 \r
@@ -512,13 +514,12 @@ dapls_modify_qp_state_to_init (
     qp_mod.state.init.primary_port = p_port->p_attr->port_num;\r
     qp_mod.state.init.qkey         = DAPL_IBAL_QKEY;\r
     qp_mod.state.init.pkey_index   = 0;\r
-       qp_mod.state.init.access_ctrl = \r
-                               IB_AC_LOCAL_WRITE|IB_AC_RDMA_WRITE|IB_AC_MW_BIND|IB_AC_ATOMIC;\r
-       if ((p_attr->max_rdma_read_in > 0) ||\r
-                       (p_attr->max_rdma_read_out > 0))\r
-       {\r
-               qp_mod.state.init.access_ctrl |= IB_AC_RDMA_READ;\r
-       }\r
+    qp_mod.state.init.access_ctrl = \r
+               IB_AC_LOCAL_WRITE|IB_AC_RDMA_WRITE|IB_AC_MW_BIND|IB_AC_ATOMIC;\r
+    if ((p_attr->max_rdma_read_in > 0) || (p_attr->max_rdma_read_out > 0))\r
+    {\r
+       qp_mod.state.init.access_ctrl |= IB_AC_RDMA_READ;\r
+    }\r
     ib_status = ib_modify_qp (qp_handle, &qp_mod);\r
 \r
     dapl_dbg_log (DAPL_DBG_TYPE_EP, "--> DsIQM_INIT: QP(%p) state change, %s\n",\r
@@ -573,13 +574,13 @@ dapls_modify_qp_state_to_rts ( ib_qp_handle_t  qp_handle )
 \r
     dapl_os_memzero (&qp_mod, sizeof (ib_qp_mod_t));\r
 \r
-    qp_mod.req_state                 = IB_QPS_RTS;\r
-    qp_mod.state.rts.sq_psn          = DAPL_IBAL_START_PSN;\r
-    qp_mod.state.rts.retry_cnt = 7;\r
-    qp_mod.state.rts.rnr_retry_cnt = 6;\r
-    qp_mod.state.rts.rnr_nak_timeout = 7;\r
+    qp_mod.req_state                   = IB_QPS_RTS;\r
+    qp_mod.state.rts.sq_psn            = DAPL_IBAL_START_PSN;\r
+    qp_mod.state.rts.retry_cnt         = 7;\r
+    qp_mod.state.rts.rnr_retry_cnt     = 6;\r
+    qp_mod.state.rts.rnr_nak_timeout   = 7;\r
     qp_mod.state.rts.local_ack_timeout = 7;\r
-    qp_mod.state.rts.init_depth = 4; \r
+    qp_mod.state.rts.init_depth        = 4; \r
 \r
     ib_status = ib_modify_qp (qp_handle, &qp_mod);\r
 \r
index c6455a0..db2e79e 100644 (file)
@@ -949,9 +949,7 @@ typedef struct dat_event
     DAT_EVENT_NUMBER            event_number;\r
     DAT_EVD_HANDLE              evd_handle;\r
     DAT_EVENT_DATA              event_data;\r
-#ifdef DAT_EXTENSIONS\r
     DAT_UINT64                  event_extension_data[8];        \r
-#endif /* DAT_EXTENSIONS */\r
 } DAT_EVENT;\r
 \r
 /* Provider/registration info */\r