[IBAL] Remove unused user-mode CM files.
authorftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 6 Jul 2006 13:23:54 +0000 (13:23 +0000)
committerftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Thu, 6 Jul 2006 13:23:54 +0000 (13:23 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@405 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

core/al/user/ual_cm.c [deleted file]
core/al/user/ual_cm.h [deleted file]

diff --git a/core/al/user/ual_cm.c b/core/al/user/ual_cm.c
deleted file mode 100644 (file)
index 9292ecd..0000000
+++ /dev/null
@@ -1,2006 +0,0 @@
-/*\r
- * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.\r
- * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. \r
- *\r
- * This software is available to you under the OpenIB.org BSD license\r
- * below:\r
- *\r
- *     Redistribution and use in source and binary forms, with or\r
- *     without modification, are permitted provided that the following\r
- *     conditions are met:\r
- *\r
- *      - Redistributions of source code must retain the above\r
- *        copyright notice, this list of conditions and the following\r
- *        disclaimer.\r
- *\r
- *      - Redistributions in binary form must reproduce the above\r
- *        copyright notice, this list of conditions and the following\r
- *        disclaimer in the documentation and/or other materials\r
- *        provided with the distribution.\r
- *\r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\r
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\r
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
- * SOFTWARE.\r
- *\r
- * $Id$\r
- */\r
-\r
-#include <iba/ib_al.h>\r
-#include "al.h"\r
-#include "al_cm_shared.h"\r
-#include "al_debug.h"\r
-\r
-#if defined(EVENT_TRACING)\r
-#ifdef offsetof\r
-#undef offsetof\r
-#endif\r
-#include "ual_cm.tmh"\r
-#endif\r
-\r
-#include "al_dev.h"\r
-#include "al_qp.h"\r
-#include "ib_common.h"\r
-#include "ual_cm.h"\r
-\r
-\r
-\r
-/*\r
- * Attach the QP and connection object to each other.\r
- */\r
-static void\r
-__bind_qp_and_conn(\r
-       IN              const   ib_cm_handle_t                          h_conn,\r
-       IN              const   ib_qp_handle_t                          h_qp )\r
-{\r
-       h_conn->h_qp = h_qp;\r
-       ((al_conn_qp_t*)h_qp)->p_conn = h_conn;\r
-}\r
-\r
-\r
-static void\r
-__free_listen(\r
-       IN                              struct _al_obj                          *p_obj )\r
-{\r
-       destroy_al_obj( p_obj );\r
-       cl_free( p_obj );\r
-}\r
-\r
-\r
-\r
-static void\r
-__destroying_conn(\r
-       IN                              struct _al_obj                          *p_obj )\r
-{\r
-       ib_cm_handle_t                  h_conn;\r
-\r
-       h_conn = (ib_cm_handle_t)p_obj;\r
-\r
-       if( h_conn->h_al )\r
-       {\r
-               if( h_conn->h_qp )\r
-               {\r
-                       /* Unbind the QP and connection from each other. */\r
-                       ((al_conn_qp_t*)h_conn->h_qp)->p_conn = NULL;\r
-                       h_conn->h_qp = NULL;\r
-               }\r
-\r
-               /* Remove the connection object from AL's list. */\r
-               al_remove_conn( h_conn );\r
-       }\r
-}\r
-\r
-\r
-\r
-static void\r
-__free_conn_req(\r
-       IN              const   ib_cm_handle_t                          h_conn )\r
-{\r
-       if( !h_conn->p_conn_req )\r
-               return;\r
-\r
-       cl_free( h_conn->p_conn_req );\r
-       h_conn->p_conn_req = NULL;\r
-}\r
-\r
-\r
-\r
-static void\r
-__free_conn(\r
-       IN                              struct _al_obj                          *p_obj )\r
-{\r
-       ib_cm_handle_t                  h_conn;\r
-\r
-       h_conn = (ib_cm_handle_t)p_obj;\r
-\r
-       /* Release all memory used to store the connection information. */\r
-       __free_conn_req( h_conn );\r
-       destroy_al_obj( p_obj );\r
-       cl_free( p_obj );\r
-}\r
-\r
-\r
-static void\r
-__ual_conn_reject(\r
-       IN                              al_conn_t* const                        p_conn,\r
-       IN              const   ib_rej_status_t                         reason )\r
-{\r
-       ib_cm_rej_t             rej = {0};\r
-\r
-       rej.rej_status = reason;\r
-\r
-       ib_cm_rej( p_conn, &rej );\r
-}\r
-\r
-\r
-/*\r
- * Called by the QP upon destruction if still connected.\r
- */\r
-void\r
-cm_conn_destroy(\r
-       IN                              al_conn_qp_t * const            p_conn_qp )\r
-{\r
-       UNUSED_PARAM( p_conn_qp );\r
-}\r
-\r
-\r
-\r
-/*\r
- * Called by AL to destroy connection objects that were not destroyed\r
- * properly.  In theory, this function should not be called, unless the\r
- * application using AL is not written properly.\r
- */\r
-void\r
-cm_cleanup_conn(\r
-       IN              const   ib_cm_handle_t                          h_conn )\r
-{\r
-       /* Just destroy the connection object. */\r
-       ref_al_obj( &h_conn->obj );\r
-       h_conn->obj.pfn_destroy( &h_conn->obj, NULL );\r
-}\r
-\r
-\r
-\r
-/*\r
- * Allocate and initialize a structure to store CM information.\r
- */\r
-static ib_listen_handle_t\r
-__get_listen(\r
-       IN              const   ib_al_handle_t                          h_al )\r
-{\r
-       ib_listen_handle_t      h_listen;\r
-       ib_api_status_t         status;\r
-\r
-       /* Allocate the structure. */\r
-       h_listen = cl_zalloc( sizeof( al_listen_t ) );\r
-       if( !h_listen )\r
-               return NULL;\r
-\r
-       /* Initialize the al object portion. */\r
-       construct_al_obj( &h_listen->obj, AL_OBJ_TYPE_H_LISTEN );\r
-       status = init_al_obj( &h_listen->obj, h_listen, TRUE,\r
-               NULL, NULL, __free_listen );\r
-       if( status != IB_SUCCESS )\r
-       {\r
-               cl_free( h_listen );\r
-               return NULL;\r
-       }\r
-\r
-       /* The CM info structure is a child of AL. */\r
-       attach_al_obj( &h_al->obj, &h_listen->obj );\r
-\r
-       return h_listen;\r
-}\r
-\r
-\r
-\r
-static ib_cm_handle_t\r
-__get_conn(\r
-       IN              const   ib_al_handle_t                          h_al )\r
-{\r
-       ib_cm_handle_t          h_conn;\r
-       ib_api_status_t         status;\r
-\r
-       /* Allocate the structure. */\r
-       h_conn = cl_zalloc( sizeof( al_conn_t ) );\r
-       if( !h_conn )\r
-               return NULL;\r
-\r
-       /* Allocate resources to establish the connection. */\r
-       h_conn->p_conn_req = cl_zalloc( sizeof( conn_req_t ) );\r
-       if( !h_conn->p_conn_req )\r
-       {\r
-               __free_conn( &h_conn->obj );\r
-               return NULL;\r
-       }\r
-\r
-       /* Initialize the al object portion. */\r
-       construct_al_obj( &h_conn->obj, AL_OBJ_TYPE_H_CONN );\r
-       status = init_al_obj( &h_conn->obj, h_conn, TRUE,\r
-               __destroying_conn, NULL, __free_conn );\r
-       if( status != IB_SUCCESS )\r
-       {\r
-               __free_conn( &h_conn->obj );\r
-               return NULL;\r
-       }\r
-\r
-       al_insert_conn( h_al, h_conn );\r
-       return h_conn;\r
-}\r
-\r
-\r
-\r
-/*\r
- * Reject a connection request.\r
- */\r
-static void\r
-__rej_conn(\r
-       IN              const   ib_cm_handle_t                          h_cm,\r
-       IN                              ib_rej_status_t                         rej_status )\r
-{\r
-       ib_cm_rej_t                                     cm_rej;\r
-\r
-       cl_memclr( &cm_rej, sizeof( ib_cm_rej_t ) );\r
-       cm_rej.rej_status = rej_status;\r
-       ib_cm_rej( h_cm, &cm_rej );\r
-}\r
-\r
-\r
-\r
-/*\r
- * Initiate a listen for a connection request.\r
- */\r
-ib_api_status_t\r
-ib_cm_listen(\r
-       IN              const   ib_al_handle_t                          h_al,\r
-       IN              const   ib_cm_listen_t* const           p_cm_listen,\r
-       IN              const   ib_pfn_listen_err_cb_t          pfn_listen_err_cb,\r
-       IN              const   void* const                                     listen_context,\r
-               OUT                     ib_listen_handle_t* const       ph_cm_listen )\r
-{\r
-       ual_cm_listen_ioctl_t   *p_cm_ioctl;\r
-       size_t                                  ioctl_buf_sz;\r
-       uintn_t                                 bytes_ret;\r
-       ib_api_status_t                 status;\r
-       cl_status_t                             cl_status;\r
-       ib_listen_handle_t              h_listen;\r
-\r
-       AL_ENTER( AL_DBG_CM );\r
-\r
-       /* Validate input parameters. */\r
-       if( AL_OBJ_INVALID_HANDLE( h_al, AL_OBJ_TYPE_H_AL ) )\r
-       {\r
-               AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("Invalid AL handle.\n") );\r
-               return IB_INVALID_AL_HANDLE;\r
-       }\r
-       if( !p_cm_listen || !ph_cm_listen )\r
-       {\r
-               AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("NULL parameter.\n") );\r
-               return IB_INVALID_PARAMETER;\r
-       }\r
-\r
-       /* Get a listen structure. */\r
-       h_listen = __get_listen( h_al );\r
-       if( !h_listen )\r
-       {\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
-                       ("Failed to allocate listen structure.\n") );\r
-               return IB_INSUFFICIENT_MEMORY;\r
-       }\r
-\r
-       /* Save the user's information. */\r
-       h_listen->pfn_cm_req_cb = p_cm_listen->pfn_cm_req_cb;\r
-       h_listen->pfn_cm_mra_cb = p_cm_listen->pfn_cm_mra_cb;\r
-       h_listen->pfn_cm_rej_cb = p_cm_listen->pfn_cm_rej_cb;\r
-       h_listen->pfn_listen_err_cb = pfn_listen_err_cb;\r
-       h_listen->obj.context = listen_context;\r
-       h_listen->sidr_context = p_cm_listen->sidr_context;\r
-\r
-       ioctl_buf_sz = sizeof(p_cm_ioctl->in);\r
-       if( p_cm_listen->p_compare_buffer )\r
-               ioctl_buf_sz += p_cm_listen->compare_length;\r
-\r
-       p_cm_ioctl = (ual_cm_listen_ioctl_t*)cl_zalloc( ioctl_buf_sz );\r
-       if( !p_cm_ioctl )\r
-       {\r
-               h_listen->obj.pfn_destroy( &h_listen->obj, NULL );\r
-               AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("Failed to allocate IOCTL buffer.\n") );\r
-               return IB_INSUFFICIENT_MEMORY;\r
-       }\r
-\r
-       /* Initialize the IOCTL. */\r
-       p_cm_ioctl->in.context = h_listen;\r
-       p_cm_ioctl->in.cm_listen = *p_cm_listen;\r
-       /* Convert the user's information to ALs. */\r
-       p_cm_ioctl->in.cm_listen.sidr_context = h_listen;\r
-       if( p_cm_listen->p_compare_buffer )\r
-       {\r
-               cl_memcpy( (uint8_t*)((&p_cm_ioctl->in.cm_listen) + 1),\r
-                       p_cm_listen->p_compare_buffer, p_cm_listen->compare_length );\r
-       }\r
-\r
-       /* Call the kernel CM to do the listen. */\r
-       cl_status = do_al_dev_ioctl( UAL_CM_LISTEN, &p_cm_ioctl->in, ioctl_buf_sz,\r
-               &p_cm_ioctl->out, sizeof(p_cm_ioctl->out), &bytes_ret );\r
-\r
-       if( cl_status != CL_SUCCESS || bytes_ret != sizeof(p_cm_ioctl->out) )\r
-       {\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
-                       ("UAL_CM_LISTEN IOCTL returned %s\n", CL_STATUS_MSG(cl_status)) );\r
-               status = IB_ERROR;\r
-       }\r
-       else\r
-       {\r
-               status = p_cm_ioctl->out.status;\r
-       }\r
-\r
-       if( status != IB_SUCCESS )\r
-       {\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
-                       ("Failed to listen: %s.\n", ib_get_err_str(status) ) );\r
-               h_listen->obj.pfn_destroy( &h_listen->obj, NULL );\r
-       }\r
-       else\r
-       {\r
-               h_listen->obj.hdl = p_cm_ioctl->out.h_cm_listen;\r
-               *ph_cm_listen = h_listen;\r
-\r
-               /* Release the reference taken in init_al_obj (__get_listen). */\r
-               deref_al_obj( &h_listen->obj );\r
-       }\r
-\r
-       cl_free( p_cm_ioctl );\r
-       AL_EXIT( AL_DBG_CM );\r
-       return status;\r
-}\r
-\r
-\r
-\r
-ib_api_status_t\r
-ib_cm_cancel(\r
-       IN              const   ib_listen_handle_t                      h_cm_listen,\r
-       IN              const   ib_pfn_destroy_cb_t                     pfn_destroy_cb OPTIONAL )\r
-{\r
-       ual_cm_cancel_ioctl_t   cm_ioctl;\r
-       uintn_t                                 bytes_ret;\r
-       ib_api_status_t                 status;\r
-       cl_status_t                             cl_status;\r
-\r
-       AL_ENTER( AL_DBG_CM );\r
-\r
-       if( AL_OBJ_INVALID_HANDLE( h_cm_listen, AL_OBJ_TYPE_H_LISTEN ) )\r
-       {\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid listen handle.\n") );\r
-               return IB_INVALID_HANDLE;\r
-       }\r
-\r
-       /* Take a reference on the listen until the IOCTL completes. */\r
-       ref_al_obj( &h_cm_listen->obj );\r
-\r
-       /* Initialize the IOCTL. */\r
-       cl_memclr( &cm_ioctl, sizeof( cm_ioctl ) );\r
-       cm_ioctl.in.h_cm_listen = h_cm_listen->obj.hdl;\r
-\r
-       /* Call the kernel CM to do the cancel. */\r
-       cl_status = do_al_dev_ioctl( UAL_CM_CANCEL, &cm_ioctl.in,\r
-               sizeof(cm_ioctl.in), &cm_ioctl.out, sizeof(cm_ioctl.out), &bytes_ret );\r
-\r
-       if( cl_status != CL_SUCCESS || bytes_ret != sizeof(cm_ioctl.out) )\r
-       {\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
-                       ("UAL_CM_CANCEL IOCTL returned %s\n", CL_STATUS_MSG(cl_status)) );\r
-               status = IB_ERROR;\r
-       }\r
-       else\r
-       {\r
-               status = cm_ioctl.out.status;\r
-       }\r
-       if( status != IB_SUCCESS )\r
-       {\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
-                       ("Failed to cancel: %s.\n", ib_get_err_str(status) ) );\r
-               deref_al_obj( &h_cm_listen->obj );\r
-       }\r
-       else\r
-       {\r
-               h_cm_listen->obj.pfn_destroy( &h_cm_listen->obj, pfn_destroy_cb );\r
-       }\r
-\r
-       AL_EXIT( AL_DBG_CM );\r
-       return status;\r
-}\r
-\r
-\r
-\r
-/*\r
- * Initiate a connection request.\r
- */\r
-ib_api_status_t\r
-ib_cm_req(\r
-       IN      const           ib_cm_req_t* const                      p_cm_req )\r
-{\r
-       ib_cm_handle_t                  h_conn;\r
-       ual_cm_req_ioctl_t              *p_cm_ioctl;\r
-       size_t                                  ioctl_buf_sz;\r
-       uint8_t                                 *p_data;\r
-       uintn_t                                 bytes_ret;\r
-       ib_api_status_t                 status;\r
-       cl_status_t                             cl_status;\r
-\r
-       AL_ENTER( AL_DBG_CM );\r
-\r
-       /* Validate input parameters. */\r
-       if( !p_cm_req || !p_cm_req->p_primary_path )\r
-       {\r
-               AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,\r
-                       ("NULL p_cm_req or primary path\n") );\r
-               return IB_INVALID_PARAMETER;\r
-       }\r
-\r
-       ioctl_buf_sz = sizeof(p_cm_ioctl->in);\r
-       if( p_cm_req->p_compare_buffer )\r
-               ioctl_buf_sz += p_cm_req->compare_length;\r
-       if( p_cm_req->p_req_pdata )\r
-               ioctl_buf_sz += p_cm_req->req_length;\r
-       if( p_cm_req->p_alt_path )\r
-               ioctl_buf_sz += sizeof(ib_path_rec_t);\r
-\r
-       p_cm_ioctl = (ual_cm_req_ioctl_t*)cl_zalloc( ioctl_buf_sz );\r
-       if( !p_cm_ioctl )\r
-       {\r
-               AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,\r
-                       ("Failed to allocate IOCTL buf.\n") );\r
-               return IB_INSUFFICIENT_MEMORY;\r
-       }\r
-\r
-       /*\r
-        * Save the user's information and replace the handles with appropriate\r
-        * kernel handles.\r
-        */\r
-       p_cm_ioctl->in.cm_req = *p_cm_req;\r
-       switch( p_cm_req->qp_type )\r
-       {\r
-       case IB_QPT_RELIABLE_CONN:\r
-       case IB_QPT_UNRELIABLE_CONN:\r
-               if( AL_OBJ_INVALID_HANDLE( p_cm_req->h_qp, AL_OBJ_TYPE_H_QP ) ||\r
-                       (p_cm_req->h_qp->type != p_cm_req->qp_type) )\r
-               {\r
-                       AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
-                               ("IB_INVALID_QP_HANDLE\n") );\r
-                       status = IB_INVALID_QP_HANDLE;\r
-                       goto cleanup;\r
-               }\r
-\r
-               /* Update the QP destroy timeout = timeout x retries + 2 seconds. */\r
-               set_al_obj_timeout( &p_cm_req->h_qp->obj,\r
-                       p_cm_req->timeout_ms * p_cm_req->max_cm_retries + 2000 );\r
-\r
-               /* Get a connection structure. */\r
-               h_conn = __get_conn( (ib_al_handle_t)\r
-                       p_cm_req->h_qp->obj.p_parent_obj->p_parent_obj->p_parent_obj );\r
-               if( !h_conn )\r
-               {\r
-                       AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,\r
-                               ("Failed to allocate connection structure.\n") );\r
-                       status = IB_INSUFFICIENT_MEMORY;\r
-                       goto cleanup;\r
-               }\r
-\r
-               __bind_qp_and_conn( h_conn, p_cm_req->h_qp );\r
-               p_cm_ioctl->in.h_qp = p_cm_req->h_qp->obj.hdl;\r
-\r
-               /* Record the connection information for QP transitions. */\r
-               h_conn->p_conn_req->path_rec = *p_cm_req->p_primary_path;\r
-               if( p_cm_req->p_alt_path )\r
-                       h_conn->p_conn_req->alt_path_rec = *p_cm_req->p_alt_path;\r
-\r
-               /* Transition the QP to the init state to allow posting receives. */\r
-               status = cm_init_qp( h_conn->h_qp, &p_cm_req->p_primary_path->sgid,\r
-                       p_cm_req->p_primary_path->pkey,\r
-                       (IB_AC_RDMA_READ | IB_AC_RDMA_WRITE | IB_AC_LOCAL_WRITE | IB_AC_MW_BIND) );\r
-                       //h_conn->p_req_info->qp_mod_rts.state.rts.access_ctrl );\r
-               if( status != IB_SUCCESS )\r
-               {\r
-                       h_conn->obj.pfn_destroy( &h_conn->obj, NULL );\r
-                       AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
-                               ("cm_init_qp returned %s\n", ib_get_err_str(status)) );\r
-                       goto cleanup;\r
-               }\r
-               break;\r
-\r
-       case IB_QPT_UNRELIABLE_DGRM:\r
-               if( AL_OBJ_INVALID_HANDLE( p_cm_req->h_al, AL_OBJ_TYPE_H_AL ) )\r
-               {\r
-                       AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
-                               ("IB_INVALID_AL_HANDLE\n") );\r
-                       status = IB_INVALID_AL_HANDLE;\r
-                       goto cleanup;\r
-               }\r
-               /* Get a connection structure. */\r
-               h_conn = __get_conn( p_cm_req->h_al );\r
-               if( !h_conn )\r
-               {\r
-                       AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,\r
-                               ("Failed to allocate connection structure.\n") );\r
-                       status = IB_INSUFFICIENT_MEMORY;\r
-                       goto cleanup;\r
-               }\r
-               p_cm_ioctl->in.cm_req.h_al = NULL;\r
-               h_conn->sidr_context = p_cm_req->sidr_context;\r
-               p_cm_ioctl->in.cm_req.sidr_context = h_conn;\r
-               break;\r
-\r
-       default:\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid qp_type.\n") );\r
-               status = IB_INVALID_SETTING;\r
-               goto cleanup;\r
-       }\r
-\r
-       h_conn->p_conn_req->pfn_cm_req_cb = p_cm_req->pfn_cm_req_cb;\r
-       h_conn->p_conn_req->pfn_cm_rep_cb = p_cm_req->pfn_cm_rep_cb;\r
-       h_conn->pfn_cm_mra_cb = p_cm_req->pfn_cm_mra_cb;\r
-       h_conn->pfn_cm_rej_cb = p_cm_req->pfn_cm_rej_cb;\r
-\r
-       p_cm_ioctl->in.paths[0] = *p_cm_req->p_primary_path;\r
-       p_data = (uint8_t*)&p_cm_ioctl->in.paths[1];\r
-       if( p_cm_req->p_alt_path )\r
-       {\r
-               p_cm_ioctl->in.paths[1] = *p_cm_req->p_alt_path;\r
-               p_data += sizeof(ib_path_rec_t);\r
-       }\r
-       if( p_cm_req->req_length )\r
-       {\r
-               cl_memcpy( p_data, p_cm_req->p_req_pdata, p_cm_req->req_length );\r
-               p_data += p_cm_req->req_length;\r
-       }\r
-       if( p_cm_req->compare_length )\r
-       {\r
-               cl_memcpy( p_data, p_cm_req->p_compare_buffer,\r
-                       p_cm_req->compare_length );\r
-       }\r
-\r
-       cl_status = do_al_dev_ioctl( UAL_CM_REQ, &p_cm_ioctl->in, ioctl_buf_sz,\r
-               &p_cm_ioctl->out, sizeof(p_cm_ioctl->out), &bytes_ret );\r
-\r
-       if( cl_status != CL_SUCCESS || bytes_ret != sizeof(p_cm_ioctl->out) )\r
-       {\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
-                       ("UAL_CM_REQ IOCTL returned %s\n", CL_STATUS_MSG(cl_status)) );\r
-               status = IB_ERROR;\r
-       }\r
-       else\r
-       {\r
-               status = p_cm_ioctl->out.status;\r
-       }\r
-\r
-       if( status != IB_SUCCESS )\r
-       {\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
-                       ("Connection request ioctl failed with status (%s)\n",\r
-                       ib_get_err_str(status) ) );\r
-               h_conn->obj.pfn_destroy( &h_conn->obj, NULL );\r
-       }\r
-       else\r
-       {\r
-               /* Release the reference taken in init_al_obj (__get_conn). */\r
-               deref_al_obj( &h_conn->obj );\r
-       }\r
-\r
-cleanup:\r
-       cl_free( p_cm_ioctl );\r
-       AL_EXIT( AL_DBG_CM );\r
-       return status;\r
-}\r
-\r
-\r
-\r
-static ib_api_status_t\r
-__save_user_rep(\r
-       IN              const   ib_cm_handle_t                          h_conn,\r
-       IN              const   ib_cm_rep_t* const                      p_cm_rep )\r
-{\r
-       ib_port_attr_t          *p_port_attr;\r
-       ib_qp_handle_t          h_qp;\r
-\r
-       AL_ENTER(AL_DBG_CM);\r
-\r
-       __bind_qp_and_conn( h_conn, p_cm_rep->h_qp );\r
-       h_qp = p_cm_rep->h_qp;\r
-\r
-       /* Get the port attributes. */\r
-       ci_ca_lock_attr( h_qp->obj.p_ci_ca );\r
-       p_port_attr = get_port_attr( h_qp->obj.p_ci_ca->p_pnp_attr, \r
-               &h_conn->p_conn_req->path_rec.sgid );\r
-       if( !p_port_attr )\r
-       {\r
-               ci_ca_unlock_attr( h_qp->obj.p_ci_ca );\r
-               AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR , ("invalid p_gid\n" ) );\r
-               return IB_INVALID_GID;\r
-       }\r
-\r
-       cm_save_rep_qp_attr( p_cm_rep, p_port_attr, &h_conn->p_conn_req->path_rec,\r
-               &h_conn->p_conn_req->alt_path_rec, &h_conn->p_conn_req->qp_mod_rtr,\r
-               &h_conn->p_conn_req->qp_mod_rts );\r
-       ci_ca_unlock_attr( h_qp->obj.p_ci_ca );\r
-\r
-       AL_EXIT(AL_DBG_CM);\r
-       return IB_SUCCESS;\r
-}\r
-\r
-\r
-\r
-ib_api_status_t\r
-ib_cm_rep(\r
-       IN              const   ib_cm_handle_t                          h_cm_req,\r
-       IN              const   ib_cm_rep_t* const                      p_cm_rep )\r
-{\r
-       ib_cm_handle_t                  h_conn;\r
-       ual_cm_rep_ioctl_t              *p_cm_ioctl;\r
-       size_t                                  ioctl_buf_sz;\r
-       uintn_t                                 bytes_ret;\r
-       ib_api_status_t                 status;\r
-       cl_status_t                             cl_status;\r
-\r
-       AL_ENTER(AL_DBG_CM);\r
-\r
-       /* Validate input parameters. */\r
-       h_conn = h_cm_req;\r
-       if( AL_OBJ_INVALID_HANDLE( h_conn, AL_OBJ_TYPE_H_CONN ) )\r
-       {\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid REQ handle.\n") );\r
-               return IB_INVALID_HANDLE;\r
-       }\r
-       if( !p_cm_rep )\r
-       {\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("NULL p_cm_rep\n") );\r
-               return IB_INVALID_PARAMETER;\r
-       }\r
-\r
-       /* Save the user's information. */\r
-       h_conn->p_conn_req->pfn_cm_rtu_cb = p_cm_rep->pfn_cm_rtu_cb;\r
-       h_conn->pfn_cm_lap_cb = p_cm_rep->pfn_cm_lap_cb;\r
-       h_conn->pfn_cm_dreq_cb = p_cm_rep->pfn_cm_dreq_cb;\r
-\r
-       /* Calculate the size of the IOCTL buffer needed. */\r
-       ioctl_buf_sz = sizeof(p_cm_ioctl->in);\r
-       if( p_cm_rep->p_rep_pdata )\r
-               ioctl_buf_sz += p_cm_rep->rep_length;\r
-\r
-       /* Allocate the IOCTL buffer. */\r
-       p_cm_ioctl = (ual_cm_rep_ioctl_t*)cl_zalloc( ioctl_buf_sz );\r
-       if( !p_cm_ioctl )\r
-       {\r
-               AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("Failed to allocate IOCTL buffer.\n") );\r
-               return IB_INSUFFICIENT_MEMORY;\r
-       }\r
-\r
-       /* Replace the handles with appropriate kernel handles. */\r
-       p_cm_ioctl->in.cm_rep = *p_cm_rep;\r
-       if( AL_OBJ_INVALID_HANDLE( p_cm_rep->h_qp, AL_OBJ_TYPE_H_QP ) ||\r
-               p_cm_rep->h_qp->type != p_cm_rep->qp_type )\r
-       {\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
-                       ("Invalid QP handle.\n") );\r
-               status = IB_INVALID_QP_HANDLE;\r
-               goto cleanup;\r
-       }\r
-       p_cm_ioctl->in.h_qp = p_cm_rep->h_qp->obj.hdl;\r
-\r
-       /* Update the QP destruction timeout, use value provided by kernel CM. */\r
-       set_al_obj_timeout( &p_cm_rep->h_qp->obj, h_conn->p_conn_req->timeout_ms );\r
-\r
-       status = __save_user_rep( h_conn, p_cm_rep );\r
-       if( status != IB_SUCCESS )\r
-       {\r
-               __ual_conn_reject( h_conn, IB_REJ_INSUF_QP );\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
-                       ("__save_user_rep returned %s\n", ib_get_err_str(status) ) );\r
-               goto cleanup;\r
-       }\r
-\r
-       /* Transition the QP to the init state to allow posting receives. */\r
-       status = cm_init_qp( p_cm_rep->h_qp, &h_conn->p_conn_req->path_rec.sgid,\r
-               h_conn->p_conn_req->path_rec.pkey, p_cm_rep->access_ctrl );\r
-       if( status != IB_SUCCESS )\r
-       {\r
-               __ual_conn_reject( h_conn, IB_REJ_INSUF_QP );\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
-                       ("cm_init_qp returned %s\n", ib_get_err_str(status) ) );\r
-               goto cleanup;\r
-       }\r
-\r
-       /* Prepost receives. */\r
-       if( p_cm_rep->p_recv_wr )\r
-       {\r
-               status = ib_post_recv( p_cm_rep->h_qp, p_cm_rep->p_recv_wr,\r
-                       p_cm_rep->pp_recv_failure );\r
-               if( status != IB_SUCCESS )\r
-               {\r
-                       __ual_conn_reject( h_conn, IB_REJ_INSUF_QP );\r
-                       AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
-                               ("ib_post_recv returned %s.\n", ib_get_err_str(status)) );\r
-                       goto cleanup;\r
-               }\r
-       }\r
-       p_cm_ioctl->in.cm_rep.p_recv_wr = NULL;\r
-\r
-       /* Transition the QP to the RTS state. */\r
-       status = cm_rts_qp( h_conn->h_qp, &h_conn->p_conn_req->qp_mod_rtr,\r
-               &h_conn->p_conn_req->qp_mod_rts );\r
-       if( status != IB_SUCCESS )\r
-       {\r
-               __ual_conn_reject( h_conn, IB_REJ_INSUF_QP );\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
-                       ("cm_rts_qp with status (%s)\n", ib_get_err_str(status) ) );\r
-               goto cleanup;\r
-       }\r
-\r
-       p_cm_ioctl->in.h_cm_req = h_conn->obj.hdl;\r
-       /* Copy the private data. */\r
-       if( p_cm_rep->p_rep_pdata )\r
-       {\r
-               cl_memcpy( (&p_cm_ioctl->in.cm_rep) + 1,\r
-                       p_cm_rep->p_rep_pdata, p_cm_rep->rep_length );\r
-       }\r
-\r
-       cl_status = do_al_dev_ioctl( UAL_CM_REP,\r
-               &p_cm_ioctl->in, ioctl_buf_sz,\r
-               &p_cm_ioctl->out, sizeof(p_cm_ioctl->out),\r
-               &bytes_ret );\r
-\r
-       if( cl_status != CL_SUCCESS || bytes_ret != sizeof(p_cm_ioctl->out) )\r
-       {\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
-                       ("UAL_CM_REP IOCTL returned %s\n", CL_STATUS_MSG(cl_status)) );\r
-               status = IB_ERROR;\r
-       }\r
-       else\r
-       {\r
-               status = p_cm_ioctl->out.status;\r
-       }\r
-\r
-       if( status != IB_SUCCESS )\r
-       {\r
-               AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,\r
-                       ("Connection reply ioctl failed with status (%s)\n",\r
-                       ib_get_err_str(status) ) );\r
-               cm_reset_qp( h_conn->h_qp, 0 );\r
-               ref_al_obj( &h_conn->obj );\r
-               h_conn->obj.pfn_destroy( &h_conn->obj, NULL );\r
-       }\r
-\r
-cleanup:\r
-       cl_free( p_cm_ioctl );\r
-       AL_EXIT( AL_DBG_CM );\r
-       return status;\r
-}\r
-\r
-\r
-\r
-ib_api_status_t\r
-ib_cm_rtu(\r
-       IN      const           ib_cm_handle_t                          h_cm_rep,\r
-       IN      const           ib_cm_rtu_t* const                      p_cm_rtu )\r
-{\r
-       ib_cm_handle_t                  h_conn;\r
-       ual_cm_rtu_ioctl_t              *p_cm_ioctl;\r
-       size_t                                  ioctl_buf_sz;\r
-       uintn_t                                 bytes_ret;\r
-       ib_api_status_t                 status;\r
-       cl_status_t                             cl_status;\r
-\r
-       AL_ENTER(AL_DBG_CM);\r
-\r
-       /* Validate input parameters. */\r
-       h_conn = h_cm_rep;\r
-       if( AL_OBJ_INVALID_HANDLE( h_conn, AL_OBJ_TYPE_H_CONN ) )\r
-       {\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid rep handle.\n") );\r
-               return IB_INVALID_HANDLE;\r
-       }\r
-       if( !p_cm_rtu )\r
-       {\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("NULL p_cm_rtu\n") );\r
-               return IB_INVALID_PARAMETER;\r
-       }\r
-\r
-       /* Save the user's information. */\r
-       h_conn->pfn_cm_apr_cb = p_cm_rtu->pfn_cm_apr_cb;\r
-       h_conn->pfn_cm_dreq_cb = p_cm_rtu->pfn_cm_dreq_cb;\r
-       cm_save_rtu_qp_attr( p_cm_rtu, &h_conn->p_conn_req->qp_mod_rtr );\r
-\r
-       /* Transition the QP to the RTS state. */\r
-       status = cm_rts_qp( h_conn->h_qp, &h_conn->p_conn_req->qp_mod_rtr,\r
-               &h_conn->p_conn_req->qp_mod_rts );\r
-       if( status != IB_SUCCESS )\r
-       {\r
-               __ual_conn_reject( h_conn, IB_REJ_INSUF_QP );\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
-                       ("cm_rts_qp with status (%s)\n", ib_get_err_str(status) ) );\r
-               return status;\r
-       }\r
-\r
-       /*\r
-        * We are done with this connection establishment.  After we send the\r
-        * RTU, the user can disconnect the QP, destroy it, close AL, or do\r
-        * one of any number of difficult things to deal with, so we destroy\r
-        * the connection request structure here to avoid possible duplicate\r
-        * destructions.\r
-        */\r
-       __free_conn_req( h_conn );\r
-\r
-       ioctl_buf_sz = sizeof(p_cm_ioctl->in);\r
-       if( p_cm_rtu->p_rtu_pdata )\r
-               ioctl_buf_sz += p_cm_rtu->rtu_length;\r
-\r
-       p_cm_ioctl = (ual_cm_rtu_ioctl_t*)cl_zalloc( ioctl_buf_sz );\r
-       if( !p_cm_ioctl )\r
-       {\r
-               AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("Failed to allocate IOCTL buffer\n") );\r
-               return IB_INSUFFICIENT_MEMORY;\r
-       }\r
-\r
-       p_cm_ioctl->in.h_cm_rep = h_conn->obj.hdl;\r
-       p_cm_ioctl->in.cm_rtu = *p_cm_rtu;\r
-       if( p_cm_rtu->p_rtu_pdata )\r
-       {\r
-               cl_memcpy( (&p_cm_ioctl->in.cm_rtu) + 1,\r
-                       p_cm_rtu->p_rtu_pdata, p_cm_rtu->rtu_length );\r
-       }\r
-\r
-       cl_status = do_al_dev_ioctl( UAL_CM_RTU,\r
-               &p_cm_ioctl->in, ioctl_buf_sz,\r
-               &p_cm_ioctl->out, sizeof(p_cm_ioctl->out),\r
-               &bytes_ret );\r
-\r
-       if( cl_status != CL_SUCCESS || bytes_ret != sizeof(p_cm_ioctl->out) )\r
-       {\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
-                       ("UAL_CM_RTU IOCTL returned %s\n", CL_STATUS_MSG(cl_status)) );\r
-               status = IB_ERROR;\r
-       }\r
-       else\r
-       {\r
-               status = p_cm_ioctl->out.status;\r
-       }\r
-\r
-       if( IB_SUCCESS != status )\r
-       {\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
-                       ("IOCTL status %s.\n", ib_get_err_str(status)) );\r
-               ref_al_obj( &h_conn->obj );\r
-               h_conn->obj.pfn_destroy( &h_conn->obj, NULL );\r
-       }\r
-\r
-       cl_free( p_cm_ioctl );\r
-       AL_EXIT( AL_DBG_CM );\r
-       return status;\r
-}\r
-\r
-\r
-\r
-ib_api_status_t\r
-ib_cm_handoff(\r
-       IN              const   ib_cm_handle_t                          h_cm_req,\r
-       IN              const   ib_net64_t                                      svc_id )\r
-{\r
-       ib_cm_handle_t                  h_conn;\r
-       ual_cm_handoff_ioctl_t  cm_ioctl;\r
-       uintn_t                                 bytes_ret;\r
-       cl_status_t                             cl_status;\r
-\r
-       AL_ENTER( AL_DBG_CM );\r
-\r
-       /* Validate input parameters. */\r
-       h_conn = h_cm_req;\r
-       if( AL_OBJ_INVALID_HANDLE( h_conn, AL_OBJ_TYPE_H_CONN ) )\r
-       {\r
-               AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("Invalid REQ handle.\n") );\r
-               return IB_INVALID_HANDLE;\r
-       }\r
-       if( !svc_id )\r
-       {\r
-               AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("0 svc_id\n" ) );\r
-               return IB_INVALID_PARAMETER;\r
-       }\r
-\r
-       cl_memclr( &cm_ioctl, sizeof(ual_cm_rej_ioctl_t) );\r
-\r
-       cm_ioctl.in.h_cm = h_conn->obj.hdl;\r
-       CL_ASSERT( cm_ioctl.in.h_cm );\r
-       cm_ioctl.in.sid = svc_id;\r
-\r
-       cl_status = do_al_dev_ioctl( UAL_CM_HANDOFF,\r
-               &cm_ioctl.in, sizeof(cm_ioctl.in), &cm_ioctl.out, sizeof(cm_ioctl.out),\r
-               &bytes_ret );\r
-\r
-       if( cl_status != CL_SUCCESS || bytes_ret != sizeof(cm_ioctl.out) )\r
-       {\r
-               AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,\r
-                       ("UAL_CM_HANDOFF IOCTL returned %s\n", CL_STATUS_MSG(cl_status)) );\r
-               return IB_ERROR;\r
-       }\r
-       else if( cm_ioctl.out.status != IB_SUCCESS )\r
-       {\r
-               AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,\r
-                       ("IOCTL status %s\n", ib_get_err_str(cm_ioctl.out.status)) );\r
-       }\r
-\r
-       /* Move the QP (if any) to the error state. */\r
-       if( h_conn->h_qp )\r
-               cm_reset_qp( h_conn->h_qp, 0 );\r
-\r
-       AL_EXIT( AL_DBG_CM );\r
-       return cm_ioctl.out.status;\r
-}\r
-\r
-\r
-\r
-ib_api_status_t\r
-ib_cm_rej(\r
-       IN      const           ib_cm_handle_t                          h_cm,\r
-       IN      const           ib_cm_rej_t* const                      p_cm_rej )\r
-{\r
-       ib_cm_handle_t                  h_conn;\r
-       ual_cm_rej_ioctl_t              *p_cm_ioctl;\r
-       size_t                                  ioctl_buf_sz;\r
-       uint8_t                                 *p_data;\r
-       uintn_t                                 bytes_ret;\r
-       ib_api_status_t                 status;\r
-       cl_status_t                             cl_status;\r
-\r
-       AL_ENTER(AL_DBG_CM);\r
-\r
-       /* Validate input parameters. */\r
-       h_conn = h_cm;\r
-       if( AL_OBJ_INVALID_HANDLE( h_conn, AL_OBJ_TYPE_H_CONN ) )\r
-       {\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid REJ handle.\n") );\r
-               return IB_INVALID_HANDLE;\r
-       }\r
-       if( !p_cm_rej )\r
-       {\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("NULL p_cm_rej\n") );\r
-               return IB_INVALID_PARAMETER;\r
-       }\r
-\r
-       ioctl_buf_sz = sizeof(p_cm_ioctl->in);\r
-       if( p_cm_rej->p_ari )\r
-               ioctl_buf_sz += p_cm_rej->ari_length;\r
-       if( p_cm_rej->p_rej_pdata )\r
-               ioctl_buf_sz += p_cm_rej->rej_length;\r
-\r
-       p_cm_ioctl = (ual_cm_rej_ioctl_t*)cl_zalloc( ioctl_buf_sz );\r
-       if( !p_cm_ioctl )\r
-       {\r
-               AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,\r
-                       ("Failed to allocate IOCTL buffer.\n") );\r
-               return IB_INSUFFICIENT_MEMORY;\r
-       }\r
-\r
-       p_cm_ioctl->in.h_cm = h_conn->obj.hdl;\r
-       CL_ASSERT( p_cm_ioctl->in.h_cm );\r
-       p_cm_ioctl->in.cm_rej = *p_cm_rej;\r
-       p_data = (uint8_t*)((&p_cm_ioctl->in.cm_rej) + 1);\r
-       if( p_cm_rej->p_ari )\r
-       {\r
-               cl_memcpy( p_data, p_cm_rej->p_ari, p_cm_rej->ari_length );\r
-               p_data += p_cm_rej->ari_length;\r
-       }\r
-       if( p_cm_rej->p_rej_pdata )\r
-               cl_memcpy( p_data, p_cm_rej->p_rej_pdata, p_cm_rej->rej_length );\r
-\r
-       cl_status = do_al_dev_ioctl( UAL_CM_REJ,\r
-               &p_cm_ioctl->in, ioctl_buf_sz,\r
-               &p_cm_ioctl->out, sizeof(p_cm_ioctl->out),\r
-               &bytes_ret );\r
-\r
-       if( cl_status != CL_SUCCESS || bytes_ret != sizeof(p_cm_ioctl->out) )\r
-       {\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
-                       ("UAL_CM_REJ IOCTL returned %s\n", CL_STATUS_MSG(cl_status)) );\r
-               status = IB_ERROR;\r
-       }\r
-       else\r
-       {\r
-               status = p_cm_ioctl->out.status;\r
-       }\r
-\r
-       if( h_conn->h_qp )\r
-               cm_reset_qp( h_conn->h_qp, 0 );\r
-\r
-       if( IB_SUCCESS == status )\r
-       {\r
-               /* Cleanup the connection request. */\r
-               ref_al_obj( &h_conn->obj );\r
-               h_conn->obj.pfn_destroy( &h_conn->obj, NULL );\r
-       }\r
-       else\r
-       {\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
-                       ("IOCTL status %s.\n", ib_get_err_str(status)) );\r
-       }\r
-\r
-       cl_free( p_cm_ioctl );\r
-       AL_EXIT( AL_DBG_CM );\r
-       return status;\r
-}\r
-\r
-\r
-\r
-ib_api_status_t\r
-ib_cm_mra(\r
-       IN      const           ib_cm_handle_t                          h_cm,\r
-       IN      const           ib_cm_mra_t* const                      p_cm_mra )\r
-{\r
-       ib_cm_handle_t                  h_conn;\r
-       ual_cm_mra_ioctl_t              *p_cm_ioctl;\r
-       size_t                                  ioctl_buf_sz;\r
-       uintn_t                                 bytes_ret;\r
-       ib_api_status_t                 status;\r
-       cl_status_t                             cl_status;\r
-\r
-       AL_ENTER(AL_DBG_CM);\r
-\r
-       /* Validate input parameters. */\r
-       h_conn = h_cm;\r
-       if( AL_OBJ_INVALID_HANDLE( h_conn, AL_OBJ_TYPE_H_CONN ) )\r
-       {\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid CM handle.\n") );\r
-               return IB_INVALID_HANDLE;\r
-       }\r
-       if( !p_cm_mra )\r
-       {\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("NULL p_cm_mra\n") );\r
-               return IB_INVALID_PARAMETER;\r
-       }\r
-\r
-       ioctl_buf_sz = sizeof(p_cm_ioctl->in);\r
-       if( p_cm_mra->p_mra_pdata )\r
-               ioctl_buf_sz += p_cm_mra->mra_length;\r
-\r
-       p_cm_ioctl = (ual_cm_mra_ioctl_t*)cl_zalloc( ioctl_buf_sz );\r
-       if( !p_cm_ioctl )\r
-       {\r
-               AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,\r
-                       ("Failed to allocate IOCTL buffer\n") );\r
-               return IB_INSUFFICIENT_MEMORY;\r
-       }\r
-\r
-       p_cm_ioctl->in.h_cm = h_conn->obj.hdl;\r
-       CL_ASSERT( p_cm_ioctl->in.h_cm );\r
-       p_cm_ioctl->in.cm_mra = *p_cm_mra;\r
-       if( p_cm_mra->p_mra_pdata )\r
-       {\r
-               cl_memcpy( (uint8_t*)((&p_cm_ioctl->in.cm_mra) + 1),\r
-                       p_cm_mra->p_mra_pdata, p_cm_mra->mra_length );\r
-       }\r
-\r
-       cl_status = do_al_dev_ioctl( UAL_CM_MRA, &p_cm_ioctl->in, ioctl_buf_sz,\r
-               &p_cm_ioctl->out, sizeof(p_cm_ioctl->out), &bytes_ret );\r
-\r
-       if( cl_status != CL_SUCCESS || bytes_ret != sizeof(p_cm_ioctl->out) )\r
-       {\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
-                       ("UAL_CM_MRA IOCTL returned %s\n", CL_STATUS_MSG(cl_status)) );\r
-               status = IB_ERROR;\r
-       }\r
-       else\r
-       {\r
-               status = p_cm_ioctl->out.status;\r
-               if( status != IB_SUCCESS )\r
-               {\r
-                       AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
-                               ("IOCTL status %s.\n", ib_get_err_str(status)) );\r
-               }\r
-       }\r
-\r
-       cl_free( p_cm_ioctl );\r
-       AL_EXIT(AL_DBG_CM);\r
-       return status;\r
-}\r
-\r
-\r
-\r
-ib_api_status_t\r
-ib_cm_lap(\r
-       IN      const           ib_cm_lap_t* const                      p_cm_lap )\r
-{\r
-       ib_cm_handle_t                  h_conn;\r
-       ual_cm_lap_ioctl_t              *p_cm_ioctl;\r
-       size_t                                  ioctl_buf_sz;\r
-       uintn_t                                 bytes_ret;\r
-       ib_api_status_t                 status;\r
-       cl_status_t                             cl_status;\r
-\r
-       AL_ENTER(AL_DBG_CM);\r
-\r
-       /* Validate input parameters. */\r
-       if( !p_cm_lap || !p_cm_lap->p_alt_path )\r
-       {\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("NULL p_cm_lap\n") );\r
-               return IB_INVALID_PARAMETER;\r
-       }\r
-\r
-       ioctl_buf_sz = sizeof(p_cm_ioctl->in);\r
-       if( p_cm_lap->p_lap_pdata )\r
-               ioctl_buf_sz += p_cm_lap->lap_length;\r
-\r
-       p_cm_ioctl = (ual_cm_lap_ioctl_t*)cl_zalloc( ioctl_buf_sz );\r
-       if( !p_cm_ioctl )\r
-       {\r
-               AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("Failed to allocate IOCTL buffer.\n") );\r
-               return IB_INSUFFICIENT_MEMORY;\r
-       }\r
-\r
-       /* Convert to the kernel-mode handles. */\r
-       p_cm_ioctl->in.cm_lap = *p_cm_lap;\r
-       switch( p_cm_lap->qp_type )\r
-       {\r
-       case IB_QPT_RELIABLE_CONN:\r
-       case IB_QPT_UNRELIABLE_CONN:\r
-               if( AL_OBJ_INVALID_HANDLE( p_cm_lap->h_qp, AL_OBJ_TYPE_H_QP ) ||\r
-                       (p_cm_lap->h_qp->type != p_cm_lap->qp_type) )\r
-               {\r
-                       AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
-                               ("IB_INVALID_QP_HANDLE\n") );\r
-                       status = IB_INVALID_QP_HANDLE;\r
-                       goto cleanup;\r
-               }\r
-               p_cm_ioctl->in.h_qp = p_cm_lap->h_qp->obj.hdl;\r
-               h_conn = ((al_conn_qp_t*)p_cm_lap->h_qp)->p_conn;\r
-               break;\r
-\r
-       default:\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid qp_type.\n") );\r
-               status = IB_INVALID_SETTING;\r
-               goto cleanup;\r
-       }\r
-\r
-       if( AL_OBJ_INVALID_HANDLE( h_conn, AL_OBJ_TYPE_H_CONN ) )\r
-       {\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
-                       ("No connection info!\n") );\r
-               status = IB_INVALID_SETTING;\r
-               goto cleanup;\r
-       }\r
-       h_conn->pfn_cm_apr_cb = p_cm_lap->pfn_cm_apr_cb;\r
-\r
-       /* Copy the path. */\r
-       p_cm_ioctl->in.alt_path = *p_cm_lap->p_alt_path;\r
-       /* Copy the private data. */\r
-       if( p_cm_lap->p_lap_pdata )\r
-       {\r
-               cl_memcpy( (&p_cm_ioctl->in.alt_path) + 1,\r
-                       p_cm_lap->p_lap_pdata, p_cm_lap->lap_length );\r
-       }\r
-\r
-       cl_status = do_al_dev_ioctl( UAL_CM_LAP, &p_cm_ioctl->in, ioctl_buf_sz,\r
-               &p_cm_ioctl->out, sizeof(p_cm_ioctl->out), &bytes_ret );\r
-\r
-       if( cl_status != CL_SUCCESS || bytes_ret != sizeof(p_cm_ioctl->out) )\r
-       {\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
-                       ("UAL_CM_LAP IOCTL returned %s\n", CL_STATUS_MSG(cl_status)) );\r
-               status = IB_ERROR;\r
-       }\r
-       else\r
-       {\r
-               status = p_cm_ioctl->out.status;\r
-               if( status != IB_SUCCESS )\r
-               {\r
-                       AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
-                               ("IOCTL status %s.\n", ib_get_err_str(status)) );\r
-               }\r
-       }\r
-\r
-cleanup:\r
-       cl_free( p_cm_ioctl );\r
-       AL_EXIT(AL_DBG_CM);\r
-       return status;\r
-}\r
-\r
-\r
-\r
-ib_api_status_t\r
-ib_force_apm(\r
-       IN      const           ib_qp_handle_t                          h_qp )\r
-{\r
-       ual_force_apm_ioctl_t   cm_ioctl;\r
-       uintn_t                                 bytes_ret;\r
-       ib_api_status_t                 status;\r
-       cl_status_t                             cl_status;\r
-\r
-       AL_ENTER(AL_DBG_CM);\r
-\r
-       /* Clear the apm_ioctl */\r
-       cl_memclr( &cm_ioctl, sizeof( cm_ioctl ) );\r
-\r
-       /* Replace the handles with kernel handles appropriately */\r
-       if( AL_OBJ_INVALID_HANDLE( h_qp, AL_OBJ_TYPE_H_QP ) )\r
-       {\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid QP handle.\n") );\r
-               return IB_INVALID_QP_HANDLE;\r
-       }\r
-       \r
-       cm_ioctl.in.h_qp = h_qp->obj.hdl;\r
-\r
-       cl_status = do_al_dev_ioctl( UAL_CM_FORCE_APM,\r
-               &cm_ioctl.in, sizeof(cm_ioctl.in), &cm_ioctl.out, sizeof(cm_ioctl.out),\r
-               &bytes_ret );\r
-\r
-       if( cl_status != CL_SUCCESS || bytes_ret != sizeof(cm_ioctl.out) )\r
-       {\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
-                       ("UAL_CM_FORCE_APM IOCTL returned %s\n",\r
-                       CL_STATUS_MSG(cl_status)) );\r
-               status = IB_ERROR;\r
-       }\r
-       else\r
-       {\r
-               status = cm_ioctl.out.status;\r
-               if( status != IB_SUCCESS )\r
-               {\r
-                       AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
-                               ("IOCTL status %s.\n", ib_get_err_str(status)) );\r
-               }\r
-       }\r
-\r
-       AL_EXIT(AL_DBG_CM);\r
-       return status;\r
-}\r
-\r
-\r
-\r
-ib_api_status_t\r
-ib_cm_apr(\r
-       IN              const   ib_cm_handle_t                          h_cm_lap,\r
-       IN              const   ib_cm_apr_t* const                      p_cm_apr )\r
-{\r
-       ib_cm_handle_t                  h_conn;\r
-       ual_cm_apr_ioctl_t              *p_cm_ioctl;\r
-       size_t                                  ioctl_buf_sz;\r
-       uintn_t                                 bytes_ret;\r
-       ib_api_status_t                 status;\r
-       cl_status_t                             cl_status;\r
-       uint8_t                                 *p_buf;\r
-\r
-       AL_ENTER(AL_DBG_CM);\r
-\r
-       /* Validate input parameters. */\r
-       h_conn = h_cm_lap;\r
-       if( AL_OBJ_INVALID_HANDLE( h_conn, AL_OBJ_TYPE_H_CONN ) )\r
-       {\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid lap handle.\n") );\r
-               return IB_INVALID_HANDLE;\r
-       }\r
-       if( !p_cm_apr )\r
-       {\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("NULL p_cm_apr\n") );\r
-               return IB_INVALID_PARAMETER;\r
-       }\r
-\r
-       ioctl_buf_sz = sizeof(p_cm_ioctl->in);\r
-       if( p_cm_apr->p_info )\r
-               ioctl_buf_sz += p_cm_apr->info_length;\r
-       if( p_cm_apr->p_apr_pdata )\r
-               ioctl_buf_sz += p_cm_apr->apr_length;\r
-\r
-       p_cm_ioctl = (ual_cm_apr_ioctl_t*)cl_zalloc( ioctl_buf_sz );\r
-       if( !p_cm_ioctl )\r
-       {\r
-               AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("Failed to allocate IOCTL buffer.\n") );\r
-               return IB_INSUFFICIENT_MEMORY;\r
-       }\r
-\r
-       /* Replace the handles with kernel handles appropriately */\r
-       p_cm_ioctl->in.h_cm_lap = h_conn->obj.hdl;\r
-       CL_ASSERT( p_cm_ioctl->in.h_cm_lap );\r
-\r
-       /* Convert to the kernel-mode handles. */\r
-       p_cm_ioctl->in.cm_apr = *p_cm_apr;\r
-       switch( p_cm_apr->qp_type )\r
-       {\r
-       case IB_QPT_RELIABLE_CONN:\r
-       case IB_QPT_UNRELIABLE_CONN:\r
-               if( AL_OBJ_INVALID_HANDLE( p_cm_apr->h_qp, AL_OBJ_TYPE_H_QP ) ||\r
-                       (p_cm_apr->h_qp->type != p_cm_apr->qp_type) )\r
-               {\r
-                       AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
-                               ("IB_INVALID_QP_HANDLE\n") );\r
-                       status = IB_INVALID_QP_HANDLE;\r
-                       goto cleanup;\r
-               }\r
-               p_cm_ioctl->in.h_qp = p_cm_apr->h_qp->obj.hdl;\r
-               h_conn = ((al_conn_qp_t*)p_cm_apr->h_qp)->p_conn;\r
-               break;\r
-\r
-       default:\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid qp_type.\n") );\r
-               status = IB_INVALID_SETTING;\r
-               goto cleanup;\r
-       }\r
-\r
-       if( AL_OBJ_INVALID_HANDLE( h_conn, AL_OBJ_TYPE_H_CONN ) )\r
-       {\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
-                       ("No connection info!\n") );\r
-               status = IB_INVALID_SETTING;\r
-               goto cleanup;\r
-       }\r
-\r
-       /* Copy the apr info and private data. */\r
-       p_buf = (uint8_t*)((&p_cm_ioctl->in.cm_apr) + 1);\r
-       if( p_cm_apr->p_info )\r
-       {\r
-               cl_memcpy( p_buf, p_cm_apr->p_info, p_cm_apr->info_length );\r
-               p_buf += p_cm_apr->info_length;\r
-       }\r
-       if( p_cm_apr->p_apr_pdata )\r
-               cl_memcpy( p_buf, p_cm_apr->p_apr_pdata, p_cm_apr->apr_length );\r
-\r
-       cl_status = do_al_dev_ioctl( UAL_CM_APR,\r
-               &p_cm_ioctl->in, ioctl_buf_sz,\r
-               &p_cm_ioctl->out, sizeof(p_cm_ioctl->out),\r
-               &bytes_ret );\r
-\r
-       if( cl_status != CL_SUCCESS || bytes_ret != sizeof(p_cm_ioctl->out) )\r
-       {\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
-                       ("UAL_CM_APR IOCTL returned %s.\n", CL_STATUS_MSG(cl_status)) );\r
-               status = IB_ERROR;\r
-       }\r
-       else\r
-       {\r
-               status = p_cm_ioctl->out.status;\r
-               if( status != IB_SUCCESS )\r
-               {\r
-                       AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
-                               ("IOCTL status %s.\n", ib_get_err_str(status)) );\r
-               }\r
-       }\r
-\r
-       /* Release the reference taken when processing the callback. */\r
-       deref_al_obj( &h_conn->obj );\r
-\r
-cleanup:\r
-       cl_free( p_cm_ioctl );\r
-       AL_EXIT(AL_DBG_CM);\r
-       return IB_SUCCESS;\r
-}\r
-\r
-\r
-\r
-ib_api_status_t\r
-ib_cm_dreq(\r
-       IN      const           ib_cm_dreq_t* const                     p_cm_dreq )\r
-{\r
-       ib_cm_handle_t                  h_conn;\r
-       ual_cm_dreq_ioctl_t             *p_cm_ioctl;\r
-       size_t                                  ioctl_buf_sz;\r
-       uintn_t                                 bytes_ret;\r
-       ib_api_status_t                 status;\r
-       cl_status_t                             cl_status;\r
-\r
-       AL_ENTER(AL_DBG_CM);\r
-\r
-       /* Validate input parameters. */\r
-       if( !p_cm_dreq )\r
-       {\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("NULL p_cm_dreq\n") );\r
-               return IB_INVALID_PARAMETER;\r
-       }\r
-\r
-       ioctl_buf_sz = sizeof(p_cm_ioctl->in);\r
-       if( p_cm_dreq->p_dreq_pdata )\r
-               ioctl_buf_sz += p_cm_dreq->dreq_length;\r
-\r
-       p_cm_ioctl = (ual_cm_dreq_ioctl_t*)cl_zalloc( ioctl_buf_sz );\r
-       if( !p_cm_ioctl )\r
-       {\r
-               AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("Failed to allocate IOCTL buffer.\n") );\r
-               return IB_INSUFFICIENT_MEMORY;\r
-       }\r
-\r
-       /* Convert to the kernel-mode handles. */\r
-       p_cm_ioctl->in.cm_dreq = *p_cm_dreq;\r
-       switch( p_cm_dreq->qp_type )\r
-       {\r
-       case IB_QPT_RELIABLE_CONN:\r
-       case IB_QPT_UNRELIABLE_CONN:\r
-               if( AL_OBJ_INVALID_HANDLE( p_cm_dreq->h_qp, AL_OBJ_TYPE_H_QP ) ||\r
-                       (p_cm_dreq->h_qp->type != p_cm_dreq->qp_type) )\r
-               {\r
-                       AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
-                               ("IB_INVALID_QP_HANDLE\n") );\r
-                       status = IB_INVALID_QP_HANDLE;\r
-                       goto cleanup;\r
-               }\r
-               p_cm_ioctl->in.h_qp = p_cm_dreq->h_qp->obj.hdl;\r
-               h_conn = ((al_conn_qp_t*)p_cm_dreq->h_qp)->p_conn;\r
-               break;\r
-\r
-       default:\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid qp_type.\n") );\r
-               status = IB_INVALID_SETTING;\r
-               goto cleanup;\r
-       }\r
-\r
-       if( AL_OBJ_INVALID_HANDLE( h_conn, AL_OBJ_TYPE_H_CONN ) )\r
-       {\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
-                       ("No connection info!\n") );\r
-               status = IB_INVALID_SETTING;\r
-               goto cleanup;\r
-       }\r
-       h_conn->pfn_cm_drep_cb = p_cm_dreq->pfn_cm_drep_cb;\r
-\r
-       /* Copy the private data. */\r
-       if( p_cm_dreq->p_dreq_pdata )\r
-       {\r
-               cl_memcpy( (&p_cm_ioctl->in.cm_dreq) + 1,\r
-                       p_cm_dreq->p_dreq_pdata, p_cm_dreq->dreq_length );\r
-       }\r
-\r
-       cl_status = do_al_dev_ioctl( UAL_CM_DREQ,\r
-               &p_cm_ioctl->in, ioctl_buf_sz,\r
-               &p_cm_ioctl->out, sizeof(p_cm_ioctl->out),\r
-               &bytes_ret );\r
-\r
-       if( cl_status != CL_SUCCESS || bytes_ret != sizeof(p_cm_ioctl->out) )\r
-       {\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
-                       ("UAL_CM_DREQ IOCTL returned %s\n", CL_STATUS_MSG(cl_status)) );\r
-               status = IB_ERROR;\r
-       }\r
-       else\r
-       {\r
-               status = p_cm_ioctl->out.status;\r
-               if( IB_SUCCESS != status )\r
-               {\r
-                       /* We can fail if we just received a DREQ, which is not an error. */\r
-                       AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM ,\r
-                               ("IOCTL status %s\n", ib_get_err_str(status)) );\r
-               }\r
-       }\r
-\r
-cleanup:\r
-       cl_free( p_cm_ioctl );\r
-       AL_EXIT(AL_DBG_CM);\r
-       return status;\r
-}\r
-\r
-\r
-\r
-ib_api_status_t\r
-ib_cm_drep(\r
-       IN      const           ib_cm_handle_t                          h_cm_dreq,\r
-       IN      const           ib_cm_drep_t*   const           p_cm_drep )\r
-{\r
-       ib_cm_handle_t                  h_conn;\r
-       ual_cm_drep_ioctl_t             *p_cm_ioctl;\r
-       size_t                                  ioctl_buf_sz;\r
-       uintn_t                                 bytes_ret;\r
-       ib_api_status_t                 status;\r
-       cl_status_t                             cl_status;\r
-\r
-       AL_ENTER(AL_DBG_CM);\r
-\r
-       /* Validate input parameters. */\r
-       h_conn = h_cm_dreq;\r
-       if( AL_OBJ_INVALID_HANDLE( h_conn, AL_OBJ_TYPE_H_CONN ) )\r
-       {\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid DREP handle.\n") );\r
-               return IB_INVALID_HANDLE;\r
-       }\r
-       if( !p_cm_drep )\r
-       {\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("NULL p_cm_drep\n") );\r
-               return IB_INVALID_PARAMETER;\r
-       }\r
-\r
-       ioctl_buf_sz = sizeof(p_cm_ioctl->in);\r
-       if( p_cm_drep->p_drep_pdata )\r
-               ioctl_buf_sz += p_cm_drep->drep_length;\r
-\r
-       p_cm_ioctl = (ual_cm_drep_ioctl_t*)cl_zalloc( ioctl_buf_sz );\r
-       if( !p_cm_ioctl )\r
-       {\r
-               AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,\r
-                       ("Failed to allocate IOCTL buffer.\n") );\r
-               return IB_INSUFFICIENT_MEMORY;\r
-       }\r
-\r
-       p_cm_ioctl->in.h_cm_dreq = h_conn->obj.hdl;\r
-       CL_ASSERT( p_cm_ioctl->in.h_cm_dreq );\r
-       p_cm_ioctl->in.cm_drep = *p_cm_drep;\r
-       if( p_cm_drep->p_drep_pdata )\r
-       {\r
-               cl_memcpy( (uint8_t*)((&p_cm_ioctl->in.cm_drep) + 1),\r
-                       p_cm_drep->p_drep_pdata, p_cm_drep->drep_length );\r
-       }\r
-\r
-       cl_status = do_al_dev_ioctl( UAL_CM_DREP,\r
-               &p_cm_ioctl->in, ioctl_buf_sz,\r
-               &p_cm_ioctl->out, sizeof(p_cm_ioctl->out),\r
-               &bytes_ret );\r
-\r
-       if( cl_status != CL_SUCCESS || bytes_ret != sizeof(p_cm_ioctl->out) )\r
-       {\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
-                       ("UAL_CM_DREP IOCTL returned %s\n", CL_STATUS_MSG(cl_status)) );\r
-               status = IB_ERROR;\r
-       }\r
-       else\r
-       {\r
-               status = p_cm_ioctl->out.status;\r
-       }\r
-\r
-       if( IB_SUCCESS == status )\r
-       {\r
-               cm_reset_qp( h_conn->h_qp, 0 );\r
-               /* Cleanup the connection request. */\r
-               h_conn->obj.pfn_destroy( &h_conn->obj, NULL );\r
-       }\r
-       else\r
-       {\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
-                       ("IOCTL status %s\n", ib_get_err_str(status)) );\r
-\r
-               /* Release the reference taken when processing the callback. */\r
-               deref_al_obj( &h_conn->obj );\r
-       }\r
-\r
-       cl_free( p_cm_ioctl );\r
-       AL_EXIT(AL_DBG_CM);\r
-       return status;\r
-}\r
-\r
-\r
-\r
-void\r
-ual_listen_err_cb(\r
-       IN                              ib_listen_err_rec_t                     *p_listen_err_rec )\r
-{\r
-       ib_listen_handle_t              h_listen;\r
-\r
-       AL_ENTER(AL_DBG_CM);\r
-       \r
-       /* Get the listen object. */\r
-       h_listen = p_listen_err_rec->listen_context;\r
-       if( AL_OBJ_INVALID_HANDLE( h_listen, AL_OBJ_TYPE_H_LISTEN ) )\r
-               return;\r
-\r
-       /* Convert to the user's handles and structures. */\r
-       p_listen_err_rec->listen_context = (void*)h_listen->obj.context;\r
-       p_listen_err_rec->h_cm_listen = h_listen;\r
-\r
-       /* Call the user's callback. */\r
-       h_listen->pfn_listen_err_cb( p_listen_err_rec );\r
-\r
-       /* Destroy the listen request. */\r
-       ref_al_obj( &h_listen->obj );\r
-       h_listen->obj.pfn_destroy( &h_listen->obj, NULL );\r
-\r
-       AL_EXIT(AL_DBG_CM);\r
-}\r
-\r
-\r
-\r
-void\r
-ual_cm_req_cb(\r
-       IN                              ib_cm_req_rec_t*                        p_cm_req_rec,\r
-       IN                              ib_qp_mod_t*                            p_qp_rtr,\r
-       IN                              ib_qp_mod_t*                            p_qp_rts,\r
-       IN                              uint32_t                                        timeout_ms )\r
-{\r
-       ib_listen_handle_t                      h_listen;\r
-       ib_cm_handle_t                          h_conn;\r
-       ib_qp_handle_t                          h_qp;\r
-\r
-       AL_ENTER(AL_DBG_CM);\r
-\r
-       if( p_cm_req_rec->h_cm_listen )\r
-       {\r
-               /* \r
-                * This was generated in response for a listen request.  Store\r
-                * the kernel handle in the user mode handle in case the\r
-                * ib_cm_listen call has not returned yet.\r
-                */\r
-               h_listen = (ib_listen_handle_t)p_cm_req_rec->context;\r
-               h_listen->obj.hdl = (uint64_t)p_cm_req_rec->h_cm_listen;\r
-\r
-               /*\r
-                * Replace the listen handle with UAL handle and the context with\r
-                * the application's context.\r
-                */\r
-               p_cm_req_rec->h_cm_listen = h_listen;\r
-               p_cm_req_rec->context = h_listen->obj.context;\r
-               p_cm_req_rec->sidr_context = h_listen->sidr_context;\r
-\r
-               /* For a req callback as a result of a listen, there is no\r
-                * connection handle associated with the user mode yet.  So\r
-                * create one that can be used in the reply.\r
-                */\r
-               h_conn = __get_conn( (ib_al_handle_t)h_listen->obj.p_parent_obj );\r
-               if( !h_conn )\r
-               {\r
-                       AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
-                               ("__get_conn failed.\n") );\r
-                       __rej_conn( p_cm_req_rec->h_cm_req, IB_REJ_INSUF_RESOURCES );\r
-                       return;\r
-               }\r
-\r
-               deref_al_obj( &h_conn->obj );\r
-\r
-               /* Copy the callbacks from the listen. */\r
-               h_conn->p_conn_req->pfn_cm_req_cb = h_listen->pfn_cm_req_cb;\r
-               h_conn->pfn_cm_rej_cb = h_listen->pfn_cm_rej_cb;\r
-               h_conn->pfn_cm_mra_cb = h_listen->pfn_cm_mra_cb;\r
-       }\r
-       else\r
-       {\r
-               /* This callback was generated for peer-to-peer connections */\r
-               h_qp = (ib_qp_handle_t)p_cm_req_rec->context;\r
-               p_cm_req_rec->context = h_qp->obj.context;\r
-\r
-               /* Get the connection handle associated with this QP. */\r
-               h_conn = ((al_conn_qp_t*)h_qp)->p_conn;\r
-\r
-               /*\r
-                * Unbind this QP.  This allows the user to use a different QP\r
-                * when replying to the connection.\r
-                */\r
-               cm_unbind_qp( h_conn );\r
-               deref_al_obj( &h_qp->obj );\r
-       }\r
-\r
-       /* Store & replace the kernel handle */\r
-       h_conn->obj.hdl = (uint64_t)p_cm_req_rec->h_cm_req;\r
-       p_cm_req_rec->h_cm_req = h_conn;\r
-\r
-       /*\r
-        * Copy the connection request information needed to properly configure\r
-        * the QP.\r
-        */\r
-       h_conn->p_conn_req->path_rec = p_cm_req_rec->primary_path;\r
-       h_conn->p_conn_req->alt_path_rec = p_cm_req_rec->alt_path;\r
-       h_conn->p_conn_req->qp_mod_rtr = *p_qp_rtr;\r
-       h_conn->p_conn_req->qp_mod_rts = *p_qp_rts;\r
-       h_conn->p_conn_req->timeout_ms = timeout_ms;\r
-\r
-       /* Invoke the user's callback. */\r
-       h_conn->p_conn_req->pfn_cm_req_cb( p_cm_req_rec );\r
-\r
-       AL_EXIT(AL_DBG_CM);\r
-}\r
-\r
-\r
-\r
-void\r
-ual_cm_rep_cb(\r
-       IN                              ib_cm_rep_rec_t*                        p_cm_rep_rec,\r
-       IN                              ib_qp_mod_t*                            p_qp_rtr,\r
-       IN                              ib_qp_mod_t*                            p_qp_rts )\r
-{\r
-       ib_cm_handle_t                          h_conn;\r
-       ib_qp_handle_t                          h_qp;\r
-\r
-       AL_ENTER(AL_DBG_CM);\r
-\r
-       /* Get the user's context. */\r
-       switch( p_cm_rep_rec->qp_type )\r
-       {\r
-       case IB_QPT_RELIABLE_CONN:\r
-       case IB_QPT_UNRELIABLE_CONN:\r
-               h_qp = (ib_qp_handle_t)p_cm_rep_rec->qp_context;\r
-               p_cm_rep_rec->qp_context = h_qp->obj.context;\r
-\r
-               /* Get the connection handle associated with this QP. */\r
-               h_conn = ((al_conn_qp_t*)h_qp)->p_conn;\r
-\r
-               /* Store the kernel reply handle. */\r
-               h_conn->obj.hdl = (uint64_t)p_cm_rep_rec->h_cm_rep;\r
-               p_cm_rep_rec->h_cm_rep = h_conn;\r
-\r
-               /*\r
-                * Copy the connection request information needed to properly\r
-                * configure the QP.\r
-                */\r
-               h_conn->p_conn_req->qp_mod_rtr = *p_qp_rtr;\r
-               h_conn->p_conn_req->qp_mod_rts = *p_qp_rts;\r
-\r
-               /* Call the application callback */\r
-               h_conn->p_conn_req->pfn_cm_rep_cb( p_cm_rep_rec );\r
-               break;\r
-\r
-       case IB_QPT_UNRELIABLE_DGRM:\r
-               /* Get the SIDR request handle associated with this request. */\r
-               h_conn = (ib_cm_handle_t)p_cm_rep_rec->sidr_context;\r
-               p_cm_rep_rec->sidr_context = h_conn->sidr_context;\r
-\r
-               /* Call the application callback */\r
-               h_conn->p_conn_req->pfn_cm_rep_cb( p_cm_rep_rec );\r
-\r
-               /* Destroy the SIDR request. */\r
-               ref_al_obj( &h_conn->obj );\r
-               h_conn->obj.pfn_destroy( &h_conn->obj, NULL );\r
-               break;\r
-\r
-       default:\r
-               AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR , ("Invalid qp_type.\n") );\r
-               break;\r
-       }\r
-\r
-       AL_EXIT(AL_DBG_CM);\r
-}\r
-\r
-\r
-\r
-void\r
-ual_cm_rtu_cb(\r
-       IN                              ib_cm_rtu_rec_t*                        p_cm_rtu_rec )\r
-{\r
-       ib_cm_handle_t                          h_conn;\r
-       ib_qp_handle_t                          h_qp;\r
-       ib_pfn_cm_rtu_cb_t                      pfn_cm_rtu_cb;\r
-\r
-       AL_ENTER(AL_DBG_CM);\r
-\r
-       h_qp = (ib_qp_handle_t)p_cm_rtu_rec->qp_context;\r
-       p_cm_rtu_rec->qp_context = h_qp->obj.context;\r
-\r
-       /* Get the connection handle associated with this QP. */\r
-       h_conn = ((al_conn_qp_t*)h_qp)->p_conn;\r
-\r
-       /*\r
-        * We are done with this connection establishment.  After we call the\r
-        * user back, they can disconnect the QP, destroy it, close AL, or do\r
-        * one of any number of difficult things to deal with, so we need to\r
-        * handle the case where the connection structure may be destroyed.\r
-        * Get a copy of the user's callback.\r
-        */\r
-       pfn_cm_rtu_cb = h_conn->p_conn_req->pfn_cm_rtu_cb;\r
-       __free_conn_req( h_conn );\r
-\r
-       /* Invoke the user's callback. */\r
-       pfn_cm_rtu_cb( p_cm_rtu_rec );\r
-\r
-       AL_EXIT(AL_DBG_CM);\r
-}\r
-\r
-\r
-\r
-void\r
-ual_cm_rej_cb(\r
-       IN                              ib_cm_rej_rec_t*                        p_cm_rej_rec )\r
-{\r
-       ib_cm_handle_t                          h_conn;\r
-       ib_qp_handle_t                          h_qp;\r
-       ib_pfn_cm_rej_cb_t                      pfn_cm_rej_cb;\r
-\r
-       AL_ENTER(AL_DBG_CM);\r
-\r
-       h_qp = (ib_qp_handle_t)p_cm_rej_rec->qp_context;\r
-       p_cm_rej_rec->qp_context = h_qp->obj.context;\r
-\r
-       /* Get the connection handle associated with this QP. */\r
-       h_conn = ((al_conn_qp_t*)h_qp)->p_conn;\r
-\r
-       if( !h_conn )\r
-       {\r
-               AL_EXIT( AL_DBG_CM );\r
-               return;\r
-       }\r
-\r
-       /* Move the QP to the error state.  Timewait is tracked in the kernel. */\r
-       cm_reset_qp( h_qp, 0 );\r
-\r
-       /* \r
-        * Since user can reuse the QP associated with this connection after\r
-        * receiving the reject message, we need to disassociate this\r
-        * connection handle from the QP before calling the user back.\r
-        */\r
-       if ( h_conn )\r
-       {\r
-           pfn_cm_rej_cb = h_conn->pfn_cm_rej_cb;\r
-           ref_al_obj( &h_conn->obj );\r
-           h_conn->obj.pfn_destroy( &h_conn->obj, NULL );\r
-       \r
-           /* Invoke the user's callback. */\r
-           if( pfn_cm_rej_cb )\r
-               pfn_cm_rej_cb( p_cm_rej_rec );\r
-       }\r
-       AL_EXIT(AL_DBG_CM);\r
-}\r
-\r
-\r
-\r
-void\r
-ual_cm_mra_cb(\r
-       IN                              ib_cm_mra_rec_t*                        p_cm_mra_rec )\r
-{\r
-       ib_cm_handle_t                          h_conn;\r
-       ib_qp_handle_t                          h_qp;\r
-\r
-       AL_ENTER(AL_DBG_CM);\r
-\r
-       /* Convert the user's handles. */\r
-       switch( p_cm_mra_rec->qp_type )\r
-       {\r
-       case IB_QPT_RELIABLE_CONN:\r
-       case IB_QPT_UNRELIABLE_CONN:\r
-               h_qp = (ib_qp_handle_t)p_cm_mra_rec->qp_context;\r
-               p_cm_mra_rec->qp_context = h_qp->obj.context;\r
-               h_conn = ((al_conn_qp_t*)h_qp)->p_conn;\r
-               break;\r
-\r
-       default:\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid qp_type.\n") );\r
-               return;\r
-       }\r
-\r
-       /* Call the application callback */\r
-       h_conn->pfn_cm_mra_cb( p_cm_mra_rec );\r
-\r
-       AL_EXIT(AL_DBG_CM);\r
-}\r
-\r
-\r
-\r
-void\r
-ual_cm_lap_cb(\r
-       IN                              ib_cm_lap_rec_t*                        p_cm_lap_rec )\r
-{\r
-       ib_cm_handle_t                          h_conn;\r
-       ib_qp_handle_t                          h_qp;\r
-\r
-       AL_ENTER(AL_DBG_CM);\r
-\r
-       /* Convert the user's handles. */\r
-       switch( p_cm_lap_rec->qp_type )\r
-       {\r
-       case IB_QPT_RELIABLE_CONN:\r
-       case IB_QPT_UNRELIABLE_CONN:\r
-               h_qp = (ib_qp_handle_t)p_cm_lap_rec->qp_context;\r
-               p_cm_lap_rec->qp_context = h_qp->obj.context;\r
-               h_conn = ((al_conn_qp_t*)h_qp)->p_conn;\r
-               break;\r
-\r
-       default:\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid qp_type.\n") );\r
-               return;\r
-       }\r
-\r
-       /* Store & replace the kernel handle */\r
-       h_conn->obj.hdl = (uint64_t)p_cm_lap_rec->h_cm_lap;\r
-       p_cm_lap_rec->h_cm_lap = h_conn;\r
-\r
-       /* Reference the connection until the user calls ib_cm_apr. */\r
-       ref_al_obj( &h_conn->obj );\r
-\r
-       /* Call the application callback */\r
-       h_conn->pfn_cm_lap_cb( p_cm_lap_rec );\r
-\r
-       AL_EXIT(AL_DBG_CM);\r
-}\r
-\r
-\r
-\r
-void\r
-ual_cm_apr_cb(\r
-       IN                              ib_cm_apr_rec_t*                        p_cm_apr_rec )\r
-{\r
-       ib_cm_handle_t                          h_conn;\r
-       ib_qp_handle_t                          h_qp;\r
-\r
-       AL_ENTER(AL_DBG_CM);\r
-\r
-       /* Convert the user's handles. */\r
-       switch( p_cm_apr_rec->qp_type )\r
-       {\r
-       case IB_QPT_RELIABLE_CONN:\r
-       case IB_QPT_UNRELIABLE_CONN:\r
-               h_qp = (ib_qp_handle_t)p_cm_apr_rec->qp_context;\r
-               p_cm_apr_rec->qp_context = h_qp->obj.context;\r
-               h_conn = ((al_conn_qp_t*)h_qp)->p_conn;\r
-               break;\r
-\r
-       default:\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid qp_type.\n") );\r
-               return;\r
-       }\r
-\r
-       /* Call the application callback */\r
-       h_conn->pfn_cm_apr_cb( p_cm_apr_rec );\r
-\r
-       AL_EXIT(AL_DBG_CM);\r
-}\r
-\r
-\r
-\r
-void\r
-ual_cm_dreq_cb(\r
-       IN                              ib_cm_dreq_rec_t*                       p_cm_dreq_rec )\r
-{\r
-       ib_cm_handle_t                          h_conn;\r
-       ib_qp_handle_t                          h_qp;\r
-\r
-       AL_ENTER(AL_DBG_CM);\r
-\r
-       /* Convert the user's handles. */\r
-       switch( p_cm_dreq_rec->qp_type )\r
-       {\r
-       case IB_QPT_RELIABLE_CONN:\r
-       case IB_QPT_UNRELIABLE_CONN:\r
-               h_qp = (ib_qp_handle_t)p_cm_dreq_rec->qp_context;\r
-               p_cm_dreq_rec->qp_context = h_qp->obj.context;\r
-               h_conn = ((al_conn_qp_t*)h_qp)->p_conn;\r
-               break;\r
-\r
-       default:\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid qp_type.\n") );\r
-               return;\r
-       }\r
-\r
-       /* Store the kernel reply handle. */\r
-       h_conn->obj.hdl = (uint64_t)p_cm_dreq_rec->h_cm_dreq;\r
-       p_cm_dreq_rec->h_cm_dreq = h_conn;\r
-\r
-       /* Reference the connection until the user calls ib_cm_drep. */\r
-       ref_al_obj( &h_conn->obj );\r
-\r
-       /* Call the application callback */\r
-       h_conn->pfn_cm_dreq_cb( p_cm_dreq_rec );\r
-       AL_EXIT(AL_DBG_CM);\r
-}\r
-\r
-\r
-\r
-void\r
-ual_cm_drep_cb(\r
-       IN                              ib_cm_drep_rec_t*                       p_cm_drep_rec )\r
-{\r
-       ib_cm_handle_t                          h_conn;\r
-       ib_qp_handle_t                          h_qp;\r
-       ib_pfn_cm_drep_cb_t                     pfn_cm_drep_cb;\r
-\r
-       AL_ENTER(AL_DBG_CM);\r
-\r
-       /* Convert the user's handles. */\r
-       switch( p_cm_drep_rec->qp_type )\r
-       {\r
-       case IB_QPT_RELIABLE_CONN:\r
-       case IB_QPT_UNRELIABLE_CONN:\r
-               h_qp = (ib_qp_handle_t)p_cm_drep_rec->qp_context;\r
-               p_cm_drep_rec->qp_context = h_qp->obj.context;\r
-               h_conn = ((al_conn_qp_t*)h_qp)->p_conn;\r
-               break;\r
-\r
-       default:\r
-               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid qp_type.\n") );\r
-               return;\r
-       }\r
-\r
-       /* TODO: Handle timewait. */\r
-       cm_reset_qp( h_qp, 0 );\r
-\r
-       /*\r
-        * We are done with this connection.  After we call the user back,\r
-        * they can close AL, or do one of any number of difficult things\r
-        * to deal with, so we need to handle the case where the connection\r
-        * structure may be destroyed.  Get a copy of the user's callback.\r
-        */\r
-       pfn_cm_drep_cb = h_conn->pfn_cm_drep_cb;\r
-       ref_al_obj( &h_conn->obj );\r
-       h_conn->obj.pfn_destroy( &h_conn->obj, NULL );\r
-\r
-       /* Invoke the user's callback. */\r
-       pfn_cm_drep_cb( p_cm_drep_rec );\r
-\r
-       AL_EXIT(AL_DBG_CM);\r
-}\r
diff --git a/core/al/user/ual_cm.h b/core/al/user/ual_cm.h
deleted file mode 100644 (file)
index dc81a47..0000000
+++ /dev/null
@@ -1,164 +0,0 @@
-/*\r
- * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.\r
- * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. \r
- *\r
- * This software is available to you under the OpenIB.org BSD license\r
- * below:\r
- *\r
- *     Redistribution and use in source and binary forms, with or\r
- *     without modification, are permitted provided that the following\r
- *     conditions are met:\r
- *\r
- *      - Redistributions of source code must retain the above\r
- *        copyright notice, this list of conditions and the following\r
- *        disclaimer.\r
- *\r
- *      - Redistributions in binary form must reproduce the above\r
- *        copyright notice, this list of conditions and the following\r
- *        disclaimer in the documentation and/or other materials\r
- *        provided with the distribution.\r
- *\r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\r
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\r
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
- * SOFTWARE.\r
- *\r
- * $Id$\r
- */\r
-\r
-#if !defined(__IB_UAL_CM_H__)\r
-#define __IB_UAL_CM_H__\r
-\r
-#include "al_common.h"\r
-\r
-\r
-\r
-/*\r
- * Used to store user's callback and other connection information.\r
- */\r
-typedef struct _al_listen\r
-{\r
-       /* CM info is stored as a child to AL. */\r
-       al_obj_t                                        obj;    /* must be first */\r
-\r
-       /* Callback information. */\r
-       ib_pfn_cm_req_cb_t                      pfn_cm_req_cb;\r
-       ib_pfn_cm_mra_cb_t                      pfn_cm_mra_cb;\r
-       ib_pfn_cm_rej_cb_t                      pfn_cm_rej_cb;\r
-\r
-       ib_pfn_listen_err_cb_t          pfn_listen_err_cb;\r
-\r
-       /* valid for ud qp_type only */\r
-       const void                                      *sidr_context;\r
-\r
-}      al_listen_t;\r
-\r
-\r
-\r
-/*\r
- * Connection request information.  Used only during connection\r
- * establishment.\r
- */\r
-typedef struct _conn_req_t\r
-{\r
-       /* Path information needed to transiton the QP when connecting. */\r
-       ib_path_rec_t                           path_rec;\r
-       ib_path_rec_t                           alt_path_rec;\r
-\r
-       /* QP modification parameters provided by the kernel CM. */\r
-       ib_qp_mod_t                                     qp_mod_rtr;\r
-       ib_qp_mod_t                                     qp_mod_rts;\r
-       uint32_t                                        timeout_ms;\r
-\r
-       /* Callback information needed only when connecting. */\r
-       ib_pfn_cm_req_cb_t                      pfn_cm_req_cb;\r
-       ib_pfn_cm_rep_cb_t                      pfn_cm_rep_cb;\r
-       ib_pfn_cm_rtu_cb_t                      pfn_cm_rtu_cb;\r
-\r
-}      conn_req_t;\r
-\r
-\r
-\r
-/*\r
- * Used to track connections.\r
- */\r
-typedef struct _al_conn\r
-{\r
-       /* CM info is stored as a child to AL. */\r
-       al_obj_t                                        obj;    /* must be first */\r
-\r
-       ib_al_handle_t                          h_al;\r
-       cl_list_item_t                          al_item;\r
-       ib_qp_handle_t                          h_qp;\r
-\r
-       /* Information needed to establish the connection. */\r
-       conn_req_t                                      *p_conn_req;\r
-\r
-       /* valid for ud qp_type only */\r
-       const void                                      *sidr_context;\r
-\r
-       /* Callback information needed after sending the RTU. */\r
-       ib_pfn_cm_rej_cb_t                      pfn_cm_rej_cb;\r
-       ib_pfn_cm_mra_cb_t                      pfn_cm_mra_cb;\r
-\r
-       ib_pfn_cm_lap_cb_t                      pfn_cm_lap_cb;\r
-       ib_pfn_cm_apr_cb_t                      pfn_cm_apr_cb;\r
-\r
-       ib_pfn_cm_dreq_cb_t                     pfn_cm_dreq_cb;\r
-       ib_pfn_cm_drep_cb_t                     pfn_cm_drep_cb;\r
-\r
-}      al_conn_t;\r
-\r
-\r
-\r
-void\r
-ual_cm_req_cb(\r
-       IN                              ib_cm_req_rec_t*                        p_cm_req_rec,\r
-       IN                              ib_qp_mod_t*                            p_qp_rtr,\r
-       IN                              ib_qp_mod_t*                            p_qp_rts,\r
-       IN                              uint32_t                                        timeout_ms );\r
-\r
-void\r
-ual_cm_rep_cb(\r
-       IN                              ib_cm_rep_rec_t*                        p_cm_rep_rec,\r
-       IN                              ib_qp_mod_t*                            p_qp_rtr,\r
-       IN                              ib_qp_mod_t*                            p_qp_rts );\r
-\r
-void\r
-ual_cm_rtu_cb(\r
-       IN                              ib_cm_rtu_rec_t*                        p_cm_rtu_rec );\r
-\r
-void\r
-ual_cm_rej_cb(\r
-       IN                              ib_cm_rej_rec_t*                        p_cm_rej_rec );\r
-\r
-void\r
-ual_cm_mra_cb(\r
-       IN                              ib_cm_mra_rec_t*                        p_cm_mra_rec );\r
-\r
-void\r
-ual_cm_lap_cb(\r
-       IN                              ib_cm_lap_rec_t*                        p_cm_lap_rec );\r
-\r
-void\r
-ual_cm_apr_cb(\r
-       IN                              ib_cm_apr_rec_t*                        p_cm_apr_rec );\r
-\r
-void\r
-ual_cm_dreq_cb(\r
-       IN                              ib_cm_dreq_rec_t*                       p_cm_dreq_rec );\r
-\r
-void\r
-ual_cm_drep_cb(\r
-       IN                              ib_cm_drep_rec_t*                       p_cm_drep_rec );\r
-\r
-void\r
-ual_listen_err_cb(\r
-       IN                              ib_listen_err_rec_t                     *p_listen_err_rec );\r
-\r
-\r
-#endif /* __IB_UAL_CM_H__ */\r