[WSD] Properly size CQs and allow multiple QPs per CQ with HCA drivers that don't...
[mirror/winof/.git] / core / al / user / ual_cm.c
index 5b3de6b..9292ecd 100644 (file)
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
  * SOFTWARE.\r
  *\r
- * $Id:$\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
@@ -266,12 +274,12 @@ ib_cm_listen(
        /* Validate input parameters. */\r
        if( AL_OBJ_INVALID_HANDLE( h_al, AL_OBJ_TYPE_H_AL ) )\r
        {\r
-               AL_TRACE_EXIT( AL_DBG_ERROR, ("Invalid AL handle.\n") );\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_TRACE_EXIT( AL_DBG_ERROR, ("NULL parameter.\n") );\r
+               AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("NULL parameter.\n") );\r
                return IB_INVALID_PARAMETER;\r
        }\r
 \r
@@ -279,7 +287,7 @@ ib_cm_listen(
        h_listen = __get_listen( h_al );\r
        if( !h_listen )\r
        {\r
-               AL_TRACE( AL_DBG_ERROR,\r
+               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
                        ("Failed to allocate listen structure.\n") );\r
                return IB_INSUFFICIENT_MEMORY;\r
        }\r
@@ -300,7 +308,7 @@ ib_cm_listen(
        if( !p_cm_ioctl )\r
        {\r
                h_listen->obj.pfn_destroy( &h_listen->obj, NULL );\r
-               AL_TRACE_EXIT( AL_DBG_ERROR, ("Failed to allocate IOCTL buffer.\n") );\r
+               AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("Failed to allocate IOCTL buffer.\n") );\r
                return IB_INSUFFICIENT_MEMORY;\r
        }\r
 \r
@@ -321,7 +329,7 @@ ib_cm_listen(
 \r
        if( cl_status != CL_SUCCESS || bytes_ret != sizeof(p_cm_ioctl->out) )\r
        {\r
-               AL_TRACE( AL_DBG_ERROR,\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
@@ -332,7 +340,7 @@ ib_cm_listen(
 \r
        if( status != IB_SUCCESS )\r
        {\r
-               AL_TRACE( AL_DBG_ERROR,\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
@@ -366,7 +374,7 @@ ib_cm_cancel(
 \r
        if( AL_OBJ_INVALID_HANDLE( h_cm_listen, AL_OBJ_TYPE_H_LISTEN ) )\r
        {\r
-               AL_TRACE( AL_DBG_ERROR, ("Invalid listen handle.\n") );\r
+               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid listen handle.\n") );\r
                return IB_INVALID_HANDLE;\r
        }\r
 \r
@@ -383,7 +391,7 @@ ib_cm_cancel(
 \r
        if( cl_status != CL_SUCCESS || bytes_ret != sizeof(cm_ioctl.out) )\r
        {\r
-               AL_TRACE( AL_DBG_ERROR,\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
@@ -393,7 +401,7 @@ ib_cm_cancel(
        }\r
        if( status != IB_SUCCESS )\r
        {\r
-               AL_TRACE( AL_DBG_ERROR,\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
@@ -428,7 +436,7 @@ ib_cm_req(
        /* Validate input parameters. */\r
        if( !p_cm_req || !p_cm_req->p_primary_path )\r
        {\r
-               AL_TRACE_EXIT( AL_DBG_ERROR,\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
@@ -444,7 +452,7 @@ ib_cm_req(
        p_cm_ioctl = (ual_cm_req_ioctl_t*)cl_zalloc( ioctl_buf_sz );\r
        if( !p_cm_ioctl )\r
        {\r
-               AL_TRACE_EXIT( AL_DBG_ERROR,\r
+               AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,\r
                        ("Failed to allocate IOCTL buf.\n") );\r
                return IB_INSUFFICIENT_MEMORY;\r
        }\r
@@ -461,7 +469,7 @@ ib_cm_req(
                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
-                       CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,\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
@@ -476,7 +484,7 @@ ib_cm_req(
                        p_cm_req->h_qp->obj.p_parent_obj->p_parent_obj->p_parent_obj );\r
                if( !h_conn )\r
                {\r
-                       CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl,\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
@@ -498,7 +506,7 @@ ib_cm_req(
                if( status != IB_SUCCESS )\r
                {\r
                        h_conn->obj.pfn_destroy( &h_conn->obj, NULL );\r
-                       AL_TRACE( AL_DBG_ERROR,\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
@@ -507,7 +515,7 @@ ib_cm_req(
        case IB_QPT_UNRELIABLE_DGRM:\r
                if( AL_OBJ_INVALID_HANDLE( p_cm_req->h_al, AL_OBJ_TYPE_H_AL ) )\r
                {\r
-                       CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,\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
@@ -516,7 +524,7 @@ ib_cm_req(
                h_conn = __get_conn( p_cm_req->h_al );\r
                if( !h_conn )\r
                {\r
-                       CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl,\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
@@ -527,7 +535,7 @@ ib_cm_req(
                break;\r
 \r
        default:\r
-               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid qp_type.\n") );\r
+               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid qp_type.\n") );\r
                status = IB_INVALID_SETTING;\r
                goto cleanup;\r
        }\r
@@ -560,7 +568,7 @@ ib_cm_req(
 \r
        if( cl_status != CL_SUCCESS || bytes_ret != sizeof(p_cm_ioctl->out) )\r
        {\r
-               AL_TRACE( AL_DBG_ERROR,\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
@@ -571,7 +579,7 @@ ib_cm_req(
 \r
        if( status != IB_SUCCESS )\r
        {\r
-               AL_TRACE( AL_DBG_ERROR,\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
@@ -598,7 +606,7 @@ __save_user_rep(
        ib_port_attr_t          *p_port_attr;\r
        ib_qp_handle_t          h_qp;\r
 \r
-       CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );\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
@@ -610,7 +618,7 @@ __save_user_rep(
        if( !p_port_attr )\r
        {\r
                ci_ca_unlock_attr( h_qp->obj.p_ci_ca );\r
-               CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl, ("invalid p_gid\n" ) );\r
+               AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR , ("invalid p_gid\n" ) );\r
                return IB_INVALID_GID;\r
        }\r
 \r
@@ -619,7 +627,7 @@ __save_user_rep(
                &h_conn->p_conn_req->qp_mod_rts );\r
        ci_ca_unlock_attr( h_qp->obj.p_ci_ca );\r
 \r
-       CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );\r
+       AL_EXIT(AL_DBG_CM);\r
        return IB_SUCCESS;\r
 }\r
 \r
@@ -637,18 +645,18 @@ ib_cm_rep(
        ib_api_status_t                 status;\r
        cl_status_t                             cl_status;\r
 \r
-       CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );\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
-               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid REQ handle.\n") );\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
-               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("NULL p_cm_rep\n") );\r
+               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("NULL p_cm_rep\n") );\r
                return IB_INVALID_PARAMETER;\r
        }\r
 \r
@@ -666,7 +674,7 @@ ib_cm_rep(
        p_cm_ioctl = (ual_cm_rep_ioctl_t*)cl_zalloc( ioctl_buf_sz );\r
        if( !p_cm_ioctl )\r
        {\r
-               AL_TRACE_EXIT( AL_DBG_ERROR, ("Failed to allocate IOCTL buffer.\n") );\r
+               AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("Failed to allocate IOCTL buffer.\n") );\r
                return IB_INSUFFICIENT_MEMORY;\r
        }\r
 \r
@@ -675,7 +683,7 @@ ib_cm_rep(
        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
-               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,\r
+               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
                        ("Invalid QP handle.\n") );\r
                status = IB_INVALID_QP_HANDLE;\r
                goto cleanup;\r
@@ -689,7 +697,7 @@ ib_cm_rep(
        if( status != IB_SUCCESS )\r
        {\r
                __ual_conn_reject( h_conn, IB_REJ_INSUF_QP );\r
-               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,\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
@@ -700,7 +708,7 @@ ib_cm_rep(
        if( status != IB_SUCCESS )\r
        {\r
                __ual_conn_reject( h_conn, IB_REJ_INSUF_QP );\r
-               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,\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
@@ -713,7 +721,7 @@ ib_cm_rep(
                if( status != IB_SUCCESS )\r
                {\r
                        __ual_conn_reject( h_conn, IB_REJ_INSUF_QP );\r
-                       CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,\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
@@ -726,7 +734,7 @@ ib_cm_rep(
        if( status != IB_SUCCESS )\r
        {\r
                __ual_conn_reject( h_conn, IB_REJ_INSUF_QP );\r
-               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,\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
@@ -746,7 +754,7 @@ ib_cm_rep(
 \r
        if( cl_status != CL_SUCCESS || bytes_ret != sizeof(p_cm_ioctl->out) )\r
        {\r
-               AL_TRACE( AL_DBG_ERROR,\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
@@ -757,7 +765,7 @@ ib_cm_rep(
 \r
        if( status != IB_SUCCESS )\r
        {\r
-               CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl,\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
@@ -785,18 +793,18 @@ ib_cm_rtu(
        ib_api_status_t                 status;\r
        cl_status_t                             cl_status;\r
 \r
-       CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );\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
-               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid rep handle.\n") );\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
-               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("NULL p_cm_rtu\n") );\r
+               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("NULL p_cm_rtu\n") );\r
                return IB_INVALID_PARAMETER;\r
        }\r
 \r
@@ -811,7 +819,7 @@ ib_cm_rtu(
        if( status != IB_SUCCESS )\r
        {\r
                __ual_conn_reject( h_conn, IB_REJ_INSUF_QP );\r
-               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,\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
@@ -832,7 +840,7 @@ ib_cm_rtu(
        p_cm_ioctl = (ual_cm_rtu_ioctl_t*)cl_zalloc( ioctl_buf_sz );\r
        if( !p_cm_ioctl )\r
        {\r
-               AL_TRACE_EXIT( AL_DBG_ERROR, ("Failed to allocate IOCTL buffer\n") );\r
+               AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("Failed to allocate IOCTL buffer\n") );\r
                return IB_INSUFFICIENT_MEMORY;\r
        }\r
 \r
@@ -851,7 +859,7 @@ ib_cm_rtu(
 \r
        if( cl_status != CL_SUCCESS || bytes_ret != sizeof(p_cm_ioctl->out) )\r
        {\r
-               AL_TRACE( AL_DBG_ERROR,\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
@@ -862,7 +870,7 @@ ib_cm_rtu(
 \r
        if( IB_SUCCESS != status )\r
        {\r
-               AL_TRACE( AL_DBG_ERROR,\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
@@ -891,12 +899,12 @@ ib_cm_handoff(
        h_conn = h_cm_req;\r
        if( AL_OBJ_INVALID_HANDLE( h_conn, AL_OBJ_TYPE_H_CONN ) )\r
        {\r
-               AL_TRACE_EXIT( AL_DBG_ERROR, ("Invalid REQ handle.\n") );\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_TRACE_EXIT( AL_DBG_ERROR, ("0 svc_id\n" ) );\r
+               AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("0 svc_id\n" ) );\r
                return IB_INVALID_PARAMETER;\r
        }\r
 \r
@@ -912,13 +920,13 @@ ib_cm_handoff(
 \r
        if( cl_status != CL_SUCCESS || bytes_ret != sizeof(cm_ioctl.out) )\r
        {\r
-               AL_TRACE_EXIT( AL_DBG_ERROR,\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_TRACE_EXIT( AL_DBG_ERROR,\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
@@ -945,18 +953,18 @@ ib_cm_rej(
        ib_api_status_t                 status;\r
        cl_status_t                             cl_status;\r
 \r
-       CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );\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
-               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid REJ handle.\n") );\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
-               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("NULL p_cm_rej\n") );\r
+               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("NULL p_cm_rej\n") );\r
                return IB_INVALID_PARAMETER;\r
        }\r
 \r
@@ -969,7 +977,7 @@ ib_cm_rej(
        p_cm_ioctl = (ual_cm_rej_ioctl_t*)cl_zalloc( ioctl_buf_sz );\r
        if( !p_cm_ioctl )\r
        {\r
-               AL_TRACE_EXIT( AL_DBG_ERROR,\r
+               AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,\r
                        ("Failed to allocate IOCTL buffer.\n") );\r
                return IB_INSUFFICIENT_MEMORY;\r
        }\r
@@ -993,7 +1001,7 @@ ib_cm_rej(
 \r
        if( cl_status != CL_SUCCESS || bytes_ret != sizeof(p_cm_ioctl->out) )\r
        {\r
-               AL_TRACE( AL_DBG_ERROR,\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
@@ -1013,7 +1021,7 @@ ib_cm_rej(
        }\r
        else\r
        {\r
-               AL_TRACE( AL_DBG_ERROR,\r
+               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
                        ("IOCTL status %s.\n", ib_get_err_str(status)) );\r
        }\r
 \r
@@ -1036,18 +1044,18 @@ ib_cm_mra(
        ib_api_status_t                 status;\r
        cl_status_t                             cl_status;\r
 \r
-       CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );\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
-               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid CM handle.\n") );\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
-               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("NULL p_cm_mra\n") );\r
+               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("NULL p_cm_mra\n") );\r
                return IB_INVALID_PARAMETER;\r
        }\r
 \r
@@ -1058,7 +1066,7 @@ ib_cm_mra(
        p_cm_ioctl = (ual_cm_mra_ioctl_t*)cl_zalloc( ioctl_buf_sz );\r
        if( !p_cm_ioctl )\r
        {\r
-               AL_TRACE_EXIT( AL_DBG_ERROR,\r
+               AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,\r
                        ("Failed to allocate IOCTL buffer\n") );\r
                return IB_INSUFFICIENT_MEMORY;\r
        }\r
@@ -1077,7 +1085,7 @@ ib_cm_mra(
 \r
        if( cl_status != CL_SUCCESS || bytes_ret != sizeof(p_cm_ioctl->out) )\r
        {\r
-               AL_TRACE( AL_DBG_ERROR,\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
@@ -1086,13 +1094,13 @@ ib_cm_mra(
                status = p_cm_ioctl->out.status;\r
                if( status != IB_SUCCESS )\r
                {\r
-                       AL_TRACE( AL_DBG_ERROR,\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
-       CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );\r
+       AL_EXIT(AL_DBG_CM);\r
        return status;\r
 }\r
 \r
@@ -1109,12 +1117,12 @@ ib_cm_lap(
        ib_api_status_t                 status;\r
        cl_status_t                             cl_status;\r
 \r
-       CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );\r
+       AL_ENTER(AL_DBG_CM);\r
 \r
        /* Validate input parameters. */\r
        if( !p_cm_lap || !p_cm_lap->p_alt_path )\r
        {\r
-               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("NULL p_cm_lap\n") );\r
+               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("NULL p_cm_lap\n") );\r
                return IB_INVALID_PARAMETER;\r
        }\r
 \r
@@ -1125,7 +1133,7 @@ ib_cm_lap(
        p_cm_ioctl = (ual_cm_lap_ioctl_t*)cl_zalloc( ioctl_buf_sz );\r
        if( !p_cm_ioctl )\r
        {\r
-               AL_TRACE_EXIT( AL_DBG_ERROR, ("Failed to allocate IOCTL buffer.\n") );\r
+               AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("Failed to allocate IOCTL buffer.\n") );\r
                return IB_INSUFFICIENT_MEMORY;\r
        }\r
 \r
@@ -1138,7 +1146,7 @@ ib_cm_lap(
                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
-                       CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,\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
@@ -1148,14 +1156,14 @@ ib_cm_lap(
                break;\r
 \r
        default:\r
-               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid qp_type.\n") );\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
-               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,\r
+               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
                        ("No connection info!\n") );\r
                status = IB_INVALID_SETTING;\r
                goto cleanup;\r
@@ -1176,7 +1184,7 @@ ib_cm_lap(
 \r
        if( cl_status != CL_SUCCESS || bytes_ret != sizeof(p_cm_ioctl->out) )\r
        {\r
-               AL_TRACE( AL_DBG_ERROR,\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
@@ -1185,14 +1193,14 @@ ib_cm_lap(
                status = p_cm_ioctl->out.status;\r
                if( status != IB_SUCCESS )\r
                {\r
-                       AL_TRACE( AL_DBG_ERROR,\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
-       CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );\r
+       AL_EXIT(AL_DBG_CM);\r
        return status;\r
 }\r
 \r
@@ -1207,7 +1215,7 @@ ib_force_apm(
        ib_api_status_t                 status;\r
        cl_status_t                             cl_status;\r
 \r
-       CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );\r
+       AL_ENTER(AL_DBG_CM);\r
 \r
        /* Clear the apm_ioctl */\r
        cl_memclr( &cm_ioctl, sizeof( cm_ioctl ) );\r
@@ -1215,7 +1223,7 @@ ib_force_apm(
        /* Replace the handles with kernel handles appropriately */\r
        if( AL_OBJ_INVALID_HANDLE( h_qp, AL_OBJ_TYPE_H_QP ) )\r
        {\r
-               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid QP handle.\n") );\r
+               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid QP handle.\n") );\r
                return IB_INVALID_QP_HANDLE;\r
        }\r
        \r
@@ -1227,7 +1235,7 @@ ib_force_apm(
 \r
        if( cl_status != CL_SUCCESS || bytes_ret != sizeof(cm_ioctl.out) )\r
        {\r
-               AL_TRACE( AL_DBG_ERROR,\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
@@ -1237,12 +1245,12 @@ ib_force_apm(
                status = cm_ioctl.out.status;\r
                if( status != IB_SUCCESS )\r
                {\r
-                       AL_TRACE( AL_DBG_ERROR,\r
+                       AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
                                ("IOCTL status %s.\n", ib_get_err_str(status)) );\r
                }\r
        }\r
 \r
-       CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );\r
+       AL_EXIT(AL_DBG_CM);\r
        return status;\r
 }\r
 \r
@@ -1261,18 +1269,18 @@ ib_cm_apr(
        cl_status_t                             cl_status;\r
        uint8_t                                 *p_buf;\r
 \r
-       CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );\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
-               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid lap handle.\n") );\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
-               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("NULL p_cm_apr\n") );\r
+               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("NULL p_cm_apr\n") );\r
                return IB_INVALID_PARAMETER;\r
        }\r
 \r
@@ -1285,7 +1293,7 @@ ib_cm_apr(
        p_cm_ioctl = (ual_cm_apr_ioctl_t*)cl_zalloc( ioctl_buf_sz );\r
        if( !p_cm_ioctl )\r
        {\r
-               AL_TRACE_EXIT( AL_DBG_ERROR, ("Failed to allocate IOCTL buffer.\n") );\r
+               AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("Failed to allocate IOCTL buffer.\n") );\r
                return IB_INSUFFICIENT_MEMORY;\r
        }\r
 \r
@@ -1302,7 +1310,7 @@ ib_cm_apr(
                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
-                       CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,\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
@@ -1312,14 +1320,14 @@ ib_cm_apr(
                break;\r
 \r
        default:\r
-               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid qp_type.\n") );\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
-               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,\r
+               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
                        ("No connection info!\n") );\r
                status = IB_INVALID_SETTING;\r
                goto cleanup;\r
@@ -1342,7 +1350,7 @@ ib_cm_apr(
 \r
        if( cl_status != CL_SUCCESS || bytes_ret != sizeof(p_cm_ioctl->out) )\r
        {\r
-               AL_TRACE( AL_DBG_ERROR,\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
@@ -1351,7 +1359,7 @@ ib_cm_apr(
                status = p_cm_ioctl->out.status;\r
                if( status != IB_SUCCESS )\r
                {\r
-                       AL_TRACE( AL_DBG_ERROR,\r
+                       AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
                                ("IOCTL status %s.\n", ib_get_err_str(status)) );\r
                }\r
        }\r
@@ -1361,7 +1369,7 @@ ib_cm_apr(
 \r
 cleanup:\r
        cl_free( p_cm_ioctl );\r
-       CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );\r
+       AL_EXIT(AL_DBG_CM);\r
        return IB_SUCCESS;\r
 }\r
 \r
@@ -1378,12 +1386,12 @@ ib_cm_dreq(
        ib_api_status_t                 status;\r
        cl_status_t                             cl_status;\r
 \r
-       CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );\r
+       AL_ENTER(AL_DBG_CM);\r
 \r
        /* Validate input parameters. */\r
        if( !p_cm_dreq )\r
        {\r
-               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("NULL p_cm_dreq\n") );\r
+               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("NULL p_cm_dreq\n") );\r
                return IB_INVALID_PARAMETER;\r
        }\r
 \r
@@ -1394,7 +1402,7 @@ ib_cm_dreq(
        p_cm_ioctl = (ual_cm_dreq_ioctl_t*)cl_zalloc( ioctl_buf_sz );\r
        if( !p_cm_ioctl )\r
        {\r
-               AL_TRACE_EXIT( AL_DBG_ERROR, ("Failed to allocate IOCTL buffer.\n") );\r
+               AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("Failed to allocate IOCTL buffer.\n") );\r
                return IB_INSUFFICIENT_MEMORY;\r
        }\r
 \r
@@ -1407,7 +1415,7 @@ ib_cm_dreq(
                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
-                       CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,\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
@@ -1417,14 +1425,14 @@ ib_cm_dreq(
                break;\r
 \r
        default:\r
-               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid qp_type.\n") );\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
-               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,\r
+               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,\r
                        ("No connection info!\n") );\r
                status = IB_INVALID_SETTING;\r
                goto cleanup;\r
@@ -1445,7 +1453,7 @@ ib_cm_dreq(
 \r
        if( cl_status != CL_SUCCESS || bytes_ret != sizeof(p_cm_ioctl->out) )\r
        {\r
-               AL_TRACE( AL_DBG_ERROR,\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
@@ -1455,14 +1463,14 @@ ib_cm_dreq(
                if( IB_SUCCESS != status )\r
                {\r
                        /* We can fail if we just received a DREQ, which is not an error. */\r
-                       AL_TRACE( AL_DBG_CM,\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
-       CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );\r
+       AL_EXIT(AL_DBG_CM);\r
        return status;\r
 }\r
 \r
@@ -1480,18 +1488,18 @@ ib_cm_drep(
        ib_api_status_t                 status;\r
        cl_status_t                             cl_status;\r
 \r
-       CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );\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
-               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid DREP handle.\n") );\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
-               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("NULL p_cm_drep\n") );\r
+               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("NULL p_cm_drep\n") );\r
                return IB_INVALID_PARAMETER;\r
        }\r
 \r
@@ -1502,7 +1510,7 @@ ib_cm_drep(
        p_cm_ioctl = (ual_cm_drep_ioctl_t*)cl_zalloc( ioctl_buf_sz );\r
        if( !p_cm_ioctl )\r
        {\r
-               AL_TRACE_EXIT( AL_DBG_ERROR,\r
+               AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,\r
                        ("Failed to allocate IOCTL buffer.\n") );\r
                return IB_INSUFFICIENT_MEMORY;\r
        }\r
@@ -1523,7 +1531,7 @@ ib_cm_drep(
 \r
        if( cl_status != CL_SUCCESS || bytes_ret != sizeof(p_cm_ioctl->out) )\r
        {\r
-               AL_TRACE( AL_DBG_ERROR,\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
@@ -1540,7 +1548,7 @@ ib_cm_drep(
        }\r
        else\r
        {\r
-               AL_TRACE( AL_DBG_ERROR,\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
@@ -1548,7 +1556,7 @@ ib_cm_drep(
        }\r
 \r
        cl_free( p_cm_ioctl );\r
-       CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );\r
+       AL_EXIT(AL_DBG_CM);\r
        return status;\r
 }\r
 \r
@@ -1560,7 +1568,7 @@ ual_listen_err_cb(
 {\r
        ib_listen_handle_t              h_listen;\r
 \r
-       CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );\r
+       AL_ENTER(AL_DBG_CM);\r
        \r
        /* Get the listen object. */\r
        h_listen = p_listen_err_rec->listen_context;\r
@@ -1578,7 +1586,7 @@ ual_listen_err_cb(
        ref_al_obj( &h_listen->obj );\r
        h_listen->obj.pfn_destroy( &h_listen->obj, NULL );\r
 \r
-       CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );\r
+       AL_EXIT(AL_DBG_CM);\r
 }\r
 \r
 \r
@@ -1594,7 +1602,7 @@ ual_cm_req_cb(
        ib_cm_handle_t                          h_conn;\r
        ib_qp_handle_t                          h_qp;\r
 \r
-       CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );\r
+       AL_ENTER(AL_DBG_CM);\r
 \r
        if( p_cm_req_rec->h_cm_listen )\r
        {\r
@@ -1621,7 +1629,7 @@ ual_cm_req_cb(
                h_conn = __get_conn( (ib_al_handle_t)h_listen->obj.p_parent_obj );\r
                if( !h_conn )\r
                {\r
-                       CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,\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
@@ -1668,7 +1676,7 @@ ual_cm_req_cb(
        /* Invoke the user's callback. */\r
        h_conn->p_conn_req->pfn_cm_req_cb( p_cm_req_rec );\r
 \r
-       CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );\r
+       AL_EXIT(AL_DBG_CM);\r
 }\r
 \r
 \r
@@ -1682,7 +1690,7 @@ ual_cm_rep_cb(
        ib_cm_handle_t                          h_conn;\r
        ib_qp_handle_t                          h_qp;\r
 \r
-       CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );\r
+       AL_ENTER(AL_DBG_CM);\r
 \r
        /* Get the user's context. */\r
        switch( p_cm_rep_rec->qp_type )\r
@@ -1724,11 +1732,11 @@ ual_cm_rep_cb(
                break;\r
 \r
        default:\r
-               CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid qp_type.\n") );\r
+               AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR , ("Invalid qp_type.\n") );\r
                break;\r
        }\r
 \r
-       CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );\r
+       AL_EXIT(AL_DBG_CM);\r
 }\r
 \r
 \r
@@ -1741,7 +1749,7 @@ ual_cm_rtu_cb(
        ib_qp_handle_t                          h_qp;\r
        ib_pfn_cm_rtu_cb_t                      pfn_cm_rtu_cb;\r
 \r
-       CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );\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
@@ -1762,7 +1770,7 @@ ual_cm_rtu_cb(
        /* Invoke the user's callback. */\r
        pfn_cm_rtu_cb( p_cm_rtu_rec );\r
 \r
-       CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );\r
+       AL_EXIT(AL_DBG_CM);\r
 }\r
 \r
 \r
@@ -1775,7 +1783,7 @@ ual_cm_rej_cb(
        ib_qp_handle_t                          h_qp;\r
        ib_pfn_cm_rej_cb_t                      pfn_cm_rej_cb;\r
 \r
-       CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );\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
@@ -1807,7 +1815,7 @@ ual_cm_rej_cb(
            if( pfn_cm_rej_cb )\r
                pfn_cm_rej_cb( p_cm_rej_rec );\r
        }\r
-       CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );\r
+       AL_EXIT(AL_DBG_CM);\r
 }\r
 \r
 \r
@@ -1819,7 +1827,7 @@ ual_cm_mra_cb(
        ib_cm_handle_t                          h_conn;\r
        ib_qp_handle_t                          h_qp;\r
 \r
-       CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );\r
+       AL_ENTER(AL_DBG_CM);\r
 \r
        /* Convert the user's handles. */\r
        switch( p_cm_mra_rec->qp_type )\r
@@ -1832,14 +1840,14 @@ ual_cm_mra_cb(
                break;\r
 \r
        default:\r
-               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid qp_type.\n") );\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
-       CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );\r
+       AL_EXIT(AL_DBG_CM);\r
 }\r
 \r
 \r
@@ -1851,7 +1859,7 @@ ual_cm_lap_cb(
        ib_cm_handle_t                          h_conn;\r
        ib_qp_handle_t                          h_qp;\r
 \r
-       CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );\r
+       AL_ENTER(AL_DBG_CM);\r
 \r
        /* Convert the user's handles. */\r
        switch( p_cm_lap_rec->qp_type )\r
@@ -1864,7 +1872,7 @@ ual_cm_lap_cb(
                break;\r
 \r
        default:\r
-               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid qp_type.\n") );\r
+               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid qp_type.\n") );\r
                return;\r
        }\r
 \r
@@ -1878,7 +1886,7 @@ ual_cm_lap_cb(
        /* Call the application callback */\r
        h_conn->pfn_cm_lap_cb( p_cm_lap_rec );\r
 \r
-       CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );\r
+       AL_EXIT(AL_DBG_CM);\r
 }\r
 \r
 \r
@@ -1890,7 +1898,7 @@ ual_cm_apr_cb(
        ib_cm_handle_t                          h_conn;\r
        ib_qp_handle_t                          h_qp;\r
 \r
-       CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );\r
+       AL_ENTER(AL_DBG_CM);\r
 \r
        /* Convert the user's handles. */\r
        switch( p_cm_apr_rec->qp_type )\r
@@ -1903,14 +1911,14 @@ ual_cm_apr_cb(
                break;\r
 \r
        default:\r
-               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid qp_type.\n") );\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
-       CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );\r
+       AL_EXIT(AL_DBG_CM);\r
 }\r
 \r
 \r
@@ -1922,7 +1930,7 @@ ual_cm_dreq_cb(
        ib_cm_handle_t                          h_conn;\r
        ib_qp_handle_t                          h_qp;\r
 \r
-       CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );\r
+       AL_ENTER(AL_DBG_CM);\r
 \r
        /* Convert the user's handles. */\r
        switch( p_cm_dreq_rec->qp_type )\r
@@ -1935,7 +1943,7 @@ ual_cm_dreq_cb(
                break;\r
 \r
        default:\r
-               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid qp_type.\n") );\r
+               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid qp_type.\n") );\r
                return;\r
        }\r
 \r
@@ -1948,7 +1956,7 @@ ual_cm_dreq_cb(
 \r
        /* Call the application callback */\r
        h_conn->pfn_cm_dreq_cb( p_cm_dreq_rec );\r
-       CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );\r
+       AL_EXIT(AL_DBG_CM);\r
 }\r
 \r
 \r
@@ -1961,7 +1969,7 @@ ual_cm_drep_cb(
        ib_qp_handle_t                          h_qp;\r
        ib_pfn_cm_drep_cb_t                     pfn_cm_drep_cb;\r
 \r
-       CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );\r
+       AL_ENTER(AL_DBG_CM);\r
 \r
        /* Convert the user's handles. */\r
        switch( p_cm_drep_rec->qp_type )\r
@@ -1974,7 +1982,7 @@ ual_cm_drep_cb(
                break;\r
 \r
        default:\r
-               CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid qp_type.\n") );\r
+               AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid qp_type.\n") );\r
                return;\r
        }\r
 \r
@@ -1994,5 +2002,5 @@ ual_cm_drep_cb(
        /* Invoke the user's callback. */\r
        pfn_cm_drep_cb( p_cm_drep_rec );\r
 \r
-       CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );\r
+       AL_EXIT(AL_DBG_CM);\r
 }\r