[Openib-windows] [PATCH] WPP for al
Yossi Leybovich
sleybo at mellanox.co.il
Sun May 21 05:46:12 PDT 2006
Fab
Attached patch that add WPP support for the AL both in user and kernel.
I created separate provider for user and kernel.
Need to decide what about the bus traces I will prefer to add them to
the AL traces and remove the BUS_TRACE macros.
I tested the fre version with tracesviewm, and generate traces for
kernel/user .
I added the relevant registry entry to the ibbus.inf but did not have
the time to test the chk version.
pls review and apply.
10x
Yossi
Singed-off-by: Yossi Leybovvich (sleybo at mellanox.co.il)
Index: core/al/al.c
===================================================================
--- core/al/al.c (revision 1349)
+++ core/al/al.c (working copy)
@@ -37,6 +37,14 @@
#include "al_cm_cep.h"
#include "al_common.h"
#include "al_debug.h"
+
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "al.tmh"
+#endif
+
#include "al_mad_pool.h"
#include "al_mgr.h"
#include "al_verbs.h"
@@ -67,18 +75,18 @@
IN const ib_al_handle_t
h_al )
#endif
{
- CL_ENTER( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MGR);
if( AL_OBJ_INVALID_HANDLE( h_al, AL_OBJ_TYPE_H_AL ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_AL_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_AL_HANDLE\n") );
return IB_INVALID_AL_HANDLE;
}
ref_al_obj( &h_al->obj );
h_al->obj.pfn_destroy( &h_al->obj, NULL );
- CL_EXIT( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MGR);
return IB_SUCCESS;
}
@@ -133,7 +141,7 @@
status = ib_put_mad( &p_mad_element->element );
if( status != IB_SUCCESS )
{
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("ib_put_mad failed with status %s,
continuing.\n",
ib_get_err_str(status)) );
}
@@ -173,16 +181,16 @@
ib_ca_handle_t h_ca;
ib_api_status_t status;
- CL_ENTER( AL_DBG_CA, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CA);
if( AL_OBJ_INVALID_HANDLE( h_al, AL_OBJ_TYPE_H_AL ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_AL_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_AL_HANDLE\n") );
return IB_INVALID_AL_HANDLE;
}
if( !p_size )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -194,7 +202,7 @@
status = ib_query_ca( h_ca, p_ca_attr, p_size );
deref_al_obj( &h_ca->obj );
- CL_EXIT( AL_DBG_CA, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CA);
return status;
}
@@ -408,7 +416,7 @@
if( AL_OBJ_INVALID_HANDLE( h_al, AL_OBJ_TYPE_H_AL ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_AL_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_AL_HANDLE\n") );
return;
}
Index: core/al/al_av.c
===================================================================
--- core/al/al_av.c (revision 1349)
+++ core/al/al_av.c (working copy)
@@ -34,6 +34,14 @@
#include "al.h"
#include "al_av.h"
#include "al_debug.h"
+
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "al_av.tmh"
+#endif
+
#include "al_pd.h"
#include "al_res_mgr.h"
#include "al_verbs.h"
@@ -118,13 +126,13 @@
if( !p_av_attr || !ph_av )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
if( AL_OBJ_INVALID_HANDLE( h_pd, AL_OBJ_TYPE_H_PD ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PD_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PD_HANDLE\n") );
return IB_INVALID_PD_HANDLE;
}
@@ -161,18 +169,18 @@
ib_destroy_av(
IN const ib_av_handle_t
h_av )
{
- CL_ENTER( AL_DBG_AV, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_AV);
if( AL_OBJ_INVALID_HANDLE( h_av, AL_OBJ_TYPE_H_AV ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_AV_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_AV_HANDLE\n") );
return IB_INVALID_AV_HANDLE;
}
ref_al_obj( &h_av->obj );
h_av->obj.pfn_destroy( &h_av->obj, NULL );
- CL_EXIT( AL_DBG_AV, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_AV);
return IB_SUCCESS;
}
@@ -235,16 +243,16 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_AV, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_AV);
if( AL_OBJ_INVALID_HANDLE( h_av, AL_OBJ_TYPE_H_AV ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_AV_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_AV_HANDLE\n") );
return IB_INVALID_AV_HANDLE;
}
if( !p_av_attr || !ph_pd )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -257,7 +265,7 @@
h_av->av_attr = *p_av_attr;
}
- CL_EXIT( AL_DBG_AV, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_AV);
return status;
}
@@ -280,16 +288,16 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_AV, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_AV);
if( AL_OBJ_INVALID_HANDLE( h_av, AL_OBJ_TYPE_H_AV ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_AV_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_AV_HANDLE\n") );
return IB_INVALID_AV_HANDLE;
}
if( !p_av_mod )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -301,6 +309,6 @@
h_av->av_attr = *p_av_mod;
}
- CL_EXIT( AL_DBG_AV, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_AV);
return status;
}
Index: core/al/al_ca.c
===================================================================
--- core/al/al_ca.c (revision 1349)
+++ core/al/al_ca.c (working copy)
@@ -38,6 +38,14 @@
#include "al_ca.h"
#include "al_cq.h"
#include "al_debug.h"
+
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "al_ca.tmh"
+#endif
+
#include "al_mgr.h"
#include "al_mr.h"
#include "al_mw.h"
@@ -73,7 +81,7 @@
if( AL_OBJ_INVALID_HANDLE( h_al, AL_OBJ_TYPE_H_AL ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_AL_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_AL_HANDLE\n") );
return IB_INVALID_AL_HANDLE;
}
@@ -100,10 +108,10 @@
ib_api_status_t status;
al_obj_type_t obj_type = AL_OBJ_TYPE_H_CA;
- CL_ENTER( AL_DBG_CA, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CA);
if( !ph_ca )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -111,7 +119,7 @@
h_ca = (ib_ca_handle_t)cl_zalloc( sizeof( ib_ca_t ) );
if( !h_ca )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INSUFFICIENT_MEMORY\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -127,7 +135,7 @@
if( status != IB_SUCCESS )
{
__free_ca( &h_ca->obj );
- CL_EXIT( AL_DBG_CA, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CA);
return status;
}
@@ -144,7 +152,7 @@
if( !h_ca->obj.p_ci_ca )
{
h_ca->obj.pfn_destroy( &h_ca->obj, NULL );
- CL_EXIT( AL_DBG_CA, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CA);
return IB_INVALID_GUID;
}
@@ -157,7 +165,7 @@
if( status != IB_SUCCESS )
{
h_ca->obj.pfn_destroy( &h_ca->obj, NULL );
- CL_EXIT( AL_DBG_CA, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CA);
return status;
}
}
@@ -165,7 +173,7 @@
*ph_ca = h_ca;
- CL_EXIT( AL_DBG_CA, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CA);
return IB_SUCCESS;
}
@@ -178,18 +186,18 @@
IN const ib_ca_handle_t
h_ca,
IN const ib_pfn_destroy_cb_t
pfn_destroy_cb OPTIONAL )
{
- CL_ENTER( AL_DBG_CA, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CA);
if( AL_OBJ_INVALID_HANDLE( h_ca, AL_OBJ_TYPE_H_CA ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_CA_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_CA_HANDLE\n") );
return IB_INVALID_CA_HANDLE;
}
ref_al_obj( &h_ca->obj );
h_ca->obj.pfn_destroy( &h_ca->obj, pfn_destroy_cb );
- CL_EXIT( AL_DBG_CA, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CA);
return IB_SUCCESS;
}
@@ -255,22 +263,22 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_CA, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CA);
if( AL_OBJ_INVALID_HANDLE( h_ca, AL_OBJ_TYPE_H_CA ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_CA_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_CA_HANDLE\n") );
return IB_INVALID_CA_HANDLE;
}
if( !p_size )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
status = verbs_query_ca( h_ca, p_ca_attr, p_size );
- CL_EXIT( AL_DBG_CA, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CA);
return status;
}
@@ -285,22 +293,22 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_CA, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CA);
if( AL_OBJ_INVALID_HANDLE( h_ca, AL_OBJ_TYPE_H_CA ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_CA_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_CA_HANDLE\n") );
return IB_INVALID_CA_HANDLE;
}
if( !p_port_attr_mod )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
status = verbs_modify_ca(h_ca, port_num, ca_mod,
p_port_attr_mod);
- CL_EXIT( AL_DBG_CA, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CA);
return status;
}
@@ -318,11 +326,11 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_PD, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_PD);
if( AL_OBJ_INVALID_HANDLE( h_ca, AL_OBJ_TYPE_H_CA ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_CA_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_CA_HANDLE\n") );
return IB_INVALID_CA_HANDLE;
}
@@ -332,7 +340,7 @@
if( status == IB_SUCCESS )
deref_al_obj( &(*ph_pd)->obj );
- CL_EXIT( AL_DBG_PD, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_PD);
return status;
}
@@ -348,11 +356,11 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_CQ, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CQ);
if( AL_OBJ_INVALID_HANDLE( h_ca, AL_OBJ_TYPE_H_CA ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_CA_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_CA_HANDLE\n") );
return IB_INVALID_CA_HANDLE;
}
@@ -363,7 +371,7 @@
if( status == IB_SUCCESS )
deref_al_obj( &(*ph_cq)->obj );
- CL_EXIT( AL_DBG_CQ, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CQ);
return status;
}
Index: core/al/al_ci_ca_shared.c
===================================================================
--- core/al/al_ci_ca_shared.c (revision 1349)
+++ core/al/al_ci_ca_shared.c (working copy)
@@ -34,6 +34,14 @@
#include "al_common.h"
#include "al_cq.h"
#include "al_debug.h"
+
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "al_ci_ca_shared.tmh"
+#endif
+
#include "al_mgr.h"
#include "al_pnp.h"
#include "al_qp.h"
@@ -114,13 +122,13 @@
uint32_t attr_size;
uint8_t i;
- CL_ENTER( AL_DBG_CA, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CA);
/* Get the size of the CA attribute structure. */
status = ib_query_ca( p_ci_ca->h_ca, NULL, &attr_size );
if( status != IB_INSUFFICIENT_MEMORY )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("ib_query_ca failed with status %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -129,7 +137,7 @@
p_ca_attr = cl_malloc( attr_size );
if( !p_ca_attr )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("cl_malloc failed to allocate p_ca_attr!\n") );
return IB_INSUFFICIENT_RESOURCES;
}
@@ -140,7 +148,7 @@
{
cl_free( p_ca_attr );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("ib_query_ca failed with status %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -152,7 +160,7 @@
{
cl_free( p_ca_attr );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("cl_malloc failed to allocate port_array!\n")
);
return IB_INSUFFICIENT_RESOURCES;
}
@@ -177,7 +185,7 @@
cl_free( p_ca_attr );
- CL_EXIT( AL_DBG_CA, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CA);
return IB_SUCCESS;
}
@@ -191,7 +199,7 @@
cl_pool_item_t* p_item;
event_item_t* p_event_item;
- CL_ENTER( AL_DBG_CA, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CA);
CL_ASSERT( p_event_rec );
@@ -203,7 +211,7 @@
{
/* Ignore events if the object is being destroyed. */
cl_spinlock_release( &p_obj->lock );
- CL_EXIT( AL_DBG_CA, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CA);
return;
}
@@ -226,7 +234,7 @@
{
/* Could not get an item. This event will not be
reported. */
cl_spinlock_release( &p_obj->lock );
- CL_EXIT( AL_DBG_CA, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CA);
return;
}
@@ -244,7 +252,7 @@
p_event_item->async_item.pfn_callback = ci_ca_process_event_cb;
cl_async_proc_queue( gp_async_proc_mgr,
&p_event_item->async_item );
- CL_EXIT( AL_DBG_CA, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CA);
}
@@ -256,7 +264,7 @@
event_item_t* p_event_item;
al_obj_t* p_obj;
- CL_ENTER( AL_DBG_CA, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CA);
CL_ASSERT( p_async_item );
@@ -333,7 +341,7 @@
/* Dereference the object. */
deref_al_obj( p_obj );
- CL_EXIT( AL_DBG_CA, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CA);
}
@@ -441,11 +449,11 @@
uintn_t port_index, gid_index;
ib_port_attr_t *p_port_attr;
- CL_ENTER( AL_DBG_CA, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CA);
if( !p_ca_attr || !p_gid )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("No p_ca_attr or p_gid.\n") );
return NULL;
}
@@ -460,13 +468,13 @@
if( !cl_memcmp(
&p_port_attr->p_gid_table[gid_index],
p_gid, sizeof(ib_gid_t) ) )
{
- CL_EXIT( AL_DBG_CA, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CA);
return p_port_attr;
}
}
}
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("No match found.\n")
);
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR , ("No match
found.\n") );
return NULL;
}
@@ -503,7 +511,7 @@
uint32_t attr_size;
ib_api_status_t status;
- CL_ENTER( AL_DBG_CA, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CA);
/* Query to get the CA attributes size. */
attr_size = 0;
@@ -517,7 +525,7 @@
p_pnp_attr = (ib_ca_attr_t*)cl_zalloc( attr_size * 2 );
if( !p_pnp_attr )
{
- CL_TRACE_EXIT( AL_DBG_CA, g_al_dbg_lvl,
+ AL_PRINT_EXIT(TRACE_LEVEL_WARNING ,AL_DBG_CA ,
("Unable to allocate buffer for PnP
attributes\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -526,7 +534,7 @@
status = ib_query_ca( p_ci_ca->h_ca, p_pnp_attr, &attr_size );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_CA, g_al_dbg_lvl,
+ AL_PRINT_EXIT(TRACE_LEVEL_WARNING ,AL_DBG_CA ,
("Unable to query attributes\n") );
cl_free( p_pnp_attr );
return status;
@@ -544,7 +552,7 @@
p_ci_ca->p_user_attr = (ib_ca_attr_t*)(((uint8_t*)p_pnp_attr) +
attr_size);
ci_ca_unlock_attr( p_ci_ca );
- CL_EXIT( AL_DBG_CA, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CA);
return IB_SUCCESS;
}
Index: core/al/al_cm_qp.c
===================================================================
--- core/al/al_cm_qp.c (revision 1349)
+++ core/al/al_cm_qp.c (working copy)
@@ -40,6 +40,13 @@
#include "al_debug.h"
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "al_cm_qp.tmh"
+#endif
+
typedef struct _al_listen
{
al_obj_t obj;
@@ -101,7 +108,7 @@
( (h_qp->obj.state != CL_INITIALIZED) &&
(h_qp->obj.state != CL_DESTROYING) ) )
{
- AL_TRACE_EXIT( AL_DBG_CM,
("IB_INVALID_QP_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_QP_HANDLE\n") );
return;
}
@@ -112,7 +119,7 @@
status = h_qp->pfn_modify_qp( h_qp, &qp_mod, NULL );
if( status != IB_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("pfn_modify_qp to IB_QPS_ERROR returned
%s\n",
ib_get_err_str( status )) );
return;
@@ -415,7 +422,7 @@
__proc_dconn_timeout( h_qp );
break;
default:
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("Invalid CM send MAD attribute ID %d.\n",
p_mad->attr_id) );
break;
}
@@ -720,7 +727,7 @@
status = al_cep_get_rts_attr( p_cm->h_al, p_cm->cid, &qp_mod );
if( status != IB_SUCCESS )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("al_cep_get_rts_attr returned %s.\n",
ib_get_err_str(status)) );
goto done;
}
@@ -728,7 +735,7 @@
status = ib_modify_qp( p_cm->h_qp, &qp_mod );
if( status != IB_SUCCESS )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("ib_modify_qp for LAP returned %s.\n",
ib_get_err_str(status)) );
}
@@ -840,7 +847,7 @@
// break;
default:
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("Invalid CM recv MAD attribute ID %d.\n",
p_mad->attr_id) );
}
@@ -935,7 +942,7 @@
p_async_mad = (cep_async_mad_t*)cl_zalloc(
sizeof(cep_async_mad_t) );
if( !p_async_mad )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("failed to cl_zalloc cm_async_mad_t (%d
bytes)\n",
sizeof(cep_async_mad_t)) );
return;
@@ -980,7 +987,7 @@
status = ib_modify_qp( h_qp, &qp_mod );
if( status != IB_SUCCESS )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("ib_modify_qp to IB_QPS_RESET returned
%s\n",
ib_get_err_str(status) ) );
}
@@ -989,7 +996,7 @@
status = ib_modify_qp( h_qp, p_init );
if( status != IB_SUCCESS )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("ib_modify_qp returned %s.\n",
ib_get_err_str(status) ) );
return status;
}
@@ -1011,7 +1018,7 @@
((al_conn_qp_t*)p_cm_req->h_qp)->cid, p_cm_req, &qp_mod
);
if( status != IB_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("al_cep_pre_req returned %s.\n",
ib_get_err_str( status )) );
return status;
}
@@ -1026,7 +1033,7 @@
status = __cep_init_qp( p_cm_req->h_qp, &qp_mod );
if( status != IB_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("__cep_init_qp returned %s\n",
ib_get_err_str(status)) );
return status;
}
@@ -1071,7 +1078,7 @@
status = al_create_cep( h_al, __cm_handler, p_cm_req->h_qp, &cid
);
if( status != IB_SUCCESS )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("al_create_cep returned %s.\n", ib_get_err_str(
status )) );
goto done;
}
@@ -1088,7 +1095,7 @@
status = __cep_pre_req( p_cm_req );
if( status != IB_SUCCESS )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("__cep_pre_req returned %s.\n", ib_get_err_str(
status )) );
goto err;
}
@@ -1106,7 +1113,7 @@
//if( p_sync_event )
// cl_event_destroy( p_sync_event );
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("al_cep_send_req returned %s.\n",
ib_get_err_str(status)) );
err:
ref_al_obj( &p_qp->qp.obj );
@@ -1118,7 +1125,7 @@
/* wait on event if synchronous operation */
//if( p_sync_event )
//{
- // CL_TRACE( AL_DBG_CM, g_al_dbg_lvl,
+ // AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM ,
// ("event blocked on REQ...\n") );
// cl_event_wait_on( p_sync_event, EVENT_NO_TIMEOUT, FALSE
);
@@ -1141,7 +1148,7 @@
if( !p_cm_req )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("IB_INVALID_PARAMETER\n")
);
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -1149,7 +1156,7 @@
switch( p_cm_req->qp_type )
{
default:
- AL_TRACE_EXIT( AL_DBG_ERROR, ("Invalid qp_type.\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("Invalid
qp_type.\n") );
return IB_INVALID_SETTING;
case IB_QPT_RELIABLE_CONN:
@@ -1157,7 +1164,7 @@
if( AL_OBJ_INVALID_HANDLE( p_cm_req->h_qp,
AL_OBJ_TYPE_H_QP ) ||
(p_cm_req->h_qp->type != p_cm_req->qp_type) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
("IB_INVALID_QP_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_INVALID_QP_HANDLE\n") );
return IB_INVALID_QP_HANDLE;
}
@@ -1167,7 +1174,7 @@
case IB_QPT_UNRELIABLE_DGRM:
if( AL_OBJ_INVALID_HANDLE( p_cm_req->h_al,
AL_OBJ_TYPE_H_AL ) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
("IB_INVALID_AL_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_INVALID_AL_HANDLE\n") );
return IB_INVALID_AL_HANDLE;
}
status = IB_UNSUPPORTED;
@@ -1202,7 +1209,7 @@
status = al_cep_get_rtr_attr( h_cm.h_al, h_cm.cid, &qp_mod );
if( status != IB_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("al_cep_get_rtr_attr returned %s\n",
ib_get_err_str( status )) );
return status;
}
@@ -1228,7 +1235,7 @@
status = ib_modify_qp( h_qp, &qp_mod );
if( status != IB_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("ib_modify_qp to RTR returned %s.\n",
ib_get_err_str(status) ) );
return status;
}
@@ -1237,7 +1244,7 @@
status = al_cep_get_rts_attr( h_cm.h_al, h_cm.cid, &qp_mod );
if( status != IB_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("al_cep_get_rts_attr returned %s\n",
ib_get_err_str( status )) );
return status;
}
@@ -1245,7 +1252,7 @@
status = ib_modify_qp( h_qp, &qp_mod );
if( status != IB_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("ib_modify_qp to RTS returned %s.\n",
ib_get_err_str(status) ) );
return status;
}
@@ -1270,7 +1277,7 @@
status = __cep_init_qp( p_cm_rep->h_qp, p_qp_mod );
if( status != IB_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("cm_init_qp returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -1282,7 +1289,7 @@
(ib_recv_wr_t**
__ptr64)p_cm_rep->pp_recv_failure );
if( status != IB_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("ib_post_recv returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -1293,7 +1300,7 @@
p_cm_rep->access_ctrl, p_cm_rep->sq_depth,
p_cm_rep->rq_depth );
if( status != IB_SUCCESS )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("__cep_rts_qp returned %s.\n",
ib_get_err_str(status)) );
}
@@ -1320,7 +1327,7 @@
if( cid != AL_INVALID_CID )
{
/* We don't destroy the CEP to allow the user to retry
accepting. */
- AL_TRACE_EXIT( AL_DBG_ERROR, ("QP already connected.\n")
);
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("QP
already connected.\n") );
return IB_INVALID_QP_HANDLE;
}
@@ -1335,7 +1342,7 @@
h_cm.h_al, h_cm.cid, p_cm_rep->h_qp, p_cm_rep, &qp_mod
);
if( status != IB_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("al_cep_pre_rep returned %s.\n",
ib_get_err_str( status )) );
goto err;
}
@@ -1347,7 +1354,7 @@
status = __cep_pre_rep( h_cm, &qp_mod, p_cm_rep );
if( status != IB_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("__cep_pre_req returned %s\n",
ib_get_err_str(status)) );
goto err;
}
@@ -1355,7 +1362,7 @@
status = al_cep_send_rep( h_cm.h_al, h_cm.cid );
if( status != IB_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("al_cep_send_rep returned %s\n",
ib_get_err_str(status)) );
err:
cl_atomic_xchg(
@@ -1393,7 +1400,7 @@
if( !p_cm_rep )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("IB_INVALID_PARAMETER\n")
);
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -1402,7 +1409,7 @@
switch( p_cm_rep->qp_type )
{
default:
- AL_TRACE( AL_DBG_ERROR, ("Invalid qp_type.\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("Invalid
qp_type.\n") );
status = IB_INVALID_SETTING;
break;
@@ -1411,12 +1418,12 @@
if( AL_OBJ_INVALID_HANDLE( p_cm_rep->h_qp,
AL_OBJ_TYPE_H_QP ) ||
(p_cm_rep->h_qp->type != p_cm_rep->qp_type) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
("IB_INVALID_QP_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_INVALID_QP_HANDLE\n") );
status = IB_INVALID_QP_HANDLE;
}
else if( p_cm_rep->h_qp->obj.h_al != h_cm_req.h_al )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
("IB_INVALID_QP_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_INVALID_QP_HANDLE\n") );
status = IB_INVALID_QP_HANDLE;
}
break;
@@ -1426,7 +1433,7 @@
(AL_OBJ_INVALID_HANDLE( p_cm_rep->h_qp,
AL_OBJ_TYPE_H_QP ) ||
(p_cm_rep->h_qp->type != p_cm_rep->qp_type) ) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
("IB_INVALID_QP_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_INVALID_QP_HANDLE\n") );
status = IB_INVALID_QP_HANDLE;
}
break;
@@ -1464,7 +1471,7 @@
if( !p_cm_rtu )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("IB_INVALID_PARAMETER\n")
);
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -1474,7 +1481,7 @@
// */
//if( p_conn->p_sync_event )
//{
- // CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ // AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
// ("Connection in invalid state. Sync call in
progress.\n" ) );
// cm_res_release( p_conn );
@@ -1489,7 +1496,7 @@
p_cm_rtu->access_ctrl, p_cm_rtu->sq_depth,
p_cm_rtu->rq_depth );
if( status != IB_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("__cep_rts_qp returned %s.\n", ib_get_err_str(
status )) );
goto err;
}
@@ -1520,7 +1527,7 @@
}
}
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("al_cep_rtu returned %s.\n", ib_get_err_str(
status )) );
return status;
}
@@ -1541,14 +1548,14 @@
if( !p_cm_mra )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("IB_INVALID_PARAMETER\n")
);
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
status = al_cep_mra( h_cm.h_al, h_cm.cid, p_cm_mra );
if( status != IB_SUCCESS )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("al_cep_mra returned %s\n", ib_get_err_str(
status )) );
}
@@ -1569,7 +1576,7 @@
if( !p_cm_rej )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("IB_INVALID_PARAMETER\n")
);
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -1607,7 +1614,7 @@
if( !p_cm_dreq )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("IB_INVALID_PARAMETER\n")
);
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -1615,7 +1622,7 @@
switch( p_cm_dreq->qp_type )
{
default:
- AL_TRACE_EXIT( AL_DBG_ERROR, ("Invalid qp_type.\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("Invalid
qp_type.\n") );
return IB_INVALID_SETTING;
case IB_QPT_RELIABLE_CONN:
@@ -1623,7 +1630,7 @@
if( AL_OBJ_INVALID_HANDLE( p_cm_dreq->h_qp,
AL_OBJ_TYPE_H_QP ) ||
(p_cm_dreq->h_qp->type != p_cm_dreq->qp_type) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
("IB_INVALID_QP_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_INVALID_QP_HANDLE\n") );
return IB_INVALID_QP_HANDLE;
}
break;
@@ -1688,7 +1695,7 @@
if( !p_cm_drep )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("IB_INVALID_PARAMETER\n")
);
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -1741,7 +1748,7 @@
if( !p_cm_lap )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("IB_INVALID_PARAMETER\n")
);
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -1749,7 +1756,7 @@
switch( p_cm_lap->qp_type )
{
default:
- AL_TRACE_EXIT( AL_DBG_ERROR, ("Invalid qp_type.\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("Invalid
qp_type.\n") );
return IB_INVALID_SETTING;
case IB_QPT_RELIABLE_CONN:
@@ -1757,7 +1764,7 @@
if( AL_OBJ_INVALID_HANDLE( p_cm_lap->h_qp,
AL_OBJ_TYPE_H_QP ) ||
(p_cm_lap->h_qp->type != p_cm_lap->qp_type) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
("IB_INVALID_QP_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_INVALID_QP_HANDLE\n") );
return IB_INVALID_QP_HANDLE;
}
break;
@@ -1767,7 +1774,7 @@
((al_conn_qp_t*)p_cm_lap->h_qp)->cid, p_cm_lap );
if( status != IB_SUCCESS )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("al_cep_lap returned %s.\n", ib_get_err_str(
status )) );
}
@@ -1788,7 +1795,7 @@
if( !p_cm_apr )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("IB_INVALID_PARAMETER\n")
);
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -1796,7 +1803,7 @@
switch( p_cm_apr->qp_type )
{
default:
- AL_TRACE_EXIT( AL_DBG_ERROR, ("Invalid qp_type.\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("Invalid
qp_type.\n") );
return IB_INVALID_SETTING;
case IB_QPT_RELIABLE_CONN:
@@ -1804,7 +1811,7 @@
if( AL_OBJ_INVALID_HANDLE( p_cm_apr->h_qp,
AL_OBJ_TYPE_H_QP ) ||
(p_cm_apr->h_qp->type != p_cm_apr->qp_type) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
("IB_INVALID_QP_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_INVALID_QP_HANDLE\n") );
return IB_INVALID_QP_HANDLE;
}
break;
@@ -1813,7 +1820,7 @@
status = al_cep_pre_apr( h_cm_lap.h_al, h_cm_lap.cid, p_cm_apr,
&qp_mod );
if( status != IB_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("al_cep_pre_apr returned %s.\n",
ib_get_err_str( status )) );
return status;
}
@@ -1822,7 +1829,7 @@
status = ib_modify_qp( h_cm_lap.h_qp, &qp_mod );
if( status != IB_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("ib_modify_qp for LAP returned %s.\n",
ib_get_err_str( status )) );
return status;
@@ -1847,7 +1854,7 @@
if( AL_OBJ_INVALID_HANDLE( h_qp, AL_OBJ_TYPE_H_QP ) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("IB_INVALID_QP_HANDLE\n")
);
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_INVALID_QP_HANDLE\n") );
return IB_INVALID_QP_HANDLE;
}
@@ -1879,7 +1886,7 @@
p_obj->h_al, p_listen->cid, deref_al_obj );
if( status != IB_SUCCESS )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("al_destroy_cep returned %s.\n",
ib_get_err_str( status )) );
deref_al_obj( p_obj );
}
@@ -1941,7 +1948,7 @@
if( status != IB_SUCCESS )
{
p_listen->obj.pfn_destroy( &p_listen->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("attach_al_obj returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -1951,7 +1958,7 @@
if( status != IB_SUCCESS )
{
p_listen->obj.pfn_destroy( &p_listen->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("al_create_cep returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -1969,7 +1976,7 @@
if( status != IB_SUCCESS )
{
p_listen->obj.pfn_destroy( &p_listen->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("al_cep_listen returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -1998,19 +2005,19 @@
if( AL_OBJ_INVALID_HANDLE( h_al, AL_OBJ_TYPE_H_AL ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_AL_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_AL_HANDLE\n") );
return IB_INVALID_AL_HANDLE;
}
if( !p_cm_listen || !pfn_listen_err_cb || !ph_cm_listen )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
status = __cep_listen(h_al, p_cm_listen, pfn_listen_err_cb,
listen_context,
ph_cm_listen );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return status;
}
@@ -2024,7 +2031,7 @@
if( AL_OBJ_INVALID_HANDLE( h_cm_listen, AL_OBJ_TYPE_H_LISTEN ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_HANDLE\n") );
return IB_INVALID_HANDLE;
}
Index: core/al/al_cm_shared.c
===================================================================
--- core/al/al_cm_shared.c (revision 1349)
+++ core/al/al_cm_shared.c (working copy)
@@ -44,7 +44,7 @@
ib_qp_mod_t qp_mod;
ib_api_status_t status;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
cl_memclr( &qp_mod, sizeof(ib_qp_mod_t) );
qp_mod.req_state = IB_QPS_RESET;
@@ -52,12 +52,12 @@
status = ib_modify_qp( h_qp, &qp_mod );
if( status != IB_SUCCESS )
{
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("ib_modify_qp to IB_QPS_RESET returned %s\n",
ib_get_err_str(status) ) );
}
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return status;
}
@@ -74,7 +74,7 @@
ib_qp_mod_t qp_mod;
ib_api_status_t status;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
cl_memclr( &qp_mod, sizeof(ib_qp_mod_t) );
qp_mod.req_state = IB_QPS_INIT;
@@ -86,7 +86,7 @@
if( !p_port_attr )
{
ci_ca_unlock_attr( h_qp->obj.p_ci_ca );
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl, ("invalid p_gid\n"
) );
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR , ("invalid
p_gid\n" ) );
return IB_INVALID_GID;
}
@@ -96,19 +96,19 @@
if( qp_mod.state.init.pkey_index == BAD_PKEY_INDEX )
{
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl, ("invalid PKEY\n"
) );
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR , ("invalid
PKEY\n" ) );
return IB_INVALID_PKEY;
}
status = ib_modify_qp( h_qp, &qp_mod );
if( status != IB_SUCCESS )
{
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("ib_modify_qp to IB_QPS_INIT returned %s\n",
ib_get_err_str(status) ) );
}
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return status;
}
@@ -139,7 +139,7 @@
status = __reset_qp( h_qp );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("__reset_qp returned %s\n",
ib_get_err_str(status) ) );
return status;
}
@@ -148,7 +148,7 @@
status = __init_qp( h_qp, p_gid, pkey, access_ctrl );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("__init_qp returned %s.\n",
ib_get_err_str(status) ) );
return status;
}
@@ -167,13 +167,13 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Set the QP to RTR. */
status = ib_modify_qp( h_qp, p_qp_mod_rtr );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("ib_modify_qp to RTR returned %s.\n",
ib_get_err_str(status) ) );
return status;
}
@@ -182,12 +182,12 @@
status = ib_modify_qp( h_qp, p_qp_mod_rts );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("ib_modify_qp to RTS returned %s.\n",
ib_get_err_str(status) ) );
return status;
}
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_SUCCESS;
}
@@ -208,14 +208,14 @@
ib_qp_mod_t qp_mod;
ib_api_status_t status;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Special checks on the QP state for error handling - see
above. */
if( !h_qp || !AL_OBJ_IS_TYPE( h_qp, AL_OBJ_TYPE_H_QP ) ||
( (h_qp->obj.state != CL_INITIALIZED) &&
(h_qp->obj.state != CL_DESTROYING) ) )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
("IB_INVALID_QP_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("IB_INVALID_QP_HANDLE\n") );
return IB_INVALID_QP_HANDLE;
}
@@ -232,7 +232,7 @@
status = h_qp->pfn_modify_qp( h_qp, &qp_mod, NULL );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("pfn_modify_qp to IB_QPS_ERROR returned
%s\n",
ib_get_err_str(status) ) );
return status;
@@ -246,7 +246,7 @@
UNUSED_PARAM( timewait );
#endif /* CL_KERNEL */
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_SUCCESS;
}
@@ -265,7 +265,7 @@
IN OUT ib_qp_mod_t * const
p_qp_mod_rtr,
IN OUT ib_qp_mod_t * const
p_qp_mod_rts )
{
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Update the QP RTR transition information. */
p_qp_mod_rtr->state.rtr.rq_psn = p_cm_rep->h_qp->num;
@@ -328,7 +328,7 @@
cm_local_ack_timeout( ib_path_rec_pkt_life( p_path_rec
),
p_cm_rep->target_ack_delay );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -342,7 +342,7 @@
IN const ib_cm_rtu_t * const
p_cm_rtu,
IN OUT ib_qp_mod_t * const
p_qp_mod_rtr )
{
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Update the QP RTR transition information. */
if( p_cm_rtu->access_ctrl )
@@ -363,7 +363,7 @@
p_qp_mod_rtr->state.rtr.rq_depth = p_cm_rtu->rq_depth;
}
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
Index: core/al/al_common.c
===================================================================
--- core/al/al_common.c (revision 1349)
+++ core/al/al_common.c (working copy)
@@ -34,6 +34,14 @@
#include "al_ci_ca.h"
#include "al_common.h"
#include "al_debug.h"
+
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "al_common.tmh"
+#endif
+
#include "al_mgr.h"
#include <complib/cl_math.h>
#include "ib_common.h"
@@ -68,7 +76,7 @@
IN const ib_pfn_destroy_cb_t
pfn_destroy_cb );
-#if defined( _DEBUG_ )
+
const char* ib_obj_type_str[] =
{
"AL_OBJ_TYPE_UNKNOWN",
@@ -112,7 +120,6 @@
"AL_OBJ_TYPE_H_PNP_EVENT",
"AL_OBJ_TYPE_H_SA_REG"
};
-#endif
/*
@@ -164,10 +171,10 @@
{
cl_status_t cl_status;
- CL_ENTER( AL_DBG_AL_OBJ, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_AL_OBJ);
CL_ASSERT( p_obj && pfn_free );
CL_ASSERT( p_obj->state == CL_UNINITIALIZED );
- CL_TRACE( AL_DBG_AL_OBJ, g_al_dbg_lvl, ("%p\n", p_obj ) );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_AL_OBJ , ("%p\n", p_obj
) );
/* Initialize the object. */
p_obj->async_item.pfn_callback = async_destroy_cb;
@@ -208,7 +215,7 @@
*/
ref_al_obj( p_obj );
- CL_EXIT( AL_DBG_AL_OBJ, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_AL_OBJ);
return IB_SUCCESS;
}
@@ -264,7 +271,7 @@
CL_ASSERT( p_child_obj->state == CL_INITIALIZED );
- AL_TRACE( AL_DBG_AL_OBJ,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_AL_OBJ ,
("%p(%s) to %p(%s)\n",
p_child_obj, ib_get_obj_type( p_child_obj ),
p_parent_obj, ib_get_obj_type( p_parent_obj ) ) );
@@ -323,7 +330,7 @@
{
al_obj_t *p_parent_obj;
- CL_ENTER( AL_DBG_AL_OBJ, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_AL_OBJ);
p_parent_obj = p_obj->p_parent_obj;
CL_ASSERT( p_obj );
@@ -333,7 +340,7 @@
CL_ASSERT( p_parent_obj->state == CL_INITIALIZED ||
p_parent_obj->state == CL_DESTROYING );
- CL_TRACE( AL_DBG_AL_OBJ, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_AL_OBJ ,
("%p(%s) from %p(%s)\n",
p_obj, ib_get_obj_type( p_obj ),
p_parent_obj, ib_get_obj_type( p_parent_obj ) ) );
@@ -343,7 +350,7 @@
cl_qlist_remove_item( &p_parent_obj->obj_list,
(cl_list_item_t*)&p_obj->pool_item );
cl_spinlock_release( &p_parent_obj->lock );
- CL_EXIT( AL_DBG_AL_OBJ, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_AL_OBJ);
}
@@ -358,13 +365,13 @@
{
uint32_t ref_cnt;
- CL_ENTER( AL_DBG_AL_OBJ, g_al_dbg_lvl );
- CL_TRACE( AL_DBG_AL_OBJ, g_al_dbg_lvl,
+ AL_ENTER(AL_DBG_AL_OBJ);
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_AL_OBJ ,
("%p(%s)\n", p_obj, ib_get_obj_type( p_obj ) ) );
ref_cnt = cl_atomic_inc( &p_obj->ref_cnt );
CL_ASSERT( ref_cnt != 1 || p_obj->type == AL_OBJ_TYPE_H_CQ );
- CL_EXIT( AL_DBG_AL_OBJ, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_AL_OBJ);
return ref_cnt;
}
@@ -380,14 +387,14 @@
{
int32_t ref_cnt;
- CL_ENTER( AL_DBG_AL_OBJ, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_AL_OBJ);
CL_ASSERT( p_obj );
CL_ASSERT( p_obj->state == CL_INITIALIZED ||
p_obj->state == CL_DESTROYING );
CL_ASSERT( p_obj->ref_cnt );
- CL_TRACE( AL_DBG_AL_OBJ, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_AL_OBJ ,
("%p(%s)\n", p_obj, ib_get_obj_type( p_obj ) ) );
ref_cnt = cl_atomic_dec( &p_obj->ref_cnt );
@@ -412,7 +419,7 @@
}
}
- CL_EXIT( AL_DBG_AL_OBJ, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_AL_OBJ);
return ref_cnt;
}
@@ -425,7 +432,7 @@
destroy_al_obj(
IN al_obj_t * const
p_obj )
{
- CL_ENTER( AL_DBG_AL_OBJ, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_AL_OBJ);
CL_ASSERT( p_obj );
CL_ASSERT( p_obj->state == CL_DESTROYING ||
@@ -445,7 +452,7 @@
cl_spinlock_destroy( &p_obj->lock );
p_obj->state = CL_DESTROYED;
- CL_EXIT( AL_DBG_AL_OBJ, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_AL_OBJ);
}
@@ -455,14 +462,14 @@
IN struct _al_obj
*p_obj,
IN const ib_pfn_destroy_cb_t
pfn_destroy_cb )
{
- CL_ENTER( AL_DBG_AL_OBJ, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_AL_OBJ);
if( pfn_destroy_cb == ib_sync_destroy )
sync_destroy_obj( p_obj, pfn_destroy_cb );
else if( destroy_obj( p_obj, pfn_destroy_cb ) )
deref_al_obj( p_obj ); /* Only destroy the object once.
*/
- CL_EXIT( AL_DBG_AL_OBJ, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_AL_OBJ);
}
@@ -474,7 +481,7 @@
{
cl_status_t cl_status;
- CL_ENTER( AL_DBG_AL_OBJ, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_AL_OBJ);
if( !destroy_obj( p_obj, pfn_destroy_cb ) )
{
@@ -503,7 +510,7 @@
if( cl_status != CL_SUCCESS )
{
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("Error waiting for references to be
released - delaying.\n") );
print_al_obj( p_obj );
/*
@@ -526,7 +533,7 @@
CL_ASSERT( cl_status == CL_SUCCESS );
if( cl_status != CL_SUCCESS )
{
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("Forcing object destruction.\n") );
print_al_obj( p_obj );
//print_tail_al_objs();
@@ -536,7 +543,7 @@
}
async_destroy_cb( &p_obj->async_item );
- CL_EXIT( AL_DBG_AL_OBJ, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_AL_OBJ);
}
@@ -549,13 +556,13 @@
cl_list_item_t *p_list_item;
al_obj_t *p_child_obj;
- CL_ENTER( AL_DBG_AL_OBJ, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_AL_OBJ);
CL_ASSERT( p_obj );
CL_ASSERT( p_obj->state == CL_INITIALIZED ||
p_obj->state == CL_DESTROYING );
- CL_TRACE( AL_DBG_AL_OBJ, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_AL_OBJ ,
("%p(%s)\n", p_obj, ib_get_obj_type( p_obj ) ) );
/*
@@ -591,13 +598,13 @@
detach_al_obj( p_obj );
/* Destroy all child resources. No need to lock during
destruction. */
- CL_TRACE( AL_DBG_AL_OBJ, g_al_dbg_lvl, ("destroying children\n")
);
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_AL_OBJ , ("destroying
children\n") );
p_list_item = cl_qlist_tail( &p_obj->obj_list );
while( p_list_item != cl_qlist_end( &p_obj->obj_list ) )
{
p_child_obj = PARENT_STRUCT( p_list_item, al_obj_t,
pool_item );
CL_ASSERT( p_child_obj->pfn_destroy );
- CL_TRACE( AL_DBG_AL_OBJ, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_AL_OBJ ,
("bye bye: %p(%s)\n", p_child_obj,
ib_get_obj_type( p_child_obj ) ) );
ref_al_obj( p_child_obj );
@@ -617,7 +624,7 @@
}
p_obj->user_destroy_cb = pfn_destroy_cb;
- CL_EXIT( AL_DBG_AL_OBJ, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_AL_OBJ);
return TRUE;
}
@@ -630,7 +637,7 @@
al_obj_t *p_obj;
al_obj_t *p_parent_obj = NULL;
- CL_ENTER( AL_DBG_AL_OBJ, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_AL_OBJ);
CL_ASSERT( p_item );
p_obj = PARENT_STRUCT( p_item, al_obj_t, async_item );
@@ -638,13 +645,13 @@
CL_ASSERT( p_obj->state == CL_DESTROYING );
CL_ASSERT( !p_obj->ref_cnt );
- CL_TRACE( AL_DBG_AL_OBJ, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_AL_OBJ ,
("%p\n", p_obj ) );
/* Cleanup any hardware related resources. */
if( p_obj->pfn_cleanup )
{
- CL_TRACE( AL_DBG_AL_OBJ, g_al_dbg_lvl, ("cleaning up\n"
) );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_AL_OBJ ,
("cleaning up\n" ) );
p_obj->pfn_cleanup( p_obj );
}
@@ -658,16 +665,16 @@
/* Notify the user that we're done. */
if( p_obj->user_destroy_cb )
{
- CL_TRACE( AL_DBG_AL_OBJ, g_al_dbg_lvl, ("notifying
user\n" ) );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_AL_OBJ ,
("notifying user\n" ) );
p_obj->user_destroy_cb( (void*)p_obj->context );
}
/* Free the resources associated with the object. */
- CL_TRACE( AL_DBG_AL_OBJ, g_al_dbg_lvl, ("freeing object\n" ) );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_AL_OBJ , ("freeing
object\n" ) );
p_obj->pfn_free( p_obj );
/* Dereference the parent after freeing the child. */
if( p_parent_obj )
deref_al_obj( p_parent_obj );
- CL_EXIT( AL_DBG_AL_OBJ, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_AL_OBJ);
}
Index: core/al/al_common.h
===================================================================
--- core/al/al_common.h (revision 1349)
+++ core/al/al_common.h (working copy)
@@ -315,7 +315,7 @@
-#if defined( _DEBUG_ )
+
extern const char* ib_obj_type_str[];
static inline const char*
@@ -327,8 +327,8 @@
return( ib_obj_type_str[ AL_BASE_TYPE( p_obj->type ) ] );
}
-#endif
+
#endif /* __AL_COMMON_H__ */
Index: core/al/al_cq.c
===================================================================
--- core/al/al_cq.c (revision 1349)
+++ core/al/al_cq.c (working copy)
@@ -32,6 +32,14 @@
#include "al_cq.h"
#include "al_debug.h"
+
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "al_cq.tmh"
+#endif
+
#include "al_ca.h"
#include "al_pd.h"
#include "al_qp.h"
@@ -73,13 +81,13 @@
if( !p_cq_create || !ph_cq )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
if( (p_cq_create->pfn_comp_cb && p_cq_create->h_wait_obj) ||
(!p_cq_create->pfn_comp_cb && !p_cq_create->h_wait_obj)
)
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_SETTING\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_SETTING\n") );
return IB_INVALID_SETTING;
}
@@ -153,18 +161,18 @@
IN const ib_cq_handle_t
h_cq,
IN const ib_pfn_destroy_cb_t
pfn_destroy_cb OPTIONAL )
{
- CL_ENTER( AL_DBG_CQ, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CQ);
if( AL_OBJ_INVALID_HANDLE( h_cq, AL_OBJ_TYPE_H_CQ ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_CQ_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_CQ_HANDLE\n") );
return IB_INVALID_CQ_HANDLE;
}
ref_al_obj( &h_cq->obj );
h_cq->obj.pfn_destroy( &h_cq->obj, pfn_destroy_cb );
- CL_EXIT( AL_DBG_CQ, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CQ);
return IB_SUCCESS;
}
@@ -287,22 +295,22 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_CQ, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CQ);
if( AL_OBJ_INVALID_HANDLE( h_cq, AL_OBJ_TYPE_H_CQ ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_CQ_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_CQ_HANDLE\n") );
return IB_INVALID_CQ_HANDLE;
}
if( !p_size )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
status = verbs_modify_cq( h_cq, p_size );
- CL_EXIT( AL_DBG_CQ, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CQ);
return status;
}
@@ -326,22 +334,22 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_CQ, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CQ);
if( AL_OBJ_INVALID_HANDLE( h_cq, AL_OBJ_TYPE_H_CQ ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_CQ_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_CQ_HANDLE\n") );
return IB_INVALID_CQ_HANDLE;
}
if( !p_size )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
status = verbs_query_cq( h_cq, p_size );
- CL_EXIT( AL_DBG_CQ, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CQ);
return status;
}
@@ -354,22 +362,22 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_CQ, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CQ);
if( AL_OBJ_INVALID_HANDLE( h_cq, AL_OBJ_TYPE_H_CQ ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_CQ_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_CQ_HANDLE\n") );
return IB_INVALID_CQ_HANDLE;
}
if( !p_n_cqes )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
status = verbs_peek_cq( h_cq, p_n_cqes );
- CL_EXIT( AL_DBG_CQ, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CQ);
return status;
}
@@ -386,16 +394,16 @@
PERF_DECLARE( VerbsPollCq );
cl_perf_start( IbPollCq );
- CL_ENTER( AL_DBG_CQ, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CQ);
if( AL_OBJ_INVALID_HANDLE( h_cq, AL_OBJ_TYPE_H_CQ ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_CQ_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_CQ_HANDLE\n") );
return IB_INVALID_CQ_HANDLE;
}
if( !pp_free_wclist || !pp_done_wclist )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -403,7 +411,7 @@
status = verbs_poll_cq( h_cq, pp_free_wclist, pp_done_wclist );
cl_perf_stop( &g_perf, VerbsPollCq );
- CL_EXIT( AL_DBG_CQ, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CQ);
cl_perf_stop( &g_perf, IbPollCq );
return status;
}
@@ -417,17 +425,17 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_CQ, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CQ);
if( AL_OBJ_INVALID_HANDLE( h_cq, AL_OBJ_TYPE_H_CQ ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_CQ_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_CQ_HANDLE\n") );
return IB_INVALID_CQ_HANDLE;
}
status = verbs_rearm_cq( h_cq, solicited );
- CL_EXIT( AL_DBG_CQ, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CQ);
return status;
}
@@ -440,22 +448,22 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_CQ, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CQ);
if( AL_OBJ_INVALID_HANDLE( h_cq, AL_OBJ_TYPE_H_CQ ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_CQ_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_CQ_HANDLE\n") );
return IB_INVALID_CQ_HANDLE;
}
if( !n_cqes )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
status = verbs_rearm_n_cq( h_cq, n_cqes );
- CL_EXIT( AL_DBG_CQ, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CQ);
return status;
}
Index: core/al/al_debug.h
===================================================================
--- core/al/al_debug.h (revision 1349)
+++ core/al/al_debug.h (working copy)
@@ -34,19 +34,118 @@
#define __AL_DEBUG_H__
#ifndef __MODULE__
-#define __MODULE__ "al"
+#define __MODULE__ "[AL]"
#endif
#include <complib/cl_debug.h>
#include <complib/cl_perf.h>
+extern uint32_t g_al_dbg_level;
+extern uint32_t g_al_dbg_flags;
+#if defined(EVENT_TRACING)
+//
+// Software Tracing Definitions
+//
+
+#ifndef CL_KERNEL
+
+#define WPP_CONTROL_GUIDS \
+
WPP_DEFINE_CONTROL_GUID(ALCtlGuid1,(B199CE55,F8BF,4147,B119,DACD1E5987A6
), \
+ WPP_DEFINE_BIT( AL_DBG_ERROR) \
+ WPP_DEFINE_BIT( AL_DBG_AL_OBJ) \
+ WPP_DEFINE_BIT( AL_DBG_HDL) \
+ WPP_DEFINE_BIT( AL_DBG_SMI) \
+ WPP_DEFINE_BIT( AL_DBG_SMI_CB) \
+ WPP_DEFINE_BIT( AL_DBG_MAD_POOL) \
+ WPP_DEFINE_BIT( AL_DBG_MAD_SVC) \
+ WPP_DEFINE_BIT( AL_DBG_PNP) \
+ WPP_DEFINE_BIT( AL_DBG_CM) \
+ WPP_DEFINE_BIT( AL_DBG_CA) \
+ WPP_DEFINE_BIT( AL_DBG_MR) \
+ WPP_DEFINE_BIT( AL_DBG_MGR)\
+ WPP_DEFINE_BIT( AL_DBG_DEV)\
+ WPP_DEFINE_BIT( AL_DBG_MCAST)\
+ WPP_DEFINE_BIT( AL_DBG_PD)\
+ WPP_DEFINE_BIT( AL_DBG_AV)\
+ WPP_DEFINE_BIT( AL_DBG_CQ)\
+ WPP_DEFINE_BIT( AL_DBG_QP)\
+ WPP_DEFINE_BIT( AL_DBG_MW)\
+ WPP_DEFINE_BIT( AL_DBG_PROXY_CB)\
+ WPP_DEFINE_BIT( AL_DBG_UAL)\
+ WPP_DEFINE_BIT( AL_DBG_QUERY)\
+ WPP_DEFINE_BIT( AL_DBG_SA_REQ)\
+ WPP_DEFINE_BIT( AL_DBG_IOC)\
+ WPP_DEFINE_BIT( AL_DBG_SUB)\
+ WPP_DEFINE_BIT( AL_DBG_MAD))
+
+#else
+
+#define WPP_CONTROL_GUIDS \
+
WPP_DEFINE_CONTROL_GUID(ALCtlGuid2,(99DC84E3,B106,431e,88A6,4DD20C9BBDE3
), \
+ WPP_DEFINE_BIT( AL_DBG_ERROR) \
+ WPP_DEFINE_BIT( AL_DBG_AL_OBJ) \
+ WPP_DEFINE_BIT( AL_DBG_HDL) \
+ WPP_DEFINE_BIT( AL_DBG_SMI) \
+ WPP_DEFINE_BIT( AL_DBG_SMI_CB) \
+ WPP_DEFINE_BIT( AL_DBG_MAD_POOL) \
+ WPP_DEFINE_BIT( AL_DBG_MAD_SVC) \
+ WPP_DEFINE_BIT( AL_DBG_PNP) \
+ WPP_DEFINE_BIT( AL_DBG_CM) \
+ WPP_DEFINE_BIT( AL_DBG_CA) \
+ WPP_DEFINE_BIT( AL_DBG_MR) \
+ WPP_DEFINE_BIT( AL_DBG_MGR)\
+ WPP_DEFINE_BIT( AL_DBG_DEV)\
+ WPP_DEFINE_BIT( AL_DBG_MCAST)\
+ WPP_DEFINE_BIT( AL_DBG_PD)\
+ WPP_DEFINE_BIT( AL_DBG_AV)\
+ WPP_DEFINE_BIT( AL_DBG_CQ)\
+ WPP_DEFINE_BIT( AL_DBG_QP)\
+ WPP_DEFINE_BIT( AL_DBG_MW)\
+ WPP_DEFINE_BIT( AL_DBG_PROXY_CB)\
+ WPP_DEFINE_BIT( AL_DBG_UAL)\
+ WPP_DEFINE_BIT( AL_DBG_QUERY)\
+ WPP_DEFINE_BIT( AL_DBG_SA_REQ)\
+ WPP_DEFINE_BIT( AL_DBG_IOC)\
+ WPP_DEFINE_BIT( AL_DBG_SUB)\
+ WPP_DEFINE_BIT( AL_DBG_MAD))
+
+#endif
+
+
+#define WPP_LEVEL_FLAGS_ENABLED(lvl, flags) (WPP_LEVEL_ENABLED(flags)
&& WPP_CONTROL(WPP_BIT_ ## flags).Level >= lvl)
+#define WPP_LEVEL_FLAGS_LOGGER(lvl,flags) WPP_LEVEL_LOGGER(flags)
+#define WPP_FLAG_ENABLED(flags)(WPP_LEVEL_ENABLED(flags) &&
WPP_CONTROL(WPP_BIT_ ## flags).Level >= TRACE_LEVEL_VERBOSE)
+#define WPP_FLAG_LOGGER(flags) WPP_LEVEL_LOGGER(flags)
+
+
+// begin_wpp config
+// AL_ENTER(FLAG);
+// AL_EXIT(FLAG);
+// USEPREFIX(AL_PRINT, "%!STDPREFIX! %!FUNC!() :");
+// USESUFFIX(AL_ENTER, " %!FUNC!():[");
+// USESUFFIX(AL_EXIT, " %!FUNC!():]");
+// end_wpp
+
+
+
+#else
+
+#include <wmistr.h>
+#include <evntrace.h>
+
+/*
+ * Debug macros
+ */
+
+
/* Debug message source */
-#define AL_DBG_AL_OBJ (1 << 0)
-#define AL_DBG_HDL (1 << 1)
+#define AL_DBG_ERR (1 << 0)
+#define AL_DBG_AL_OBJ (1 << 1)
+#define AL_DBG_HDL (1 << 2)
#define AL_DBG_SMI (1 << 4)
#define AL_DBG_SMI_CB (1 << 5)
-#define AL_DBG_MAD_POOL (1 << 7)
+#define AL_DBG_MAD_POOL (1 << 7)
#define AL_DBG_MAD_SVC (1 << 8)
#define AL_DBG_PNP (1 << 9)
#define AL_DBG_CM (1 << 10)
@@ -66,39 +165,57 @@
#define AL_DBG_SA_REQ (1 << 26)
#define AL_DBG_IOC (1 << 27)
#define AL_DBG_SUB (1 << 28)
+#define AL_DBG_MAD (1 << 29) //TODO
-/* Debug message type */
-#define AL_DBG_FUNC (1 << 29)
-#define AL_DBG_WARN (1 << 30)
-#define AL_DBG_ERROR CL_DBG_ERROR
+#define AL_DBG_ERROR (CL_DBG_ERROR | IPOIB_DBG_ERR)
-#define AL_DBG_NONE CL_DBG_DISABLE
-#define AL_DBG_FULL CL_DBG_ALL
+#if DBG
-#define AL_DBG_MAD (AL_DBG_SMI | AL_DBG_SMI_CB | \
- AL_DBG_MAD_POOL |
AL_DBG_MAD_SVC)
-#define AL_DBG_NORMAL AL_DBG_ERROR
-#define AL_DBG_VERBOSE (AL_DBG_FULL & (~AL_DBG_AL_OBJ))
+// assignment of _level_ is need to to overcome warning C4127
+#define AL_PRINT(_level_,_flag_,_msg_) \
+ { \
+ if( g_al_dbg_level >= (_level_) ) \
+ CL_TRACE( _flag_, g_al_dbg_level, _msg_ ); \
+ }
-extern uint32_t g_al_dbg_lvl;
-/* Macros for simplifying CL_ENTER, CL_TRACE, etc. */
-#define AL_ENTER( msg_lvl ) \
- CL_ENTER( (msg_lvl | AL_DBG_FUNC), g_al_dbg_lvl )
+#define AL_PRINT_EXIT(_level_,_flag_,_msg_) \
+ { \
+ if( g_al_dbg_level >= (_level_) ) \
+ CL_TRACE( _flag_, g_al_dbg_level, _msg_ );\
+ AL_EXIT(_flag_);\
+ }
-#define AL_EXIT( msg_lvl ) \
- CL_EXIT( (msg_lvl | AL_DBG_FUNC), g_al_dbg_lvl )
+#define AL_ENTER(_flag_) \
+ { \
+ if( g_al_dbg_level >= TRACE_LEVEL_VERBOSE ) \
+ CL_ENTER( _flag_, g_al_dbg_level ); \
+ }
-#define AL_TRACE( msg_lvl, msg ) \
- CL_TRACE( (msg_lvl), g_al_dbg_lvl, msg )
+#define AL_EXIT(_flag_)\
+ { \
+ if( g_al_dbg_level >= TRACE_LEVEL_VERBOSE ) \
+ CL_EXIT( _flag_, g_al_dbg_level ); \
+ }
-#define AL_TRACE_EXIT( msg_lvl, msg ) \
- CL_TRACE_EXIT( (msg_lvl), g_al_dbg_lvl, msg )
-#define AL_PRINT( msg_lvl, msg ) \
- CL_PRINT( (msg_lvl), g_al_dbg_lvl, msg )
+#else
+#define AL_PRINT(lvl, flags, msg)
+#define AL_PRINT_EXIT(_level_,_flag_,_msg_)
+
+#define AL_ENTER(_flag_)
+
+#define AL_EXIT(_flag_)
+
+
+#endif
+
+#endif //EVENT_TRACING
+
+
+
enum al_perf_counters
{
IbPostSend,
Index: core/al/al_dm.c
===================================================================
--- core/al/al_dm.c (revision 1349)
+++ core/al/al_dm.c (working copy)
@@ -32,6 +32,14 @@
#include "al_ca.h"
#include "al_debug.h"
+
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "al_dm.tmh"
+#endif
+
#include "al_dm.h"
#include "al_mgr.h"
#include "ib_common.h"
@@ -206,16 +214,16 @@
{
ib_ioc_handle_t h_ioc;
- CL_ENTER( AL_DBG_IOC, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_IOC);
if( AL_OBJ_INVALID_HANDLE( h_ca, AL_OBJ_TYPE_H_CA ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_CA_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_CA_HANDLE\n") );
return IB_INVALID_CA_HANDLE;
}
if( !p_ioc_profile || !ph_ioc )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -233,7 +241,7 @@
/* Return the IOC handle to the user. */
*ph_ioc = h_ioc;
- CL_EXIT( AL_DBG_IOC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_IOC);
return IB_SUCCESS;
}
@@ -243,18 +251,18 @@
ib_destroy_ioc(
IN const ib_ioc_handle_t
h_ioc )
{
- CL_ENTER( AL_DBG_IOC, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_IOC);
if( AL_OBJ_INVALID_HANDLE( h_ioc, AL_OBJ_TYPE_H_IOC ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_HANDLE\n") );
return IB_INVALID_HANDLE;
}
ref_al_obj( &h_ioc->obj );
h_ioc->obj.pfn_destroy( &h_ioc->obj, NULL );
- CL_EXIT( AL_DBG_IOC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_IOC);
return IB_SUCCESS;
}
@@ -304,11 +312,11 @@
al_iou_t* p_iou;
ib_api_status_t status;
- CL_ENTER( AL_DBG_IOC, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_IOC);
if( AL_OBJ_INVALID_HANDLE( h_ioc, AL_OBJ_TYPE_H_IOC ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_HANDLE\n") );
return IB_INVALID_HANDLE;
}
@@ -320,7 +328,7 @@
/* Register the IOC with the IO unit. */
status = add_ioc( p_iou, h_ioc );
- CL_EXIT( AL_DBG_IOC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_IOC);
return status;
}
@@ -335,16 +343,16 @@
ib_svc_handle_t h_svc;
ib_api_status_t status;
- CL_ENTER( AL_DBG_IOC, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_IOC);
if( AL_OBJ_INVALID_HANDLE( h_ioc, AL_OBJ_TYPE_H_IOC ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_HANDLE\n") );
return IB_INVALID_HANDLE;
}
if( !p_svc_entry || !ph_svc )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -368,13 +376,13 @@
if( h_ioc->ioc_profile.num_svc_entries == MAX_NUM_SVC_ENTRIES )
{
cl_spinlock_release( &h_ioc->obj.lock );
- CL_EXIT( AL_DBG_IOC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_IOC);
return IB_INSUFFICIENT_RESOURCES;
}
h_svc = cl_zalloc( sizeof( ib_svc_handle_t ) );
if( !h_svc )
{
- CL_EXIT( AL_DBG_IOC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_IOC);
return IB_INSUFFICIENT_MEMORY;
}
@@ -390,7 +398,7 @@
if( status != IB_SUCCESS )
{
free_svc_entry( &h_svc->obj );
- CL_EXIT( AL_DBG_IOC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_IOC);
return status;
}
@@ -399,7 +407,7 @@
if( status != IB_SUCCESS )
{
h_svc->obj.pfn_destroy( &h_svc->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("attach_al_obj returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -418,7 +426,7 @@
/* Release the reference taken in init_al_obj. */
deref_al_obj( &h_svc->obj );
- CL_EXIT( AL_DBG_IOC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_IOC);
return IB_SUCCESS;
}
@@ -430,11 +438,11 @@
{
ib_ioc_handle_t h_ioc;
- CL_ENTER( AL_DBG_IOC, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_IOC);
if( AL_OBJ_INVALID_HANDLE( h_svc, AL_OBJ_TYPE_H_SVC_ENTRY ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_HANDLE\n") );
return IB_INVALID_HANDLE;
}
@@ -472,7 +480,7 @@
/* No longer in use by this thread. */
cl_atomic_dec( &h_ioc->in_use_cnt );
- CL_EXIT( AL_DBG_IOC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_IOC);
return IB_SUCCESS;
}
@@ -616,7 +624,7 @@
if( status != IB_SUCCESS )
{
h_ioc->obj.pfn_destroy( &h_ioc->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("attach_al_obj returned %s.\n",
ib_get_err_str(status)) );
return NULL;
}
@@ -847,7 +855,7 @@
if( status != IB_SUCCESS )
{
gp_dm_agent->obj.pfn_destroy( &gp_dm_agent->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("attach_al_obj returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -1058,7 +1066,7 @@
{
p_iou->obj.pfn_destroy( &p_iou->obj, NULL );
cl_spinlock_release( &gp_dm_agent->lock );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("attach_al_obj returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -1069,7 +1077,7 @@
if( !h_ca )
{
p_iou->obj.pfn_destroy( &p_iou->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("acquire_ca for GUID %016I64x failed.\n",
p_pnp_rec->guid) );
return IB_INVALID_CA_HANDLE;
}
@@ -1195,7 +1203,7 @@
if( status != IB_SUCCESS )
{
p_iou_port->obj.pfn_destroy( &p_iou_port->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("attach_al_obj returned %s.\n",
ib_get_err_str(status)) );
return status;
}
Index: core/al/al_init.c
===================================================================
--- core/al/al_init.c (revision 1349)
+++ core/al/al_init.c (working copy)
@@ -31,6 +31,14 @@
*/
#include "al_debug.h"
+
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "al_init.tmh"
+#endif
+
#include "al_dev.h"
#include "al_init.h"
#include "al_mgr.h"
@@ -39,9 +47,8 @@
-uint32_t g_al_dbg_lvl = AL_DBG_ERROR;
-
-
+uint32_t g_al_dbg_level =
TRACE_LEVEL_ERROR;
+uint32_t g_al_dbg_flags = 0xf0;
/*
* Device driver initialization routine.
*/
@@ -51,8 +58,8 @@
cl_status_t cl_status;
ib_api_status_t status = IB_ERROR;
- CL_ENTER( AL_DBG_DEV, g_al_dbg_lvl );
- CL_TRACE( AL_DBG_DEV, g_al_dbg_lvl, ("Hello World! =)\n") );
+ AL_ENTER(AL_DBG_DEV);
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_DEV , ("Hello World!
=)\n") );
/*
* Initialize access layer services.
@@ -64,7 +71,7 @@
#endif
if( !gp_async_proc_mgr )
{
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl, ("alloc_async_proc
failed.\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("alloc_async_proc failed.\n") );
return IB_INSUFFICIENT_MEMORY;
}
gp_async_pnp_mgr = gp_async_proc_mgr + 1;
@@ -76,7 +83,7 @@
cl_status = cl_async_proc_init( gp_async_obj_mgr, 1, "AL_OBJ" );
if( cl_status != CL_SUCCESS )
{
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("Failed to init async_obj_mgr: status =
0x%x.\n", cl_status) );
return ib_convert_cl_status( cl_status );
}
@@ -84,7 +91,7 @@
cl_status = cl_async_proc_init( gp_async_proc_mgr, 1, "Althread"
);
if( cl_status != CL_SUCCESS )
{
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("Failed to init async_proc_mgr: status =
0x%x.\n", cl_status) );
return ib_convert_cl_status( cl_status );
}
@@ -92,7 +99,7 @@
cl_status = cl_async_proc_init( gp_async_pnp_mgr, 1, "AL_PNP" );
if( cl_status != CL_SUCCESS )
{
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("Failed to init async_pnp_mgr: status =
0x%x.\n", cl_status) );
return ib_convert_cl_status( cl_status );
}
@@ -100,12 +107,12 @@
status = create_al_mgr();
if( status != IB_SUCCESS )
{
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("init_al_mgr: status = 0x%x.\n", status) );
return status;
}
- CL_EXIT( AL_DBG_DEV, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_DEV);
return status;
}
@@ -117,20 +124,20 @@
void
al_cleanup( void )
{
- CL_ENTER( AL_DBG_DEV, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_DEV);
/*
* Destroy access layer device interface.
*/
- CL_TRACE( AL_DBG_DEV, g_al_dbg_lvl, ("Destroying %s device.\n",
- AL_DEVICE_NAME) );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_DEV , ("Destroying %s
device.\n",
+ (const char *)AL_DEVICE_NAME) );
/*
* Destroy access layer services.
*/
if( gp_al_mgr )
{
- CL_TRACE( AL_DBG_DEV, g_al_dbg_lvl, ("Destroying AL
Mgr.\n") );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_DEV ,
("Destroying AL Mgr.\n") );
ref_al_obj( &gp_al_mgr->obj );
gp_al_mgr->obj.pfn_destroy( &gp_al_mgr->obj, NULL );
}
@@ -138,7 +145,7 @@
#if AL_OBJ_PRIVATE_ASYNC_PROC
if( gp_async_obj_mgr )
{
- CL_TRACE( AL_DBG_DEV, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_DEV ,
("Destroying async obj mgr.\n") );
cl_async_proc_destroy( gp_async_obj_mgr );
gp_async_obj_mgr = NULL;
@@ -147,7 +154,7 @@
if( gp_async_pnp_mgr )
{
- CL_TRACE( AL_DBG_DEV, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_DEV ,
("Destroying async pnp mgr.\n") );
cl_async_proc_destroy( gp_async_pnp_mgr );
gp_async_pnp_mgr = NULL;
@@ -155,12 +162,12 @@
if( gp_async_proc_mgr )
{
- CL_TRACE( AL_DBG_DEV, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_DEV ,
("Destroying async proc mgr.\n") );
cl_async_proc_destroy( gp_async_proc_mgr );
cl_free( gp_async_proc_mgr );
gp_async_proc_mgr = NULL;
}
- CL_TRACE_EXIT( AL_DBG_DEV, g_al_dbg_lvl, ("Goodbye Cruel World
=(\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_WARNING ,AL_DBG_DEV , ("Goodbye Cruel
World =(\n") );
}
Index: core/al/al_mad.c
===================================================================
--- core/al/al_mad.c (revision 1349)
+++ core/al/al_mad.c (working copy)
@@ -36,6 +36,14 @@
#include "al.h"
#include "al_debug.h"
+
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "al_mad.tmh"
+#endif
+
#include "al_cq.h"
#include "al_mad.h"
#include "al_qp.h"
@@ -291,7 +299,7 @@
IN ib_mad_element_t*
p_mad_element,
IN ib_wc_t*
p_wc )
{
- CL_ENTER( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SMI);
CL_ASSERT( p_mad_element );
CL_ASSERT( p_wc );
@@ -329,7 +337,7 @@
if( p_wc->recv.ud.recv_opt & IB_RECV_OPT_IMMEDIATE )
p_mad_element->immediate_data =
p_wc->recv.ud.immediate_data;
- CL_EXIT( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI);
}
@@ -351,11 +359,11 @@
ib_api_status_t status;
cl_status_t cl_status;
- CL_ENTER( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_SVC);
h_mad_disp = cl_zalloc( sizeof( al_mad_disp_t ) );
if( !h_mad_disp )
{
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl, ("insufficient
memory\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("insufficient memory\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -367,7 +375,7 @@
NULL, __cleanup_mad_disp, __free_mad_disp );
if( status != IB_SUCCESS )
{
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl, ("init obj: %s\n",
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR , ("init obj:
%s\n",
ib_get_err_str(status)) );
__free_mad_disp( &h_mad_disp->obj );
return status;
@@ -376,7 +384,7 @@
if( status != IB_SUCCESS )
{
h_mad_disp->obj.pfn_destroy( &h_mad_disp->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("attach_al_obj returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -409,7 +417,7 @@
/* Release the reference taken in init_al_obj. */
deref_al_obj( &h_mad_disp->obj );
- CL_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_SVC);
return IB_SUCCESS;
}
@@ -421,7 +429,7 @@
{
al_mad_disp_handle_t h_mad_disp;
- CL_ENTER( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_SVC);
CL_ASSERT( p_obj );
h_mad_disp = PARENT_STRUCT( p_obj, al_mad_disp_t, obj );
@@ -429,7 +437,7 @@
if( h_mad_disp->h_qp )
deref_al_obj( &h_mad_disp->h_qp->obj );
- CL_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_SVC);
}
@@ -440,7 +448,7 @@
{
al_mad_disp_handle_t h_mad_disp;
- CL_ENTER( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_SVC);
CL_ASSERT( p_obj );
h_mad_disp = PARENT_STRUCT( p_obj, al_mad_disp_t, obj );
@@ -448,7 +456,7 @@
cl_vector_destroy( &h_mad_disp->version_vector );
destroy_al_obj( p_obj );
cl_free( h_mad_disp );
- CL_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_SVC);
}
@@ -465,7 +473,7 @@
size_t i;
cl_status_t cl_status;
- CL_ENTER( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_SVC);
cl_spinlock_acquire( &h_mad_disp->obj.lock );
/* Find an empty slot in the client vector for the registration.
*/
@@ -503,7 +511,7 @@
if( !__mad_disp_reg_unsol( h_mad_disp, h_mad_reg,
p_mad_svc ) )
{
cl_spinlock_release( &h_mad_disp->obj.lock );
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl, ("reg
unsol failed\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("reg unsol failed\n") );
return NULL;
}
}
@@ -516,7 +524,7 @@
/* The MAD service needs to take a reference on the dispatcher.
*/
ref_al_obj( &h_mad_disp->obj );
- CL_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_SVC);
return h_mad_reg;
}
@@ -621,7 +629,7 @@
uint8_t i;
/* Ensure that we are ready to handle this version number. */
- CL_ENTER( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_SVC);
cl_status = cl_vector_set_min_size( &h_mad_disp->version_vector,
__mgmt_version_index( p_mad_svc->mgmt_version ) + 1 );
if( cl_status != CL_SUCCESS )
@@ -653,7 +661,7 @@
/* No one else can be registered for this
method. */
if( cl_ptr_vector_get( p_method_ptr_vector, i )
)
{
- CL_TRACE(AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR
,
("Other client already
registered for Un-Solicited Method "
"%u for version %u of class
%u.\n", i, p_mad_svc->mgmt_version,
p_mad_svc->mgmt_class ) );
@@ -669,7 +677,7 @@
{
cl_ptr_vector_set( p_method_ptr_vector, i,
h_mad_reg );
- CL_TRACE( AL_DBG_MAD_SVC, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_MAD_SVC
,
("Register version:%u (%u)
class:0x%02X(%u) method:0x%02X Hdl:%p\n",
p_mad_svc->mgmt_version,
__mgmt_version_index(
p_mad_svc->mgmt_version ),
@@ -680,7 +688,7 @@
}
}
- CL_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_SVC);
return TRUE;
}
@@ -718,7 +726,7 @@
cl_ptr_vector_t *p_method_ptr_vector;
size_t i;
- CL_ENTER( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_SVC);
h_mad_disp = h_mad_reg->h_mad_disp;
cl_spinlock_acquire( &h_mad_disp->obj.lock );
@@ -749,7 +757,7 @@
/* The MAD service no longer requires access to the MAD
dispatcher. */
deref_al_obj( &h_mad_disp->obj );
- CL_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_SVC);
}
@@ -765,7 +773,7 @@
* Increment the reference count on the registration to ensure
that
* the MAD service does not go away until the send completes.
*/
- CL_ENTER( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_SVC);
cl_atomic_inc( &h_mad_reg->ref_cnt );
ref_al_obj( &h_mad_reg->h_mad_svc->obj );
@@ -778,7 +786,7 @@
* If we are the originator of the transaction, we need to
modify the
* TID to ensure that duplicate TIDs are not used by multiple
clients.
*/
- CL_TRACE( AL_DBG_MAD_SVC, g_al_dbg_lvl, ("dispatching TID:
0x%0"PRIx64"\n",
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_MAD_SVC , ("dispatching
TID: 0x%I64x\n",
p_mad_hdr->trans_id) );
p_mad_wr->client_tid = p_mad_hdr->trans_id;
if( __use_tid_routing( p_mad_hdr, TRUE ) )
@@ -790,8 +798,8 @@
al_set_al_tid( &p_mad_hdr->trans_id,
h_mad_reg->client_id );
#pragma warning( pop )
- CL_TRACE( AL_DBG_MAD_SVC, g_al_dbg_lvl,
- ("modified TID to: 0x%0"PRIx64"\n",
p_mad_hdr->trans_id) );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_MAD_SVC ,
+ ("modified TID to: 0x%0I64x\n",
p_mad_hdr->trans_id) );
}
/* Post the work request to the QP. */
@@ -799,7 +807,7 @@
h_mad_reg->h_mad_disp->h_qp->pfn_queue_mad(
h_mad_reg->h_mad_disp->h_qp, p_mad_wr );
- CL_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_SVC);
}
@@ -828,9 +836,9 @@
al_mad_reg_handle_t h_mad_reg;
ib_mad_t *p_mad_hdr;
- CL_ENTER( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_SVC);
- CL_TRACE( AL_DBG_MAD_SVC, g_al_dbg_lvl, ("p_mad_wr 0x%p\n",
p_mad_wr ) );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_MAD_SVC , ("p_mad_wr
0x%p\n", p_mad_wr ) );
/* Get the MAD header. */
p_mad_hdr = get_mad_hdr_from_wr( p_mad_wr );
@@ -843,7 +851,7 @@
CL_ASSERT( h_mad_reg && (h_mad_reg->client_id ==
p_mad_wr->client_id) );
/* Reset the TID and WR ID. */
- CL_TRACE( AL_DBG_MAD_SVC, g_al_dbg_lvl, ("send done TID:
0x%"PRIx64"\n",
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_MAD_SVC , ("send done
TID: 0x%I64x\n",
p_mad_hdr->trans_id) );
p_mad_hdr->trans_id = p_mad_wr->client_tid;
p_mad_wr->send_wr.wr_id = 0;
@@ -856,7 +864,7 @@
deref_al_obj( &h_mad_reg->h_mad_svc->obj );
cl_atomic_dec( &h_mad_reg->ref_cnt );
- CL_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_SVC);
}
@@ -878,11 +886,11 @@
cl_ptr_vector_t *p_method_ptr_vector;
uint8_t method;
- CL_ENTER( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_SVC);
p_mad_hdr = ib_get_mad_buf( p_mad_element );
- CL_TRACE( AL_DBG_MAD_SVC, g_al_dbg_lvl,
- ("TID = 0x%"PRIx64 "\n"
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_MAD_SVC ,
+ ("TID = 0x%I64x\n"
"class = 0x%x.\n"
"version = 0x%x.\n"
"method = 0x%x.\n",
@@ -896,7 +904,7 @@
if( __use_tid_routing( p_mad_hdr, FALSE ) )
{
/* The MAD was received in response to a send. */
- CL_TRACE( AL_DBG_MAD_SVC, g_al_dbg_lvl, ("routing based
on TID\n"));
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_MAD_SVC ,
("routing based on TID\n"));
/* Verify that we have a registration entry. */
if( al_get_al_tid( p_mad_hdr->trans_id ) >=
@@ -904,7 +912,7 @@
{
/* No clients for this version-class-method. */
cl_spinlock_release( &h_mad_disp->obj.lock );
- CL_TRACE_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl,
+ AL_PRINT_EXIT(TRACE_LEVEL_WARNING
,AL_DBG_MAD_SVC ,
("invalid client ID\n") );
return IB_NOT_FOUND;
}
@@ -923,7 +931,7 @@
}
else
{
- CL_TRACE( AL_DBG_MAD_SVC, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_MAD_SVC ,
("routing based on version, class, method\n"));
/* The receive is unsolicited. Find the client. */
@@ -932,7 +940,7 @@
{
/* No clients for this version of MADs. */
cl_spinlock_release( &h_mad_disp->obj.lock );
- CL_TRACE_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl,
+ AL_PRINT_EXIT(TRACE_LEVEL_WARNING
,AL_DBG_MAD_SVC ,
("no clients registered for this class
version\n") );
return IB_NOT_FOUND;
}
@@ -946,7 +954,7 @@
{
/* No clients for this version-class. */
cl_spinlock_release( &h_mad_disp->obj.lock );
- CL_TRACE_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl,
+ AL_PRINT_EXIT(TRACE_LEVEL_WARNING
,AL_DBG_MAD_SVC ,
("no clients registered for this
class\n") );
return IB_NOT_FOUND;
}
@@ -960,7 +968,7 @@
{
/* No clients for this version-class-method. */
cl_spinlock_release( &h_mad_disp->obj.lock );
- CL_TRACE_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl,
+ AL_PRINT_EXIT(TRACE_LEVEL_WARNING
,AL_DBG_MAD_SVC ,
("no clients registered for this
method-out of range\n") );
return IB_NOT_FOUND;
}
@@ -970,7 +978,7 @@
{
/* No clients for this version-class-method. */
cl_spinlock_release( &h_mad_disp->obj.lock );
- CL_TRACE_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl,
+ AL_PRINT_EXIT(TRACE_LEVEL_WARNING
,AL_DBG_MAD_SVC ,
("no clients registered for method %u of
class %u(%u) version %u(%u)\n",
method,
p_mad_hdr->mgmt_class,
@@ -986,7 +994,7 @@
if( !h_mad_reg->ref_cnt )
{
cl_spinlock_release( &h_mad_disp->obj.lock );
- CL_TRACE_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl,
+ AL_PRINT_EXIT(TRACE_LEVEL_WARNING ,AL_DBG_MAD_SVC ,
("no client registered\n") );
return IB_NOT_FOUND;
}
@@ -1002,7 +1010,7 @@
h_mad_reg->pfn_recv_done( h_mad_svc, p_mad_element );
deref_al_obj( &h_mad_svc->obj );
- CL_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_SVC);
return IB_SUCCESS;
}
@@ -1019,12 +1027,12 @@
ib_rmpp_mad_t *p_rmpp_mad;
boolean_t is_orig;
- CL_ENTER( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_SVC);
/* CM MADs are never TID routed. */
if( p_mad_hdr->mgmt_class == IB_MCLASS_COMM_MGMT )
{
- CL_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_SVC);
return FALSE;
}
@@ -1068,7 +1076,7 @@
if( !are_we_sender )
is_orig = !is_orig;
- CL_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_SVC);
return is_orig;
}
@@ -1097,7 +1105,7 @@
al_qp_alias_t *p_qp_alias;
ib_qp_attr_t qp_attr;
- CL_ENTER( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_SVC);
CL_ASSERT( h_qp );
switch( h_qp->type )
@@ -1110,13 +1118,13 @@
break;
default:
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
if( !p_mad_svc || !ph_mad_svc )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -1151,7 +1159,7 @@
if( status != IB_SUCCESS )
{
h_mad_svc->obj.pfn_destroy( &h_mad_svc->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("attach_al_obj returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -1192,7 +1200,7 @@
*ph_mad_svc = h_mad_svc;
- CL_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_SVC);
return IB_SUCCESS;
}
@@ -1211,7 +1219,7 @@
KIRQL old_irql;
#endif
- CL_ENTER( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_SVC);
CL_ASSERT( p_obj );
h_mad_svc = PARENT_STRUCT( p_obj, al_mad_svc_t, obj );
@@ -1245,7 +1253,7 @@
p_list_item != cl_qlist_end( &h_mad_svc->send_list );
p_list_item = cl_qlist_next( p_list_item ) )
{
- CL_TRACE( AL_DBG_MAD_SVC, g_al_dbg_lvl, ("canceling
MAD\n") );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_MAD_SVC ,
("canceling MAD\n") );
h_send = PARENT_STRUCT( p_list_item, al_mad_send_t,
pool_item );
h_send->canceled = TRUE;
}
@@ -1297,7 +1305,7 @@
}
#endif
- CL_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_SVC);
}
@@ -1361,28 +1369,28 @@
ib_mad_element_t *p_cur_mad, *p_next_mad;
#endif
- CL_ENTER( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_SVC);
if( AL_OBJ_INVALID_HANDLE( h_mad_svc, AL_OBJ_TYPE_H_MAD_SVC ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_HANDLE\n") );
return IB_INVALID_HANDLE;
}
if( !p_mad_element_list ||
( p_mad_element_list->p_next && !pp_mad_failure ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
#ifndef CL_KERNEL
/* This is a send from user mode using special QP alias */
- CL_TRACE( AL_DBG_MAD_SVC, g_al_dbg_lvl,
- ("ib_send_mad: ual_context non-zero, TID = 0x%"PRIx64
".\n",
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_MAD_SVC ,
+ ("ib_send_mad: ual_context non-zero, TID = 0x%I64x.\n",
((ib_mad_t*)(ib_get_mad_buf( p_mad_element_list
)))->trans_id ));
status = spl_qp_mad_send( h_mad_svc, p_mad_element_list,
pp_mad_failure );
- CL_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_SVC);
return status;
#else
/* Post each send on the list. */
@@ -1396,7 +1404,7 @@
al_mad_element_t, element ) );
if( !h_send )
{
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl, ("unable
to get mad_send\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("unable to get mad_send\n") );
if( pp_mad_failure )
*pp_mad_failure = p_cur_mad;
return IB_INSUFFICIENT_RESOURCES;
@@ -1406,7 +1414,7 @@
status = __init_send_mad( h_mad_svc, h_send, p_cur_mad
);
if( status != IB_SUCCESS )
{
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl,
("init_send_mad failed: %s\n",
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("init_send_mad failed: %s\n",
ib_get_err_str(status)) );
put_mad_send( h_send );
if( pp_mad_failure )
@@ -1437,7 +1445,7 @@
*/
__mad_disp_resume_send( h_mad_svc->h_mad_reg );
- CL_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_SVC);
return status;
#endif
}
@@ -1454,7 +1462,7 @@
uint8_t rmpp_version;
ib_api_status_t status;
- CL_ENTER( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_SVC);
/* Initialize tracking the send. */
h_send->p_send_mad = p_mad_element;
@@ -1467,13 +1475,13 @@
if( h_send->uses_rmpp )
{
/* The RMPP header is present. */
- CL_TRACE( AL_DBG_MAD_SVC, g_al_dbg_lvl, ("RMPP is
activated\n") );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_MAD_SVC ,
("RMPP is activated\n") );
p_rmpp_hdr = (ib_rmpp_mad_t*)p_mad_element->p_mad_buf;
/* We only support version 1. */
if( rmpp_version != DEFAULT_RMPP_VERSION )
{
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl,
("unsupported version\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("unsupported version\n") );
return IB_INVALID_SETTING;
}
@@ -1513,7 +1521,7 @@
}
}
- CL_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_SVC);
return IB_SUCCESS;
}
@@ -1603,7 +1611,7 @@
{
ib_rmpp_mad_t *p_rmpp_hdr;
- CL_ENTER( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_SVC);
CL_ASSERT( h_mad_reg && h_send );
CL_ASSERT( h_send->cur_seg <= h_send->seg_limit );
@@ -1667,7 +1675,7 @@
/* Send the MAD. */
__queue_mad_wr( h_mad_reg, h_send );
- CL_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_SVC);
}
@@ -1686,7 +1694,7 @@
uint8_t *p_rmpp_src, *p_rmpp_dst;
uintn_t hdr_len, offset, max_len;
- CL_ENTER( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_SVC);
p_send_wr = &h_send->mad_wr.send_wr;
cl_memclr( p_send_wr, sizeof( ib_send_wr_t ) );
@@ -1749,7 +1757,7 @@
__mad_disp_queue_send( h_mad_reg, &h_send->mad_wr );
- CL_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_SVC);
}
@@ -1783,23 +1791,23 @@
ib_api_status_t status;
#endif
- CL_ENTER( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_SVC);
if( AL_OBJ_INVALID_HANDLE( h_mad_svc, AL_OBJ_TYPE_H_MAD_SVC ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_HANDLE\n") );
return IB_INVALID_HANDLE;
}
if( !p_mad_element )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
#ifndef CL_KERNEL
/* This is a send from user mode using special QP alias */
status = spl_qp_cancel_mad( h_mad_svc, p_mad_element );
- CL_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_SVC);
return status;
#else
/* Search for the MAD in our MAD list. It may have already
completed. */
@@ -1810,7 +1818,7 @@
if( !p_list_item )
{
cl_spinlock_release( &h_mad_svc->obj.lock );
- CL_TRACE( AL_DBG_MAD_SVC, g_al_dbg_lvl, ("mad not
found\n") );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_MAD_SVC , ("mad
not found\n") );
return IB_NOT_FOUND;
}
@@ -1826,7 +1834,7 @@
}
cl_spinlock_release( &h_mad_svc->obj.lock );
- CL_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_SVC);
return IB_SUCCESS;
#endif
}
@@ -1847,12 +1855,12 @@
if( AL_OBJ_INVALID_HANDLE( h_mad_svc, AL_OBJ_TYPE_H_MAD_SVC ) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("IB_INVALID_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_INVALID_HANDLE\n") );
return IB_INVALID_HANDLE;
}
if( !p_mad_element )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("IB_INVALID_PARAMETER\n")
);
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -1871,7 +1879,7 @@
if( !p_list_item )
{
cl_spinlock_release( &h_mad_svc->obj.lock );
- AL_TRACE( AL_DBG_MAD_SVC, ("MAD not found\n") );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_MAD_SVC, ("MAD
not found\n") );
return IB_NOT_FOUND;
}
@@ -1901,11 +1909,11 @@
{
ib_mad_send_handle_t h_send;
- CL_ENTER( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_SVC);
CL_ASSERT( h_mad_svc && p_mad_wr && !p_wc->p_next );
h_send = PARENT_STRUCT( p_mad_wr, al_mad_send_t, mad_wr );
- CL_TRACE( AL_DBG_MAD_SVC, g_al_dbg_lvl, ("send callback
TID:0x%"PRIx64"\n",
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_MAD_SVC , ("send
callback TID:0x%I64x\n",
__get_send_tid( h_send )) );
/* We need to synchronize access to the list as well as the MAD
request. */
@@ -1914,7 +1922,7 @@
/* Complete internally sent MADs. */
if( __is_internal_send( h_mad_svc->svc_type, h_send->p_send_mad
) )
{
- CL_TRACE_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl, ("internal
send\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_WARNING ,AL_DBG_MAD_SVC ,
("internal send\n") );
cl_qlist_remove_item( &h_mad_svc->send_list,
(cl_list_item_t*)&h_send->pool_item );
cl_spinlock_release( &h_mad_svc->obj.lock );
@@ -1943,8 +1951,8 @@
if( h_send->uses_rmpp && (h_send->cur_seg <=
h_send->seg_limit) )
{
/* Send the next segment. */
- CL_TRACE( AL_DBG_MAD_SVC, g_al_dbg_lvl,
- ("sending next RMPP segment for
TID:0x%"PRIx64"\n",
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_MAD_SVC
,
+ ("sending next RMPP segment for
TID:0x%I64x\n",
__get_send_tid( h_send )) );
__queue_rmpp_seg( h_mad_svc->h_mad_reg, h_send
);
@@ -1952,8 +1960,8 @@
else
{
/* Continue waiting for a response or ACK. */
- CL_TRACE( AL_DBG_MAD_SVC, g_al_dbg_lvl,
- ("waiting for response for
TID:0x%"PRIx64"\n",
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_MAD_SVC
,
+ ("waiting for response for
TID:0x%I64x\n",
__get_send_tid( h_send )) );
__set_retry_time( h_send );
@@ -1969,7 +1977,7 @@
*/
__mad_disp_resume_send( h_mad_svc->h_mad_reg );
- CL_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_SVC);
}
@@ -1983,9 +1991,9 @@
IN ib_mad_send_handle_t
h_send,
IN ib_wc_status_t
wc_status )
{
- CL_ENTER( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_SVC);
- CL_TRACE( AL_DBG_MAD_SVC, g_al_dbg_lvl, ("completing
TID:0x%"PRIx64"\n",
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_MAD_SVC , ("completing
TID:0x%I64x\n",
__get_send_tid( h_send )) );
h_send->p_send_mad->status = wc_status;
@@ -2003,7 +2011,7 @@
__cleanup_mad_send( h_mad_svc, h_send );
- CL_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_SVC);
}
@@ -2037,19 +2045,19 @@
IN ib_mad_send_handle_t
h_send,
IN ib_wc_t
*p_wc )
{
- CL_ENTER( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_SVC);
/* Complete the send if the request failed. */
if( p_wc->status != IB_WCS_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("y-send
failed\n" ) );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("y-send failed\n" ) );
return TRUE;
}
/* Complete the send if it has been canceled. */
if( h_send->canceled )
{
- CL_TRACE_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl,
+ AL_PRINT_EXIT(TRACE_LEVEL_WARNING ,AL_DBG_MAD_SVC ,
("y-send was canceled\n") );
return TRUE;
}
@@ -2057,7 +2065,7 @@
/* Complete the send if we have its response. */
if( h_send->p_resp_mad )
{
- CL_TRACE_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl,
+ AL_PRINT_EXIT(TRACE_LEVEL_WARNING ,AL_DBG_MAD_SVC ,
("y-response received\n") );
return TRUE;
}
@@ -2065,7 +2073,7 @@
/* RMPP sends cannot complete until all segments have been
acked. */
if( h_send->uses_rmpp && (h_send->ack_seg < h_send->total_seg) )
{
- CL_TRACE_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl,
+ AL_PRINT_EXIT(TRACE_LEVEL_WARNING ,AL_DBG_MAD_SVC ,
("more RMPP segments to send\n") );
return FALSE;
}
@@ -2076,13 +2084,13 @@
*/
if( h_send->p_send_mad->resp_expected )
{
- CL_TRACE_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl,
+ AL_PRINT_EXIT(TRACE_LEVEL_WARNING ,AL_DBG_MAD_SVC ,
("no-waiting on response\n") );
return FALSE;
}
else
{
- CL_TRACE_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl, ("send
completed\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_WARNING ,AL_DBG_MAD_SVC ,
("send completed\n") );
return TRUE;
}
}
@@ -2102,7 +2110,7 @@
cl_list_item_t *p_list_item;
ib_mad_send_handle_t h_send;
- CL_ENTER( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_SVC);
p_recv_hdr = p_recv_mad->p_mad_buf;
@@ -2114,7 +2122,7 @@
h_send = PARENT_STRUCT( p_list_item, al_mad_send_t,
pool_item );
/* Match on the transaction ID, ignoring internally
generated sends. */
- CL_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_SVC);
if( (p_recv_hdr->trans_id == h_send->mad_wr.client_tid)
&&
!__is_internal_send( h_mad_svc->svc_type,
h_send->p_send_mad ) )
{
@@ -2135,18 +2143,18 @@
ib_mad_t *p_mad_hdr;
ib_api_status_t cl_status;
- CL_ENTER( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_SVC);
p_mad_hdr = ib_get_mad_buf( p_mad_element );
- CL_TRACE( AL_DBG_MAD_SVC, g_al_dbg_lvl, ("recv done
TID:0x%"PRIx64"\n",
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_MAD_SVC , ("recv done
TID:0x%I64x\n",
p_mad_hdr->trans_id) );
/* Raw MAD services get all receives. */
if( h_mad_svc->svc_type == IB_MAD_SVC_RAW )
{
/* Report the receive. */
- CL_TRACE_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl,
- ("recv TID:0x%"PRIx64"\n", p_mad_hdr->trans_id)
);
+ AL_PRINT_EXIT(TRACE_LEVEL_WARNING ,AL_DBG_MAD_SVC ,
+ ("recv TID:0x%I64x\n", p_mad_hdr->trans_id) );
h_mad_svc->pfn_user_recv_cb( h_mad_svc,
(void*)h_mad_svc->obj.context,
p_mad_element );
return;
@@ -2158,8 +2166,8 @@
*/
if( p_mad_hdr->status & IB_MAD_STATUS_BUSY )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
- ("responder busy TID:0x%"PRIx64"\n",
p_mad_hdr->trans_id) );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
+ ("responder busy TID:0x%I64x\n",
p_mad_hdr->trans_id) );
ib_put_mad( p_mad_element );
return;
}
@@ -2172,7 +2180,7 @@
if( cl_status != CL_SUCCESS )
{
/* The reassembly is not done. */
- CL_TRACE_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl,
+ AL_PRINT_EXIT(TRACE_LEVEL_WARNING
,AL_DBG_MAD_SVC ,
("no RMPP receive to report\n") );
return;
}
@@ -2198,12 +2206,12 @@
else
{
/* Report the receive. */
- CL_TRACE( AL_DBG_MAD_SVC, g_al_dbg_lvl, ("unsol recv
TID:0x%"PRIx64"\n",
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_MAD_SVC ,
("unsol recv TID:0x%I64x\n",
p_mad_hdr->trans_id) );
h_mad_svc->pfn_user_recv_cb( h_mad_svc,
(void*)h_mad_svc->obj.context,
p_mad_element );
}
- CL_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_SVC);
}
@@ -2224,7 +2232,7 @@
* Try to find the send. The send may have already timed out or
* have been canceled, so we need to search for it.
*/
- CL_ENTER( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_SVC);
p_mad_hdr = ib_get_mad_buf( p_mad_element );
cl_spinlock_acquire( &h_mad_svc->obj.lock );
@@ -2232,8 +2240,8 @@
if( !h_send )
{
/* A matching send was not found. */
- CL_TRACE_EXIT( AL_DBG_WARN, g_al_dbg_lvl,
- ("unmatched resp TID:0x%"PRIx64"\n",
p_mad_hdr->trans_id) );
+ AL_PRINT_EXIT(TRACE_LEVEL_WARNING ,AL_DBG_MAD_SVC ,
+ ("unmatched resp TID:0x%I64x\n",
p_mad_hdr->trans_id) );
cl_spinlock_release( &h_mad_svc->obj.lock );
ib_put_mad( p_mad_element );
return;
@@ -2249,15 +2257,15 @@
if( h_send->retry_time == MAX_TIME )
{
/* The send is currently active. Do not report it. */
- CL_TRACE( AL_DBG_MAD_SVC, g_al_dbg_lvl,
- ("resp send active TID:0x%"PRIx64"\n",
p_mad_hdr->trans_id) );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_MAD_SVC ,
+ ("resp send active TID:0x%I64x\n",
p_mad_hdr->trans_id) );
h_send->p_resp_mad = p_mad_element;
cl_spinlock_release( &h_mad_svc->obj.lock );
}
else
{
- CL_TRACE( AL_DBG_MAD_SVC, g_al_dbg_lvl,
- ("resp received TID:0x%"PRIx64"\n",
p_mad_hdr->trans_id) );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_MAD_SVC ,
+ ("resp received TID:0x%I64x\n",
p_mad_hdr->trans_id) );
/* Report the send completion below. */
cl_qlist_remove_item( &h_mad_svc->send_list,
@@ -2273,7 +2281,7 @@
h_send->p_send_mad );
__cleanup_mad_send( h_mad_svc, h_send );
}
- CL_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_SVC);
}
@@ -2288,11 +2296,11 @@
{
ib_rmpp_mad_t *p_rmpp_mad;
- CL_ENTER( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_SVC);
p_rmpp_mad = (ib_rmpp_mad_t*)ib_get_mad_buf( p_mad_element );
- CL_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_SVC);
switch( mad_svc_type )
{
@@ -2356,7 +2364,7 @@
ib_rmpp_mad_t *p_rmpp_mad;
cl_status_t cl_status;
- CL_ENTER( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_SVC);
p_rmpp_mad = ib_get_mad_buf( *pp_mad_element );
CL_ASSERT( ib_rmpp_is_flag_set( p_rmpp_mad, IB_RMPP_FLAG_ACTIVE
) );
@@ -2390,7 +2398,7 @@
break;
}
- CL_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_SVC);
return cl_status;
}
@@ -2799,7 +2807,7 @@
boolean_t send_done = FALSE;
ib_wc_status_t wc_status = IB_WCS_SUCCESS;
- CL_ENTER( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_SVC);
p_rmpp_mad = (ib_rmpp_mad_t*)ib_get_mad_buf( p_mad_element );
/*
@@ -2811,7 +2819,7 @@
if( !h_send )
{
cl_spinlock_release( &h_mad_svc->obj.lock );
- CL_TRACE_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl,
+ AL_PRINT_EXIT(TRACE_LEVEL_WARNING ,AL_DBG_MAD_SVC ,
("ACK cannot find a matching send\n") );
return;
}
@@ -2820,7 +2828,7 @@
if( cl_ntoh32( p_rmpp_mad->seg_num ) < h_send->ack_seg )
{
cl_spinlock_release( &h_mad_svc->obj.lock );
- CL_TRACE_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl,
+ AL_PRINT_EXIT(TRACE_LEVEL_WARNING ,AL_DBG_MAD_SVC ,
("old ACK - being dropped\n") );
return;
}
@@ -2841,7 +2849,7 @@
if( h_send->retry_time == MAX_TIME )
{
cl_spinlock_release( &h_mad_svc->obj.lock );
- CL_TRACE_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl,
+ AL_PRINT_EXIT(TRACE_LEVEL_WARNING ,AL_DBG_MAD_SVC ,
("ACK processed, waiting for send to
complete\n") );
return;
}
@@ -2885,7 +2893,7 @@
*/
__mad_disp_resume_send( h_mad_svc->h_mad_reg );
- CL_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_SVC);
}
@@ -2901,7 +2909,7 @@
ib_mad_send_handle_t h_send;
ib_rmpp_mad_t *p_rmpp_mad;
- CL_ENTER( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_SVC);
p_rmpp_mad = (ib_rmpp_mad_t*)ib_get_mad_buf( p_mad_element );
/* Search for the send. The send may have timed out or been
canceled. */
@@ -2918,7 +2926,7 @@
{
h_send->canceled = TRUE;
cl_spinlock_release( &h_mad_svc->obj.lock );
- CL_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_SVC);
return;
}
@@ -2928,7 +2936,7 @@
cl_spinlock_release( &h_mad_svc->obj.lock );
__notify_send_comp( h_mad_svc, h_send, IB_WCS_CANCELED );
- CL_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_SVC);
}
@@ -2949,11 +2957,11 @@
__send_timer_cb(
IN void
*context )
{
- CL_ENTER( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_SVC);
__check_send_queue( (ib_mad_svc_handle_t)context );
- CL_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_SVC);
}
@@ -2971,7 +2979,7 @@
uint64_t cur_time;
cl_qlist_t timeout_list;
- CL_ENTER( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_SVC);
/*
* The timeout out list is used to call the user back without
@@ -2994,7 +3002,7 @@
if( h_send->retry_time == MAX_TIME )
{
/* The request is still active. */
- CL_TRACE( AL_DBG_MAD_SVC, g_al_dbg_lvl, ("active
TID:0x%"PRIx64"\n",
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_MAD_SVC
, ("active TID:0x%I64x\n",
__get_send_tid( h_send )) );
continue;
}
@@ -3004,7 +3012,7 @@
if( h_send->canceled )
{
/* The request has been canceled. */
- CL_TRACE( AL_DBG_MAD_SVC, g_al_dbg_lvl,
("canceling TID:0x%"PRIx64"\n",
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_MAD_SVC
, ("canceling TID:0x%I64x\n",
__get_send_tid( h_send )) );
h_send->p_send_mad->status = IB_WCS_CANCELED;
@@ -3017,7 +3025,7 @@
if( cur_time < h_send->retry_time )
{
/* The request has not timed out. */
- CL_TRACE( AL_DBG_MAD_SVC, g_al_dbg_lvl,
("waiting on TID:0x%"PRIx64"\n",
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_MAD_SVC
, ("waiting on TID:0x%I64x\n",
__get_send_tid( h_send )) );
/* Set the retry timer to the minimum needed
time, in ms. */
@@ -3029,7 +3037,7 @@
/* See if we need to retry the send operation. */
if( h_send->retry_cnt )
{
- CL_TRACE( AL_DBG_MAD_SVC, g_al_dbg_lvl,
("retrying TID:0x%"PRIx64"\n",
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_MAD_SVC
, ("retrying TID:0x%I64x\n",
__get_send_tid( h_send )) );
/* Retry the send. */
@@ -3061,8 +3069,8 @@
continue;
}
/* The request has timed out or failed to be retried. */
- AL_TRACE( AL_DBG_MAD_SVC | AL_DBG_WARN,
- ("timing out TID:0x%"PRIx64"\n", __get_send_tid(
h_send )) );
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_MAD_SVC ,
+ ("timing out TID:0x%I64x\n", __get_send_tid(
h_send )) );
h_send->p_send_mad->status = IB_WCS_TIMEOUT_RETRY_ERR;
cl_qlist_remove_item( &h_mad_svc->send_list, p_list_item
);
@@ -3088,7 +3096,7 @@
__cleanup_mad_send( h_mad_svc, h_send );
p_list_item = cl_qlist_remove_head( &timeout_list );
}
- CL_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_SVC);
}
@@ -3102,7 +3110,7 @@
cl_list_item_t *p_list_item, *p_next_item;
boolean_t restart_timer;
- CL_ENTER( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_SVC);
h_mad_svc = (ib_mad_svc_handle_t)context;
@@ -3134,7 +3142,7 @@
if( restart_timer )
cl_timer_start( &h_mad_svc->recv_timer,
AL_REASSEMBLY_TIMEOUT );
- CL_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_SVC);
}
@@ -3148,22 +3156,22 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_SVC);
if( AL_OBJ_INVALID_HANDLE( h_ca, AL_OBJ_TYPE_H_CA ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_CA_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_CA_HANDLE\n") );
return IB_INVALID_CA_HANDLE;
}
if( !p_mad_in || !p_mad_out )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
status = verbs_local_mad( h_ca, port_num, p_mad_in, p_mad_out );
- CL_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_SVC);
return status;
}
Index: core/al/al_mcast.c
===================================================================
--- core/al/al_mcast.c (revision 1349)
+++ core/al/al_mcast.c (working copy)
@@ -35,6 +35,14 @@
#include "al.h"
#include "al_ca.h"
#include "al_debug.h"
+
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "al_mcast.tmh"
+#endif
+
#include "al_mgr.h"
#include "al_qp.h"
#include "al_verbs.h"
@@ -102,7 +110,7 @@
cl_status_t cl_status;
boolean_t sync;
- CL_ENTER( AL_DBG_MCAST, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MCAST);
/*
* Validate the port GUID. There is no need to validate the
pkey index as
@@ -113,7 +121,7 @@
status = get_port_num( h_qp->obj.p_ci_ca,
p_mcast_req->port_guid, NULL );
if( status != IB_SUCCESS )
{
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("get_port_num failed, status: %s\n",
ib_get_err_str(status)) );
return status;
}
@@ -122,7 +130,7 @@
h_mcast = cl_zalloc( sizeof( ib_mcast_t ) );
if( !h_mcast )
{
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl, ("zalloc of
h_mcast failed\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR , ("zalloc of
h_mcast failed\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -137,7 +145,7 @@
{
if( !cl_is_blockable() )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("Thread context not blockable\n") );
__free_mcast( &h_mcast->obj );
return IB_INVALID_SETTING;
@@ -146,7 +154,7 @@
cl_status = cl_event_init( &h_mcast->event, TRUE );
if( cl_status != CL_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("unable to initialize event for sync
operation\n") );
__free_mcast( &h_mcast->obj );
return ib_convert_cl_status( cl_status );
@@ -158,7 +166,7 @@
__destroying_mcast, __cleanup_mcast, __free_mcast );
if( status != IB_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("init_al_obj returned %s\n", ib_get_err_str(
status )) );
__free_mcast( &h_mcast->obj );
return status;
@@ -178,7 +186,7 @@
if( status != IB_SUCCESS )
{
h_mcast->obj.pfn_destroy( &h_mcast->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("attach_al_obj returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -200,7 +208,7 @@
}
else
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("unable to send join request: %s\n",
ib_get_err_str(status)) );
h_mcast->obj.pfn_destroy( &h_mcast->obj, NULL );
}
@@ -210,7 +218,7 @@
* have the SA req outstanding.
*/
- CL_EXIT( AL_DBG_MCAST, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MCAST);
return status;
}
@@ -223,7 +231,7 @@
ib_user_query_t sa_mad_data;
ib_api_status_t status;
- CL_ENTER( AL_DBG_MCAST, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MCAST);
h_mcast = PARENT_STRUCT( p_obj, ib_mcast_t, obj );
@@ -268,7 +276,7 @@
if( status != IB_SUCCESS )
deref_al_obj( &h_mcast->obj );
- CL_EXIT( AL_DBG_MCAST, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MCAST);
}
@@ -279,7 +287,7 @@
ib_mcast_handle_t h_mcast;
ib_api_status_t status;
- CL_ENTER( AL_DBG_MCAST, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MCAST);
h_mcast = PARENT_STRUCT( p_obj, ib_mcast_t, obj );
@@ -291,17 +299,17 @@
*/
if( h_mcast->h_ci_mcast )
{
- CL_TRACE( AL_DBG_MCAST, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_MCAST ,
("detaching from multicast group\n") );
status = verbs_detach_mcast( h_mcast );
if( status != IB_SUCCESS )
{
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("detach failed: %s\n",
ib_get_err_str(status)) );
}
}
- CL_EXIT( AL_DBG_MCAST, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MCAST);
}
@@ -331,7 +339,7 @@
ib_user_query_t sa_mad_data;
ib_api_status_t status;
- CL_ENTER( AL_DBG_MCAST, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MCAST);
/* Set the request information. */
p_mcast->sa_reg_req.pfn_sa_req_cb = join_req_cb;
@@ -349,7 +357,7 @@
if( p_mcast_req->create )
{
- CL_TRACE( AL_DBG_MCAST, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_MCAST ,
("requesting creation of mcast group\n") );
/* Set the necessary creation components. */
@@ -397,7 +405,7 @@
status = al_send_sa_req( &p_mcast->sa_reg_req,
p_mcast->port_guid,
p_mcast_req->timeout_ms, p_mcast_req->retry_cnt,
&sa_mad_data, 0 );
- CL_EXIT( AL_DBG_MCAST, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MCAST);
return status;
}
@@ -413,7 +421,7 @@
ib_mcast_handle_t h_mcast;
ib_sa_mad_t *p_sa_mad;
- CL_ENTER( AL_DBG_MCAST, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MCAST);
h_mcast = PARENT_STRUCT( p_sa_req, ib_mcast_t, sa_reg_req );
/* Record the status of the join request. */
@@ -421,14 +429,14 @@
if( p_mad_response )
{
- CL_TRACE( AL_DBG_MCAST, g_al_dbg_lvl, ("processing
response\n") );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_MCAST ,
("processing response\n") );
p_sa_mad = (ib_sa_mad_t*)ib_get_mad_buf( p_mad_response
);
h_mcast->resp_status = p_sa_mad->status;
/* Record the join membership information. */
if( h_mcast->req_status == IB_SUCCESS )
{
- CL_TRACE( AL_DBG_MCAST, g_al_dbg_lvl, ("join
successful\n") );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_MCAST ,
("join successful\n") );
h_mcast->member_rec =
*((ib_member_rec_t*)p_sa_mad->data);
}
@@ -460,7 +468,7 @@
ib_mcast_rec_t mcast_rec;
boolean_t sync;
- CL_ENTER( AL_DBG_MCAST, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MCAST);
h_mcast = PARENT_STRUCT( p_item, ib_mcast_t, async );
@@ -527,7 +535,7 @@
else
deref_al_obj( &h_mcast->obj );
- CL_EXIT( AL_DBG_MCAST, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MCAST);
}
@@ -538,11 +546,11 @@
IN const ib_pfn_destroy_cb_t
pfn_destroy_cb OPTIONAL )
{
- CL_ENTER( AL_DBG_MCAST, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MCAST);
if( !h_mcast )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_MCAST_HANDLE\n") );
return IB_INVALID_MCAST_HANDLE;
}
@@ -565,7 +573,7 @@
{
ib_mcast_handle_t h_mcast;
- CL_ENTER( AL_DBG_MCAST, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MCAST);
h_mcast = PARENT_STRUCT( p_sa_req, ib_mcast_t, sa_dereg_req );
if( p_mad_response )
@@ -576,7 +584,7 @@
* the SA operation is complete.
*/
deref_al_obj( &h_mcast->obj );
- CL_EXIT( AL_DBG_MCAST, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MCAST);
}
@@ -621,7 +629,7 @@
if( status != IB_SUCCESS )
{
h_attach->obj.pfn_destroy( &h_attach->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("attach_al_obj returned %s.\n",
ib_get_err_str(status)) );
return status;
}
Index: core/al/al_mgr_shared.c
===================================================================
--- core/al/al_mgr_shared.c (revision 1349)
+++ core/al/al_mgr_shared.c (working copy)
@@ -33,6 +33,12 @@
#include "al.h"
#include "al_common.h"
#include "al_debug.h"
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "al_mgr_shared.tmh"
+#endif
#include "al_ci_ca.h"
#include "ib_common.h"
#include "al_debug.h"
@@ -55,7 +61,7 @@
UNUSED_PARAM( p_obj );
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("AL object %p(%s), parent: %p ref_cnt: %d\n",
p_obj, ib_get_obj_type( p_obj ), p_obj->p_parent_obj,
p_obj->ref_cnt) );
@@ -119,7 +125,7 @@
cl_list_item_t *p_list_item;
al_ci_ca_t *p_ci_ca;
- CL_ENTER( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MGR);
for( p_list_item = cl_qlist_head( &gp_al_mgr->ci_ca_list );
p_list_item != cl_qlist_end( &gp_al_mgr->ci_ca_list );
@@ -129,14 +135,14 @@
if( p_ci_ca->verbs.guid == ci_ca_guid &&
p_ci_ca->obj.state == CL_INITIALIZED )
{
- CL_TRACE( AL_DBG_MGR, g_al_dbg_lvl,
- ("find_ci_ca:CA guid %"PRIx64".\n",
ci_ca_guid) );
- CL_EXIT( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_MGR ,
+ ("find_ci_ca:CA guid %I64x.\n",
ci_ca_guid) );
+ AL_EXIT(AL_DBG_MGR);
return p_ci_ca;
}
}
- CL_EXIT( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MGR);
return NULL;
}
@@ -168,9 +174,9 @@
release_ci_ca(
IN const ib_ca_handle_t
h_ca )
{
- CL_ENTER( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MGR);
remove_ca( h_ca );
- CL_EXIT( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MGR);
}
@@ -179,12 +185,12 @@
add_ci_ca(
IN al_ci_ca_t* const
p_ci_ca )
{
- CL_ENTER( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MGR);
cl_spinlock_acquire( &gp_al_mgr->obj.lock );
cl_qlist_insert_tail( &gp_al_mgr->ci_ca_list,
&p_ci_ca->list_item );
ref_al_obj( &gp_al_mgr->obj );
cl_spinlock_release( &gp_al_mgr->obj.lock );
- CL_EXIT( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MGR);
}
@@ -192,12 +198,12 @@
remove_ci_ca(
IN al_ci_ca_t* const
p_ci_ca )
{
- CL_ENTER( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MGR);
cl_spinlock_acquire( &gp_al_mgr->obj.lock );
cl_qlist_remove_item( &gp_al_mgr->ci_ca_list,
&p_ci_ca->list_item );
cl_spinlock_release( &gp_al_mgr->obj.lock );
deref_al_obj( &gp_al_mgr->obj );
- CL_EXIT( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MGR);
}
@@ -244,7 +250,7 @@
ib_ca_attr_t *p_ca_attr = NULL;
ib_port_attr_t *p_port_attr = NULL;
- CL_ENTER( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MGR);
CL_ASSERT( h_al && p_gid && p_guid );
@@ -331,7 +337,7 @@
if ( p_guid_array )
cl_free( p_guid_array );
- CL_EXIT( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MGR);
return status;
}
@@ -345,22 +351,22 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MGR);
if( AL_OBJ_INVALID_HANDLE( h_al, AL_OBJ_TYPE_H_AL ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_AL_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_AL_HANDLE\n") );
return IB_INVALID_AL_HANDLE;
}
if( !p_gid || !p_ca_guid )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
status = __get_guid_by_gid( h_al, p_gid, SEARCH_CA_GUID,
p_ca_guid );
- CL_EXIT( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MGR);
return status;
}
@@ -374,22 +380,22 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MGR);
if( AL_OBJ_INVALID_HANDLE( h_al, AL_OBJ_TYPE_H_AL ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_AL_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_AL_HANDLE\n") );
return IB_INVALID_AL_HANDLE;
}
if( !p_gid || !p_port_guid )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
status = __get_guid_by_gid( h_al, p_gid, SEARCH_PORT_GUID,
p_port_guid );
- CL_EXIT( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MGR);
return status;
}
@@ -408,16 +414,16 @@
al_ci_ca_t *p_ci_ca;
uintn_t guid_cnt;
- CL_ENTER( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MGR);
if( AL_OBJ_INVALID_HANDLE( h_al, AL_OBJ_TYPE_H_AL ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_AL_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_AL_HANDLE\n") );
return IB_INVALID_AL_HANDLE;
}
if( !p_guid_cnt )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -439,7 +445,7 @@
/* Return the actual count. */
*p_guid_cnt = guid_cnt;
- CL_EXIT( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MGR);
return IB_INSUFFICIENT_MEMORY;
}
@@ -459,7 +465,7 @@
/* Allow CA additions or removals. */
cl_spinlock_release( &gp_al_mgr->obj.lock );
- CL_EXIT( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MGR);
return IB_SUCCESS;
}
@@ -496,7 +502,7 @@
al_ci_ca_t *p_ci_ca;
ib_api_status_t status;
- CL_ENTER( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MGR);
/* Prevent CA additions or removals. */
cl_spinlock_acquire( &gp_al_mgr->obj.lock );
@@ -506,7 +512,7 @@
index >= cl_qlist_count( &gp_al_mgr->ci_ca_list ) )
{
cl_spinlock_release( &gp_al_mgr->obj.lock );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_INDEX\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_INDEX\n") );
return IB_INVALID_INDEX;
}
@@ -534,7 +540,7 @@
cl_spinlock_release( &gp_al_mgr->obj.lock );
- CL_EXIT( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MGR);
return status;
}
@@ -564,7 +570,7 @@
al_ci_ca_t *p_ci_ca;
ib_api_status_t status;
- CL_ENTER( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MGR);
/* Prevent CA additions or removals. */
cl_spinlock_acquire( &gp_al_mgr->obj.lock );
@@ -611,7 +617,7 @@
status = IB_INVALID_INDEX;
}
- CL_EXIT( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MGR);
return status;
}
@@ -627,16 +633,16 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MGR);
if( AL_OBJ_INVALID_HANDLE( h_al, AL_OBJ_TYPE_H_AL ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_AL_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_AL_HANDLE\n") );
return IB_INVALID_AL_HANDLE;
}
if( !p_guid )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -651,16 +657,16 @@
break;
case IB_PNP_IOC:
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IOC GUIDs not supported at this time\n") );
return IB_UNSUPPORTED;
default:
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_SETTING\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_SETTING\n") );
return IB_INVALID_SETTING;
}
- CL_EXIT( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MGR);
return status;
}
Index: core/al/al_mr_shared.c
===================================================================
--- core/al/al_mr_shared.c (revision 1349)
+++ core/al/al_mr_shared.c (working copy)
@@ -33,6 +33,12 @@
#include <iba/ib_al.h>
#include "al.h"
#include "al_debug.h"
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "al_mr_shared.tmh"
+#endif
#include "al_mr.h"
#include "al_pd.h"
#include "al_res_mgr.h"
@@ -160,11 +166,11 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_MR, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MR);
if( AL_OBJ_INVALID_HANDLE( h_pd, AL_OBJ_TYPE_H_PD ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PD_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PD_HANDLE\n") );
return IB_INVALID_PD_HANDLE;
}
@@ -192,11 +198,11 @@
ib_mr_handle_t h_mr;
ib_api_status_t status;
- CL_ENTER( AL_DBG_MR, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MR);
if( !p_mr_create || !p_lkey || !p_rkey || !ph_mr )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -204,7 +210,7 @@
h_mr = alloc_mr();
if( !h_mr )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("unable to allocate memory handle\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -213,7 +219,7 @@
if( status != IB_SUCCESS )
{
h_mr->obj.pfn_destroy( &h_mr->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("attach_al_obj returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -223,14 +229,14 @@
if( status != IB_SUCCESS )
{
h_mr->obj.pfn_destroy( &h_mr->obj, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("unable to register memory: %s\n",
ib_get_err_str(status)) );
return status;
}
*ph_mr = h_mr;
- CL_EXIT( AL_DBG_MR, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MR);
return IB_SUCCESS;
}
@@ -264,16 +270,16 @@
ib_mr_handle_t h_mr;
ib_api_status_t status;
- CL_ENTER( AL_DBG_MR, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MR);
if( AL_OBJ_INVALID_HANDLE( h_pd, AL_OBJ_TYPE_H_PD ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PD_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PD_HANDLE\n") );
return IB_INVALID_PD_HANDLE;
}
if( !p_vaddr || !p_lkey || !p_rkey || !ph_mr )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -281,7 +287,7 @@
h_mr = alloc_mr();
if( !h_mr )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("unable to allocate memory handle\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -290,7 +296,7 @@
if( status != IB_SUCCESS )
{
h_mr->obj.pfn_destroy( &h_mr->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("attach_al_obj returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -300,7 +306,7 @@
p_lkey, p_rkey, h_mr );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("unable to register memory: %s\n",
ib_get_err_str(status)) );
h_mr->obj.pfn_destroy( &h_mr->obj, NULL );
return status;
@@ -311,7 +317,7 @@
/* Release the reference taken in alloc_mr for initialization.
*/
deref_al_obj( &h_mr->obj );
- CL_EXIT( AL_DBG_MR, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MR);
return IB_SUCCESS;
}
@@ -328,7 +334,7 @@
{
if( AL_OBJ_INVALID_HANDLE( h_mr, AL_OBJ_TYPE_H_MR ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_MR_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_MR_HANDLE\n") );
return IB_INVALID_MR_HANDLE;
}
@@ -349,24 +355,24 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_MR, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MR);
if( ( mr_mod_mask & IB_MR_MOD_PD ) )
{
if( AL_OBJ_INVALID_HANDLE( h_pd, AL_OBJ_TYPE_H_PD ) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
("IB_INVALID_PD_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_INVALID_PD_HANDLE\n") );
return IB_INVALID_PD_HANDLE;
}
if( h_pd->obj.h_al != h_mr->obj.h_al )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
("IB_INVALID_PD_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_INVALID_PD_HANDLE\n") );
return IB_INVALID_PD_HANDLE;
}
}
if( !p_lkey || !p_rkey )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -377,14 +383,14 @@
/* If we're changing the PD, we need to update the object
hierarchy. */
if( h_pd && (status == IB_SUCCESS) )
{
- CL_TRACE( AL_DBG_MR, g_al_dbg_lvl, ("associating MR with
new PD\n") );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_MR ,
("associating MR with new PD\n") );
detach_al_obj( &h_mr->obj );
deref_al_obj( h_mr->obj.p_parent_obj );
status = attach_al_obj( &h_pd->obj, &h_mr->obj );
CL_ASSERT( status );
}
- CL_EXIT( AL_DBG_MR, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MR);
return status;
}
@@ -418,29 +424,29 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_MR, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MR);
if( AL_OBJ_INVALID_HANDLE( h_mr, AL_OBJ_TYPE_H_MR ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_MR_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_MR_HANDLE\n") );
return IB_INVALID_MR_HANDLE;
}
if( ( mr_mod_mask & IB_MR_MOD_PD ) )
{
if( AL_OBJ_INVALID_HANDLE( h_pd, AL_OBJ_TYPE_H_PD ) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
("IB_INVALID_PD_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_INVALID_PD_HANDLE\n") );
return IB_INVALID_PD_HANDLE;
}
if( h_pd->obj.p_parent_obj !=
h_mr->obj.p_parent_obj->p_parent_obj )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
("IB_INVALID_PD_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_INVALID_PD_HANDLE\n") );
return IB_INVALID_PD_HANDLE;
}
}
if( !p_vaddr || !p_lkey || !p_rkey )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -451,14 +457,14 @@
/* If we're changing the PD, we need to update the object
hierarchy. */
if( h_pd && (status == IB_SUCCESS) )
{
- CL_TRACE( AL_DBG_MR, g_al_dbg_lvl, ("associating MR with
new PD\n") );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_MR ,
("associating MR with new PD\n") );
detach_al_obj( &h_mr->obj );
deref_al_obj( h_mr->obj.p_parent_obj );
status = attach_al_obj( &h_pd->obj, &h_mr->obj );
CL_ASSERT( status );
}
- CL_EXIT( AL_DBG_MR, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MR);
return status;
}
@@ -478,12 +484,12 @@
if( AL_OBJ_INVALID_HANDLE( h_mr, AL_OBJ_TYPE_H_MR ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_MR_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_MR_HANDLE\n") );
return IB_INVALID_MR_HANDLE;
}
if( AL_OBJ_INVALID_HANDLE( h_pd, AL_OBJ_TYPE_H_PD ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PD_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PD_HANDLE\n") );
return IB_INVALID_PD_HANDLE;
}
@@ -513,11 +519,11 @@
ib_mr_handle_t h_new_mr;
ib_api_status_t status;
- CL_ENTER( AL_DBG_MR, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MR);
if( !p_vaddr || !p_lkey || !p_rkey || !ph_mr )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -525,7 +531,7 @@
h_new_mr = alloc_mr();
if( !h_new_mr )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("unable to allocate memory handle\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -534,7 +540,7 @@
if( status != IB_SUCCESS )
{
h_new_mr->obj.pfn_destroy( &h_new_mr->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("attach_al_obj returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -545,14 +551,14 @@
if( status != IB_SUCCESS )
{
h_new_mr->obj.pfn_destroy( &h_new_mr->obj, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("unable to register memory: %s\n",
ib_get_err_str(status)) );
return status;
}
*ph_mr = h_new_mr;
- CL_EXIT( AL_DBG_MR, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MR);
return IB_SUCCESS;
}
@@ -564,11 +570,11 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_MR, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MR);
if( AL_OBJ_INVALID_HANDLE( h_mr, AL_OBJ_TYPE_H_MR ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_MR_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_MR_HANDLE\n") );
return IB_INVALID_MR_HANDLE;
}
@@ -578,7 +584,7 @@
if( status != IB_SUCCESS )
deref_al_obj( &h_mr->obj );
- CL_EXIT( AL_DBG_MR, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MR);
return status;
}
@@ -594,7 +600,7 @@
if( !verbs_check_mr(h_mr) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_MR_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_MR_HANDLE\n") );
return IB_INVALID_MR_HANDLE;
}
@@ -617,7 +623,7 @@
h_mr->obj.pfn_destroy( &h_mr->obj, NULL );
}
- CL_EXIT( AL_DBG_MR, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MR);
return status;
}
@@ -630,16 +636,16 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_MR, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MR);
if( AL_OBJ_INVALID_HANDLE( h_mr, AL_OBJ_TYPE_H_MR ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_MR_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_MR_HANDLE\n") );
return IB_INVALID_MR_HANDLE;
}
if( !p_mr_attr )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -652,10 +658,10 @@
}
else
{
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("unable to query memory region: %s\n",
ib_get_err_str(status)) );
}
- CL_EXIT( AL_DBG_MR, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MR);
return status;
}
Index: core/al/al_mw.c
===================================================================
--- core/al/al_mw.c (revision 1349)
+++ core/al/al_mw.c (working copy)
@@ -33,6 +33,12 @@
#include <iba/ib_al.h>
#include "al_debug.h"
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "al_mw.tmh"
+#endif
#include "al_mw.h"
#include "al_pd.h"
#include "al_verbs.h"
@@ -66,7 +72,7 @@
if( !p_rkey || !ph_mw )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -94,7 +100,7 @@
if( status != IB_SUCCESS )
{
h_mw->obj.pfn_destroy( &h_mw->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("attach_al_obj returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -123,11 +129,11 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_MW, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MW);
if( AL_OBJ_INVALID_HANDLE( h_mw, AL_OBJ_TYPE_H_MW ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_MW_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_MW_HANDLE\n") );
return IB_INVALID_MW_HANDLE;
}
@@ -138,7 +144,7 @@
if( status != IB_SUCCESS )
deref_al_obj( &h_mw->obj );
- CL_EXIT( AL_DBG_MW, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MW);
return status;
}
@@ -150,11 +156,11 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_MW, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MW);
if( !verbs_check_mw( h_mw ) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("IB_INVALID_MW_HANDLE\n")
);
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_INVALID_MW_HANDLE\n") );
return IB_INVALID_MW_HANDLE;
}
@@ -226,16 +232,16 @@
ib_pd_handle_t h_ci_pd;
ib_api_status_t status;
- CL_ENTER( AL_DBG_MW, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MW);
if( AL_OBJ_INVALID_HANDLE( h_mw, AL_OBJ_TYPE_H_MW ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_MW_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_MW_HANDLE\n") );
return IB_INVALID_MW_HANDLE;
}
if( !ph_pd || !p_rkey )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -248,6 +254,6 @@
CL_ASSERT( (*ph_pd)->h_ci_pd == h_ci_pd );
}
- CL_EXIT( AL_DBG_MW, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MW);
return status;
}
Index: core/al/al_pd.c
===================================================================
--- core/al/al_pd.c (revision 1349)
+++ core/al/al_pd.c (working copy)
@@ -37,6 +37,12 @@
#include "al_ca.h"
#include "al_cq.h"
#include "al_debug.h"
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "al_pd.tmh"
+#endif
#include "al_mgr.h"
#include "al_mr.h"
#include "al_mw.h"
@@ -79,7 +85,7 @@
if( !ph_pd )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -109,7 +115,7 @@
if( status != IB_SUCCESS )
{
h_pd->obj.pfn_destroy( &h_pd->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("attach_al_obj returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -151,18 +157,18 @@
IN const ib_pd_handle_t
h_pd,
IN const ib_pfn_destroy_cb_t
pfn_destroy_cb OPTIONAL )
{
- CL_ENTER( AL_DBG_PD, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_PD);
if( AL_OBJ_INVALID_HANDLE( h_pd, AL_OBJ_TYPE_H_PD ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PD_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PD_HANDLE\n") );
return IB_INVALID_PD_HANDLE;
}
ref_al_obj( &h_pd->obj );
h_pd->obj.pfn_destroy( &h_pd->obj, pfn_destroy_cb );
- CL_EXIT( AL_DBG_PD, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_PD);
return IB_SUCCESS;
}
@@ -265,11 +271,11 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_QP, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_QP);
if( AL_OBJ_INVALID_HANDLE( h_pd, AL_OBJ_TYPE_H_PD ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PD_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PD_HANDLE\n") );
return IB_INVALID_PD_HANDLE;
}
@@ -280,7 +286,7 @@
if( status == IB_SUCCESS )
deref_al_obj( &(*ph_qp)->obj );
- CL_EXIT( AL_DBG_QP, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_QP);
return status;
}
@@ -298,11 +304,11 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_QP, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_QP);
if( AL_OBJ_INVALID_HANDLE( h_pd, AL_OBJ_TYPE_H_PD ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PD_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PD_HANDLE\n") );
return IB_INVALID_PD_HANDLE;
}
@@ -313,7 +319,7 @@
if( status == IB_SUCCESS )
deref_al_obj( &(*ph_qp)->obj );
- CL_EXIT( AL_DBG_QP, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_QP);
return status;
}
@@ -327,11 +333,11 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_AV, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_AV);
if( AL_OBJ_INVALID_HANDLE( h_pd, AL_OBJ_TYPE_H_PD ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PD_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PD_HANDLE\n") );
return IB_INVALID_PD_HANDLE;
}
@@ -341,7 +347,7 @@
if( status == IB_SUCCESS )
deref_al_obj( &(*ph_av)->obj );
- CL_EXIT( AL_DBG_AV, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_AV);
return status;
}
@@ -355,11 +361,11 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_MW, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MW);
if( AL_OBJ_INVALID_HANDLE( h_pd, AL_OBJ_TYPE_H_PD ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PD_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PD_HANDLE\n") );
return IB_INVALID_PD_HANDLE;
}
@@ -368,7 +374,7 @@
if( status == IB_SUCCESS )
deref_al_obj( &(*ph_mw)->obj );
- CL_EXIT( AL_DBG_MW, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MW);
return status;
}
Index: core/al/al_qp.c
===================================================================
--- core/al/al_qp.c (revision 1349)
+++ core/al/al_qp.c (working copy)
@@ -40,6 +40,12 @@
#include "al_cm_cep.h"
#include "al_cq.h"
#include "al_debug.h"
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "al_qp.tmh"
+#endif
#include "al_mad.h"
#include "al_mad_pool.h"
#include "al_mcast.h"
@@ -284,7 +290,7 @@
if( !p_qp_create || !ph_qp )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -377,7 +383,7 @@
if( !p_qp_create || !ph_qp )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -990,18 +996,18 @@
IN const ib_qp_handle_t
h_qp,
IN const ib_pfn_destroy_cb_t
pfn_destroy_cb OPTIONAL )
{
- CL_ENTER( AL_DBG_QP, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_QP);
if( AL_OBJ_INVALID_HANDLE( h_qp, AL_OBJ_TYPE_H_QP ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_QP_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_QP_HANDLE\n") );
return IB_INVALID_QP_HANDLE;
}
ref_al_obj( &h_qp->obj );
h_qp->obj.pfn_destroy( &h_qp->obj, pfn_destroy_cb );
- CL_EXIT( AL_DBG_QP, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_QP);
return IB_SUCCESS;
}
@@ -1061,7 +1067,7 @@
status = dereg_mad_pool( p_qp_alias->pool_key,
AL_KEY_ALIAS );
if( status != IB_SUCCESS )
{
- AL_TRACE( AL_DBG_ERROR, ("dereg_mad_pool
returned %s.\n",
+ AL_PRINT(TRACE_LEVEL_ERROR
,AL_DBG_ERROR, ("dereg_mad_pool returned %s.\n",
ib_get_err_str(status)) );
deref_al_obj( &p_qp_alias->pool_key->obj
);
}
@@ -1131,7 +1137,7 @@
status = verbs_destroy_qp( h_qp );
if( status != IB_SUCCESS )
{
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("verbs_destroy_qp failed with status
%s.\n",
ib_get_err_str(status)) );
}
@@ -1233,23 +1239,23 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_QP, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_QP);
if( AL_OBJ_INVALID_HANDLE( h_qp, AL_OBJ_TYPE_H_QP ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_QP_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_QP_HANDLE\n") );
return IB_INVALID_QP_HANDLE;
}
if( !p_qp_attr )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
status = verbs_query_qp( h_qp, p_qp_attr );
if( status != IB_SUCCESS )
{
- CL_EXIT( AL_DBG_QP, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_QP);
return status;
}
@@ -1259,7 +1265,7 @@
p_qp_attr->h_sq_cq = h_qp->h_send_cq;
p_qp_attr->qp_type = h_qp->type;
- CL_EXIT( AL_DBG_QP, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_QP);
return IB_SUCCESS;
}
@@ -1283,22 +1289,22 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_QP, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_QP);
if( AL_OBJ_INVALID_HANDLE( h_qp, AL_OBJ_TYPE_H_QP ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_QP_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_QP_HANDLE\n") );
return IB_INVALID_QP_HANDLE;
}
if( !p_qp_mod )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
status = h_qp->pfn_modify_qp( h_qp, p_qp_mod, p_umv_buf );
- CL_EXIT( AL_DBG_QP, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_QP);
return status;
}
@@ -1347,11 +1353,11 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_QP, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_QP);
if( AL_OBJ_INVALID_HANDLE( h_qp, AL_OBJ_TYPE_H_QP ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_QP_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_QP_HANDLE\n") );
return IB_INVALID_QP_HANDLE;
}
@@ -1367,20 +1373,20 @@
case IB_QPT_MAD:
if( !p_dgrm_info )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
break;
default:
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
status = h_qp->pfn_init_dgrm_svc( h_qp, p_dgrm_info );
- CL_EXIT( AL_DBG_QP, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_QP);
return status;
}
@@ -1504,11 +1510,11 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_SVC);
if( AL_OBJ_INVALID_HANDLE( h_qp, AL_OBJ_TYPE_H_QP ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_QP_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_QP_HANDLE\n") );
return IB_INVALID_QP_HANDLE;
}
@@ -1518,7 +1524,7 @@
if( status == IB_SUCCESS )
deref_al_obj( &(*ph_mad_svc)->obj );
- CL_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_SVC);
return status;
}
@@ -1530,22 +1536,22 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_MCAST, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MCAST);
if( AL_OBJ_INVALID_HANDLE( h_qp, AL_OBJ_TYPE_H_QP ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_QP_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_QP_HANDLE\n") );
return IB_INVALID_QP_HANDLE;
}
if( !p_mcast_req )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
status = h_qp->pfn_join_mcast( h_qp, p_mcast_req );
- CL_EXIT( AL_DBG_MCAST, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MCAST);
return status;
}
@@ -1565,16 +1571,16 @@
PERF_DECLARE( PostSend );
cl_perf_start( IbPostSend );
- CL_ENTER( AL_DBG_QP, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_QP);
if( AL_OBJ_INVALID_HANDLE( h_qp, AL_OBJ_TYPE_H_QP ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_QP_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_QP_HANDLE\n") );
return IB_INVALID_QP_HANDLE;
}
if( !p_send_wr || ( p_send_wr->p_next && !pp_send_failure ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -1583,7 +1589,7 @@
h_qp->pfn_post_send( h_qp->h_send_qp, p_send_wr,
pp_send_failure );
cl_perf_stop( &g_perf, PostSend );
- CL_EXIT( AL_DBG_QP, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_QP);
cl_perf_stop( &g_perf, IbPostSend );
return status;
}
@@ -1777,23 +1783,23 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_QP, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_QP);
if( AL_OBJ_INVALID_HANDLE( h_qp, AL_OBJ_TYPE_H_QP ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_QP_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_QP_HANDLE\n") );
return IB_INVALID_QP_HANDLE;
}
if( !p_recv_wr || ( p_recv_wr->p_next && !pp_recv_failure ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
status =
h_qp->pfn_post_recv( h_qp->h_recv_qp, p_recv_wr,
pp_recv_failure );
- CL_EXIT( AL_DBG_QP, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_QP);
return status;
}
@@ -2052,21 +2058,21 @@
ib_mr_handle_t h_mr;
ib_api_status_t status;
- CL_ENTER( AL_DBG_MW, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MW);
if( AL_OBJ_INVALID_HANDLE( h_mw, AL_OBJ_TYPE_H_MW ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_MW_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_MW_HANDLE\n") );
return IB_INVALID_MW_HANDLE;
}
if( AL_OBJ_INVALID_HANDLE( h_qp, AL_OBJ_TYPE_H_QP ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_QP_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_QP_HANDLE\n") );
return IB_INVALID_QP_HANDLE;
}
if( !p_mw_bind || !p_rkey )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -2078,6 +2084,6 @@
p_mw_bind->h_mr = h_mr;
- CL_EXIT( AL_DBG_MW, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MW);
return status;
}
Index: core/al/al_query.c
===================================================================
--- core/al/al_query.c (revision 1349)
+++ core/al/al_query.c (working copy)
@@ -37,6 +37,13 @@
#include "al_ca.h"
#include "al_common.h"
#include "al_debug.h"
+
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "al_query.tmh"
+#endif
#include "al_mgr.h"
#include "al_query.h"
#include "ib_common.h"
@@ -66,21 +73,21 @@
al_query_t *p_query;
ib_api_status_t status;
- CL_ENTER( AL_DBG_QUERY, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_QUERY);
if( AL_OBJ_INVALID_HANDLE( h_al, AL_OBJ_TYPE_H_AL ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_AL_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_AL_HANDLE\n") );
return IB_INVALID_AL_HANDLE;
}
if( !p_query_req )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
if( (p_query_req->flags & IB_FLAGS_SYNC) && !cl_is_blockable() )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("IB_UNSUPPORTED\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_UNSUPPORTED\n") );
return IB_UNSUPPORTED;
}
@@ -88,7 +95,7 @@
p_query = cl_zalloc( sizeof( al_query_t ) );
if( !p_query )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("insufficient memory\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("insufficient memory\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -112,7 +119,7 @@
status = query_sa( p_query, p_query_req, p_query_req->flags );
if( status != IB_SUCCESS && status != IB_INVALID_GUID )
{
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("query_sa failed: %s\n", ib_get_err_str(status)
) );
}
@@ -123,7 +130,7 @@
cl_free( p_query );
}
- CL_EXIT( AL_DBG_QUERY, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_QUERY);
return status;
}
@@ -149,7 +156,7 @@
} rec;
ib_api_status_t status;
- CL_ENTER( AL_DBG_QUERY, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_QUERY);
cl_memclr( &rec, sizeof(rec) );
@@ -161,7 +168,7 @@
switch( p_query_req->query_type )
{
case IB_QUERY_USER_DEFINED:
- CL_TRACE( AL_DBG_QUERY, g_al_dbg_lvl, ("USER_DEFINED\n")
);
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_QUERY ,
("USER_DEFINED\n") );
p_sa_req = (ib_user_query_t*
__ptr64)p_query_req->p_query_input;
if( !p_sa_req->method )
{
@@ -171,7 +178,7 @@
break;
case IB_QUERY_ALL_SVC_RECS:
- CL_TRACE( AL_DBG_QUERY, g_al_dbg_lvl,
("IB_QUERY_ALL_SVC_RECS\n") );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_QUERY ,
("IB_QUERY_ALL_SVC_RECS\n") );
sa_req.attr_id = IB_MAD_ATTR_SERVICE_RECORD;
sa_req.attr_size = sizeof( ib_service_record_t );
sa_req.comp_mask = 0;
@@ -179,7 +186,7 @@
break;
case IB_QUERY_SVC_REC_BY_NAME:
- CL_TRACE( AL_DBG_QUERY, g_al_dbg_lvl,
("SVC_REC_BY_NAME\n") );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_QUERY ,
("SVC_REC_BY_NAME\n") );
sa_req.attr_id = IB_MAD_ATTR_SERVICE_RECORD;
sa_req.attr_size = sizeof( ib_service_record_t );
sa_req.comp_mask = IB_SR_COMPMASK_SNAME;
@@ -189,7 +196,7 @@
break;
case IB_QUERY_SVC_REC_BY_ID:
- CL_TRACE( AL_DBG_QUERY, g_al_dbg_lvl,
("SVC_REC_BY_ID\n") );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_QUERY ,
("SVC_REC_BY_ID\n") );
sa_req.attr_id = IB_MAD_ATTR_SERVICE_RECORD;
sa_req.attr_size = sizeof( ib_service_record_t );
sa_req.comp_mask = IB_SR_COMPMASK_SID;
@@ -198,7 +205,7 @@
break;
case IB_QUERY_CLASS_PORT_INFO:
- CL_TRACE( AL_DBG_QUERY, g_al_dbg_lvl,
("IB_QUERY_CLASS_PORT_INFO\n") );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_QUERY ,
("IB_QUERY_CLASS_PORT_INFO\n") );
sa_req.method = IB_MAD_METHOD_GET;
sa_req.attr_id = IB_MAD_ATTR_CLASS_PORT_INFO;
sa_req.attr_size = sizeof( ib_class_port_info_t );
@@ -207,7 +214,7 @@
break;
case IB_QUERY_NODE_REC_BY_NODE_GUID:
- CL_TRACE( AL_DBG_QUERY, g_al_dbg_lvl,
("NODE_REC_BY_NODE_GUID\n") );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_QUERY ,
("NODE_REC_BY_NODE_GUID\n") );
/*
* 15.2.5.2:
* if >1 ports on of a CA/RTR the subnet return multiple
@@ -222,7 +229,7 @@
break;
case IB_QUERY_PORT_REC_BY_LID:
- CL_TRACE( AL_DBG_QUERY, g_al_dbg_lvl,
("PORT_REC_BY_LID\n") );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_QUERY ,
("PORT_REC_BY_LID\n") );
sa_req.attr_id = IB_MAD_ATTR_PORTINFO_RECORD;
sa_req.attr_size = sizeof( ib_portinfo_record_t );
sa_req.comp_mask = IB_PIR_COMPMASK_BASELID;
@@ -232,7 +239,7 @@
break;
case IB_QUERY_PATH_REC_BY_PORT_GUIDS:
- CL_TRACE( AL_DBG_QUERY, g_al_dbg_lvl,
("PATH_REC_BY_PORT_GUIDS\n") );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_QUERY ,
("PATH_REC_BY_PORT_GUIDS\n") );
sa_req.attr_id = IB_MAD_ATTR_PATH_RECORD;
sa_req.attr_size = sizeof( ib_path_rec_t );
sa_req.comp_mask = (IB_PR_COMPMASK_DGID |
@@ -246,7 +253,7 @@
break;
case IB_QUERY_PATH_REC_BY_GIDS:
- CL_TRACE( AL_DBG_QUERY, g_al_dbg_lvl,
("PATH_REC_BY_GIDS\n") );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_QUERY ,
("PATH_REC_BY_GIDS\n") );
sa_req.attr_id = IB_MAD_ATTR_PATH_RECORD;
sa_req.attr_size = sizeof( ib_path_rec_t );
sa_req.comp_mask = (IB_PR_COMPMASK_DGID |
@@ -260,7 +267,7 @@
break;
case IB_QUERY_PATH_REC_BY_LIDS:
- CL_TRACE( AL_DBG_QUERY, g_al_dbg_lvl,
("PATH_REC_BY_LIDS\n") );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_QUERY ,
("PATH_REC_BY_LIDS\n") );
/* SGID must be provided for GET_TABLE requests. */
sa_req.method = IB_MAD_METHOD_GET;
sa_req.attr_id = IB_MAD_ATTR_PATH_RECORD;
@@ -278,7 +285,7 @@
break;
default:
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("UNKNOWN\n")
);
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("UNKNOWN\n") );
CL_ASSERT( p_query_req->query_type ==
IB_QUERY_USER_DEFINED ||
p_query_req->query_type == IB_QUERY_ALL_SVC_RECS
||
p_query_req->query_type ==
IB_QUERY_SVC_REC_BY_NAME ||
@@ -296,7 +303,7 @@
status = al_send_sa_req(
&p_query->sa_req, p_query_req->port_guid,
p_query_req->timeout_ms,
p_query_req->retry_cnt, p_sa_req, flags );
- CL_EXIT( AL_DBG_QUERY, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_QUERY);
return status;
}
@@ -314,7 +321,7 @@
ib_query_rec_t query_rec;
ib_sa_mad_t *p_sa_mad;
- CL_ENTER( AL_DBG_QUERY, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_QUERY);
p_query = PARENT_STRUCT( p_sa_req, al_query_t, sa_req );
/* Initialize the results of the query. */
@@ -326,7 +333,7 @@
/* Form the result of the query, if we got one. */
if( query_rec.status == IB_SUCCESS )
{
- CL_TRACE( AL_DBG_QUERY, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_QUERY ,
("query succeeded\n") );
CL_ASSERT( p_mad_response );
@@ -347,7 +354,7 @@
}
else
{
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("query failed: %s\n",
ib_get_err_str(query_rec.status) ) );
if( p_mad_response )
query_rec.p_result_mad = p_mad_response;
@@ -367,5 +374,5 @@
al_remove_query( p_query );
cl_free( p_query );
- CL_EXIT( AL_DBG_QUERY, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_QUERY);
}
Index: core/al/al_reg_svc.c
===================================================================
--- core/al/al_reg_svc.c (revision 1349)
+++ core/al/al_reg_svc.c (working copy)
@@ -34,6 +34,12 @@
#include "al.h"
#include "al_debug.h"
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "al_reg_svc.tmh"
+#endif
#include "al_reg_svc.h"
#include "ib_common.h"
#include "al_mgr.h"
@@ -262,12 +268,12 @@
if( AL_OBJ_INVALID_HANDLE( h_al, AL_OBJ_TYPE_H_AL ) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("IB_INVALID_AL_HANDLE\n")
);
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_INVALID_AL_HANDLE\n") );
return IB_INVALID_AL_HANDLE;
}
if( !p_reg_svc_req )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("IB_INVALID_PARAMETER\n")
);
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -285,7 +291,7 @@
__destroying_sa_reg, NULL, __free_sa_reg );
if( status != IB_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("init_al_obj returned %s.\n", ib_get_err_str(
status )) );
__free_sa_reg( &h_sa_reg->obj );
return status;
@@ -296,7 +302,7 @@
if( status != IB_SUCCESS )
{
h_sa_reg->obj.pfn_destroy( &h_sa_reg->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("attach_al_obj returned %s.\n", ib_get_err_str(
status )) );
return status;
}
@@ -315,7 +321,7 @@
status = sa_reg_svc( h_sa_reg, p_reg_svc_req );
if( status != IB_SUCCESS )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("sa_reg_svc failed: %s\n",
ib_get_err_str(status) ) );
h_sa_reg->state = SA_REG_ERROR;
@@ -340,7 +346,7 @@
if( !h_reg_svc )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("IB_INVALID_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_INVALID_HANDLE\n") );
return IB_INVALID_HANDLE;
}
Index: core/al/al_res_mgr.c
===================================================================
--- core/al/al_res_mgr.c (revision 1349)
+++ core/al/al_res_mgr.c (working copy)
@@ -37,7 +37,14 @@
#include "al_res_mgr.h"
#include "al_debug.h"
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "al_res_mgr.tmh"
+#endif
+
#define AL_MR_POOL_SIZE (4096 / sizeof( ib_mr_t
))
#define AL_AV_POOL_SIZE (4096 / sizeof( ib_av_t
))
@@ -81,7 +88,7 @@
if( status != IB_SUCCESS )
{
gp_res_mgr->obj.pfn_destroy( &gp_res_mgr->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("attach_al_obj returned %s.\n",
ib_get_err_str(status)) );
return status;
}
Index: core/al/al_sub.c
===================================================================
--- core/al/al_sub.c (revision 1349)
+++ core/al/al_sub.c (working copy)
@@ -35,6 +35,12 @@
#include "al.h"
#include "al_common.h"
#include "al_debug.h"
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "al_sub.tmh"
+#endif
#include "al_sub.h"
@@ -46,22 +52,22 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_SUB, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SUB);
if( AL_OBJ_INVALID_HANDLE( h_al, AL_OBJ_TYPE_H_AL ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_AL_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_AL_HANDLE\n") );
return IB_INVALID_AL_HANDLE;
}
if( !p_sub_req || !ph_sub )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
status = IB_UNSUPPORTED;
- CL_EXIT( AL_DBG_SUB, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SUB);
return status;
}
@@ -71,16 +77,16 @@
IN const ib_sub_handle_t
h_sub,
IN const ib_pfn_destroy_cb_t
pfn_destroy_cb OPTIONAL )
{
- CL_ENTER( AL_DBG_SUB, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SUB);
if( !h_sub )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("IB_INVALID_HANDLE\n") );
return IB_INVALID_HANDLE;
}
UNUSED_PARAM( pfn_destroy_cb );
- CL_EXIT( AL_DBG_SUB, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SUB);
return IB_UNSUPPORTED;
}
Index: core/al/kernel/al_ci_ca.c
===================================================================
--- core/al/kernel/al_ci_ca.c (revision 1349)
+++ core/al/kernel/al_ci_ca.c (working copy)
@@ -34,6 +34,12 @@
#include "al_verbs.h"
#include "al_cq.h"
#include "al_debug.h"
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "al_ci_ca.tmh"
+#endif
#include "al_mad_pool.h"
#include "al_mgr.h"
#include "al_mr.h"
@@ -83,7 +89,7 @@
cl_status_t cl_status;
al_ci_ca_t *p_ci_ca;
- CL_ENTER( AL_DBG_CA, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CA);
CL_ASSERT( p_ci );
@@ -91,7 +97,7 @@
p_ci_ca = (al_ci_ca_t*)cl_zalloc( sizeof( al_ci_ca_t ) );
if( !p_ci_ca )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("cl_zalloc failed\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -108,7 +114,7 @@
if( cl_status != CL_SUCCESS )
{
free_ci_ca( &p_ci_ca->obj );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("cl_spinlock_init failed, status = 0x%x.\n",
ib_convert_cl_status( cl_status ) ) );
return ib_convert_cl_status( cl_status );
@@ -121,7 +127,7 @@
if( cl_status != CL_SUCCESS )
{
free_ci_ca( &p_ci_ca->obj );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("cl_qpool_init failed, status = 0x%x.\n",
ib_convert_cl_status( cl_status ) ) );
return ib_convert_cl_status( cl_status );
@@ -132,7 +138,7 @@
if( status != IB_SUCCESS )
{
free_ci_ca( &p_ci_ca->obj );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("init_al_obj failed, status = 0x%x.\n", status)
);
return status;
}
@@ -140,7 +146,7 @@
if( status != IB_SUCCESS )
{
p_ci_ca->obj.pfn_destroy( &p_ci_ca->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("attach_al_obj returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -153,7 +159,7 @@
if( status != IB_SUCCESS )
{
p_ci_ca->obj.pfn_destroy( &p_ci_ca->obj, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("open_ca failed, status = 0x%x.\n", status) );
return status;
}
@@ -173,7 +179,7 @@
if( status != IB_SUCCESS )
{
p_ci_ca->obj.pfn_destroy( &p_ci_ca->obj, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("ib_open_ca failed, status = 0x%x.\n", status)
);
return status;
}
@@ -183,7 +189,7 @@
if( status != IB_SUCCESS )
{
p_ci_ca->obj.pfn_destroy( &p_ci_ca->obj, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("get_port_guids failed, status = 0x%x.\n",
status) );
return status;
}
@@ -194,7 +200,7 @@
if( status != IB_SUCCESS )
{
p_ci_ca->obj.pfn_destroy( &p_ci_ca->obj, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("ib_alloc_pd failed, status = 0x%x.\n", status)
);
return status;
}
@@ -205,7 +211,7 @@
if( status != IB_SUCCESS )
{
p_ci_ca->obj.pfn_destroy( &p_ci_ca->obj, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("ib_alloc_pd alias failed, status = 0x%x.\n",
status) );
return status;
}
@@ -215,7 +221,7 @@
if( status != IB_SUCCESS )
{
p_ci_ca->obj.pfn_destroy( &p_ci_ca->obj, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("ib_reg_mad_pool failed, status = 0x%x.\n",
status) );
return status;
}
@@ -229,7 +235,7 @@
{
/* Destroy the CA */
p_ci_ca->obj.pfn_destroy( &p_ci_ca->obj, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("al_pnp_add_ca failed, status = 0x%x.\n",
status) );
return status;
}
@@ -237,7 +243,7 @@
/* Release the reference taken in init_al_obj. */
deref_al_obj( &p_ci_ca->obj );
- CL_EXIT( AL_DBG_CA, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CA);
return IB_SUCCESS;
}
@@ -291,7 +297,7 @@
ib_api_status_t status;
al_ci_ca_t *p_ci_ca;
- CL_ENTER( AL_DBG_CA, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CA);
CL_ASSERT( p_obj );
p_ci_ca = PARENT_STRUCT( p_obj, al_ci_ca_t, obj );
@@ -305,7 +311,7 @@
CL_ASSERT( status == IB_SUCCESS );
}
- CL_EXIT( AL_DBG_CA, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CA);
}
@@ -333,7 +339,7 @@
{
ib_async_event_rec_t event_rec;
- CL_ENTER( AL_DBG_CA, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CA);
CL_ASSERT( p_event_record );
@@ -343,7 +349,7 @@
ci_ca_async_event( &event_rec );
- CL_EXIT( AL_DBG_CA, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CA);
}
@@ -456,16 +462,16 @@
void* __ptr64 * p_handle_array;
ib_api_status_t status;
- CL_ENTER( AL_DBG_CA, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CA);
if( AL_OBJ_INVALID_HANDLE( h_ca, AL_OBJ_TYPE_H_CA ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_CA_HANDLE\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_CA_HANDLE\n") );
return IB_INVALID_CA_HANDLE;
}
if( !p_ci_op )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
p_handle_array = NULL;
@@ -498,6 +504,6 @@
if ( num_handles )
cl_free( p_handle_array );
- CL_EXIT( AL_DBG_QUERY, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_QUERY);
return status;
}
Index: core/al/kernel/al_cm.c
===================================================================
--- core/al/kernel/al_cm.c (revision 1349)
+++ core/al/kernel/al_cm.c (working copy)
@@ -38,6 +38,14 @@
#include "al_cm.h"
#include "al_cm_shared.h"
#include "al_debug.h"
+
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "al_cm.tmh"
+#endif
+
#include "al_mgr.h"
#include "al_qp.h"
@@ -104,10 +112,10 @@
al_conn_t *p_conn;
uint32_t i;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
cl_spinlock_acquire( &gp_cm->obj.lock );
- CL_TRACE( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM ,
("CM info:\n"
"\tactive_listen_list..: %"PRIdSIZE_T"\n"
"\tinactive_listen_list: %"PRIdSIZE_T"\n"
@@ -124,7 +132,7 @@
cl_pool_count( &gp_cm->req_pool ),
cl_qmap_count( &gp_cm->conn_map ) ) );
/* walk lists for connection info */
- CL_TRACE( AL_DBG_CM, g_al_dbg_lvl,("Active listens:\n") );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM ,("Active
listens:\n") );
i = 1;
for( p_item = cl_qlist_head( &gp_cm->active_listen_list );
@@ -133,11 +141,11 @@
{
p_listen = PARENT_STRUCT( p_item, al_listen_t, list_item
);
- CL_TRACE( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM ,
("\n%d)\n"
- "\tservice_id...:0x%"PRIx64"\n"
+ "\tservice_id...:0x%I64x\n"
"\tlid..........:0x%x\n"
- "\tport_guid....:0x%"PRIx64"\n"
+ "\tport_guid....:0x%I64x\n"
"\tqp_type......:%d\n",
i++,
p_listen->info.svc_id, p_listen->info.lid,
@@ -145,7 +153,7 @@
}
- CL_TRACE( AL_DBG_CM, g_al_dbg_lvl,("Inactive listens:\n") );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM ,("Inactive
listens:\n") );
i = 1;
for( p_item = cl_qlist_head( &gp_cm->inactive_listen_list );
@@ -154,11 +162,11 @@
{
p_listen = PARENT_STRUCT( p_item, al_listen_t, list_item
);
- CL_TRACE( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM ,
("\n%d)\n"
- "\tservice_id...:0x%"PRIx64"\n"
+ "\tservice_id...:0x%I64x\n"
"\tlid..........:0x%x\n"
- "\tport_guid....:0x%"PRIx64"\n"
+ "\tport_guid....:0x%I64x\n"
"\tqp_type......:%d\n",
i++,
p_listen->info.svc_id, p_listen->info.lid,
@@ -166,7 +174,7 @@
}
- CL_TRACE( AL_DBG_CM, g_al_dbg_lvl,("In Timewait:\n") );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM ,("In Timewait:\n")
);
i = 1;
for( p_item = cl_qlist_head( &gp_cm->time_wait_list );
@@ -175,7 +183,7 @@
{
p_conn = PARENT_STRUCT( p_item, al_conn_t, map_item );
- CL_TRACE( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM ,
("\n%d)\n"
"\tstate........:%d\n"
"\tref_cnt......:%d\n"
@@ -192,7 +200,7 @@
cl_spinlock_release( &gp_cm->obj.lock );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
#endif
}
@@ -204,13 +212,13 @@
__cm_pnp_dereg_cb(
IN void
*context )
{
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
UNUSED_PARAM( context );
deref_al_obj( &gp_cm->obj );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -223,7 +231,7 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
CL_ASSERT( &gp_cm->obj == p_obj );
UNUSED_PARAM( p_obj );
@@ -234,7 +242,7 @@
status = ib_dereg_pnp( gp_cm->h_pnp, __cm_pnp_dereg_cb
);
if( status != IB_SUCCESS )
{
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("ib_dereg_pnp failed with status
%s.\n",
ib_get_err_str(status)) );
deref_al_obj( &gp_cm->obj );
@@ -243,7 +251,7 @@
/* Cancel all timewait timers. */
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -254,7 +262,7 @@
__free_cm(
IN al_obj_t*
p_obj )
{
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
CL_ASSERT( &gp_cm->obj == p_obj );
/* All listen request should have been cleaned up by this point.
*/
@@ -282,7 +290,7 @@
cl_free( gp_cm );
gp_cm = NULL;
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -295,7 +303,7 @@
{
cm_port_agent_t *p_port_cm;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
p_port_cm = PARENT_STRUCT( p_obj, cm_port_agent_t, obj );
@@ -311,7 +319,7 @@
p_port_cm->h_pd = NULL;
}
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -326,7 +334,7 @@
{
cm_port_agent_t *p_port_cm;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
p_port_cm = PARENT_STRUCT( p_obj, cm_port_agent_t, obj );
@@ -339,7 +347,7 @@
destroy_al_obj( &p_port_cm->obj );
cl_free( p_port_cm );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -353,7 +361,7 @@
ib_av_attr_t av_attr;
cl_list_item_t *p_list_item;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
cl_spinlock_acquire( &p_port_cm->lock );
@@ -426,7 +434,7 @@
}
}
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return status;
}
@@ -438,7 +446,7 @@
ib_av_t *h_av;
uint32_t ref_cnt;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
h_av = p_mad->h_av;
@@ -460,7 +468,7 @@
cl_spinlock_release( &p_port_cm->lock );
}
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_SUCCESS;
}
@@ -475,7 +483,7 @@
al_conn_t *p_conn;
uint8_t counter;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
CL_ASSERT( h_al && h_al->obj.type == AL_OBJ_TYPE_H_AL );
cl_spinlock_acquire( &gp_cm->obj.lock );
@@ -483,7 +491,7 @@
if( !p_item )
{
cl_spinlock_release( &gp_cm->obj.lock );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("cl_qpool_get failed for al_conn_t.\n") );
return NULL;
}
@@ -495,7 +503,7 @@
{
cl_qpool_put( &gp_cm->conn_pool,
(cl_pool_item_t*)&p_conn->map_item );
cl_spinlock_release( &gp_cm->obj.lock );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("cl_pool_get failed for conn_req_t.\n") );
return NULL;
}
@@ -574,13 +582,13 @@
p_conn->p_req_info = NULL;
cl_qpool_put( &gp_cm->conn_pool,
(cl_pool_item_t*)&p_conn->map_item );
cl_spinlock_release( &gp_cm->obj.lock );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("al_insert_conn failed for conn_req_t.\n") );
return NULL;
}
ref_al_obj( &gp_cm->obj );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return p_conn;
}
@@ -588,11 +596,11 @@
__ref_conn(
IN al_conn_t* const
p_conn )
{
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
cl_atomic_inc( &p_conn->ref_cnt );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -619,7 +627,7 @@
{
ib_qp_handle_t h_qp;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/*
* Destruction of the connection object and unbinding it from
the QP
@@ -697,7 +705,7 @@
if( h_qp )
{
/* We shouldn't have a QP at this point. */
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("QP (%p) still referenced by connection
object\n", h_qp) );
cm_reset_qp( h_qp, 0 );
deref_al_obj( &h_qp->obj );
@@ -709,7 +717,7 @@
cl_spinlock_release( &gp_cm->obj.lock );
}
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -761,7 +769,7 @@
ib_api_status_t status;
ib_grh_t grh;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
CL_ASSERT( p_conn );
@@ -769,7 +777,7 @@
status = ib_get_mad( p_port_cm->pool_key, MAD_BLOCK_SIZE, &p_mad
);
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("ib_get_mad failed with status %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -843,7 +851,7 @@
{
__deref_conn( p_conn );
ib_put_mad( p_mad );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("__get_av failed with status %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -856,12 +864,12 @@
p_conn->p_send_mad = NULL;
__deref_conn( p_conn );
ib_put_mad( p_mad );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("ib_send_mad failed with status %s.\n",
ib_get_err_str(status)) );
return status;
}
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_SUCCESS;
}
@@ -874,7 +882,7 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
CL_ASSERT( p_port_cm );
CL_ASSERT( p_mad );
@@ -893,7 +901,7 @@
if( status != IB_SUCCESS )
{
ib_put_mad( p_mad );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("__get_av failed with status %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -903,12 +911,12 @@
if( status != IB_SUCCESS )
{
ib_put_mad( p_mad );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("ib_send_mad failed with status %s.\n",
ib_get_err_str(status)) );
return status;
}
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_SUCCESS;
}
@@ -922,7 +930,7 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
CL_ASSERT( p_port_cm );
CL_ASSERT( p_conn );
@@ -959,7 +967,7 @@
}
cm_res_release( p_conn );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -972,7 +980,7 @@
ib_mad_t *p_hdr;
cm_async_mad_t *p_async_mad;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
UNUSED_PARAM( h_mad_svc );
@@ -984,7 +992,7 @@
if( !p_async_mad )
{
ib_put_mad( p_mad );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("failed to cl_zalloc cm_async_mad_t (%d
bytes)\n",
sizeof(cm_async_mad_t)) );
return;
@@ -1042,7 +1050,7 @@
default:
cl_free( p_async_mad );
ib_put_mad( p_mad );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("Invalid CM MAD attribute ID.\n") );
return;
}
@@ -1050,7 +1058,7 @@
/* Queue the MAD for asynchronous processing. */
cl_async_proc_queue( gp_async_proc_mgr, &p_async_mad->item );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -1062,7 +1070,7 @@
{
cm_async_mad_t *p_async_mad;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
UNUSED_PARAM( h_mad_svc );
CL_ASSERT( p_mad->p_next == NULL );
@@ -1071,7 +1079,7 @@
if( !p_async_mad )
{
ib_put_mad( p_mad );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("failed to cl_zalloc cm_async_mad_t (%d
bytes)\n",
sizeof(cm_async_mad_t)) );
return;
@@ -1084,7 +1092,7 @@
/* Queue the MAD for asynchronous processing. */
cl_async_proc_queue( gp_async_proc_mgr, &p_async_mad->item );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -1097,7 +1105,7 @@
al_conn_t *p_conn;
ib_mad_element_t *p_mad;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
p_async_mad = PARENT_STRUCT( p_item, cm_async_mad_t, item );
p_mad = p_async_mad->p_mad;
@@ -1114,7 +1122,7 @@
{
__put_av( p_port_cm, p_mad );
ib_put_mad( p_mad );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return;
}
@@ -1192,7 +1200,7 @@
__put_av( p_port_cm, p_mad );
ib_put_mad( p_mad );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -1222,7 +1230,7 @@
cm_conn_migrated(
IN al_conn_t* const
p_conn )
{
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Update the index to the primary path. */
cm_res_acquire( p_conn );
@@ -1232,7 +1240,7 @@
/* Only the lowest bit is valid (0 or 1). */
p_conn->idx_primary&=0x1;
cm_res_release( p_conn );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
/*
@@ -1301,12 +1309,12 @@
ib_qp_create_t qp_create;
ib_mad_svc_t mad_svc;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
cl_status = cl_spinlock_init( &p_port_cm->lock );
if( cl_status != CL_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("cl_spinlock_init failed\n") );
return ib_convert_cl_status( cl_status );
}
@@ -1319,7 +1327,7 @@
&p_port_cm->h_pd );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("ib_alloc_pd failed with status %s\n",
ib_get_err_str(status)) );
return status;
}
@@ -1343,7 +1351,7 @@
&p_port_cm->h_qp );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("ib_get_spl_qp failed with status %s\n",
ib_get_err_str(status)) );
return status;
}
@@ -1363,12 +1371,12 @@
ib_reg_mad_svc( p_port_cm->h_qp, &mad_svc,
&p_port_cm->h_mad_svc );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("ib_reg_mad_svc failed with status %s\n",
ib_get_err_str(status)) );
return status;
}
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_SUCCESS;
}
@@ -1384,14 +1392,14 @@
ib_api_status_t status;
ib_port_attr_mod_t port_attr_mod;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* calculate size of port_cm struct */
p_port_cm = (cm_port_agent_t*)cl_zalloc( sizeof(cm_port_agent_t)
+
p_pnp_rec->p_ca_attr->size );
if( !p_port_cm )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Failed to cl_zalloc port CM agent.\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -1405,7 +1413,7 @@
if( status != IB_SUCCESS )
{
__free_port_cm( &p_port_cm->obj );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("init_al_obj failed with status %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -1415,7 +1423,7 @@
if( status != IB_SUCCESS )
{
p_port_cm->obj.pfn_destroy( &p_port_cm->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("attach_al_obj returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -1434,7 +1442,7 @@
if( !p_port_cm->h_ca )
{
p_port_cm->obj.pfn_destroy( &p_port_cm->obj, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("acquire_ca
failed.\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("acquire_ca
failed.\n") );
return IB_INVALID_GUID;
}
@@ -1442,7 +1450,7 @@
if( status != IB_SUCCESS )
{
p_port_cm->obj.pfn_destroy( &p_port_cm->obj, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("__init_data_svc failed with status %s.\n",
ib_get_err_str(status)) );
return status;
@@ -1492,7 +1500,7 @@
{
ib_api_status_t status = IB_SUCCESS;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
switch( p_pnp_rec->pnp_event )
{
@@ -1535,7 +1543,7 @@
break; /* Ignore other PNP events. */
}
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return status;
}
@@ -1550,7 +1558,7 @@
al_conn_t *p_conn;
cm_async_timer_t *p_async_timer;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
p_async_timer = PARENT_STRUCT( p_item, cm_async_timer_t, item );
p_conn = p_async_timer->p_conn;
@@ -1625,7 +1633,7 @@
__deref_conn( p_conn );
cl_free( p_async_timer );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -1638,12 +1646,12 @@
{
cm_async_timer_t *p_async_timer;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
p_async_timer = (cm_async_timer_t*)cl_zalloc(
sizeof(cm_async_timer_t) );
if( !p_async_timer )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("failed to cl_zalloc cm_async_timer_t (%d
bytes). System unstable!\n",
sizeof(cm_async_timer_t)) );
/* Bah - just release the connection now. */
@@ -1659,7 +1667,7 @@
p_async_timer->item.pfn_callback = __process_cm_timer;
cl_async_proc_queue( gp_async_proc_mgr, &p_async_timer->item );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -1682,7 +1690,7 @@
cl_status = cm_res_init( p_conn );
if( cl_status != CL_SUCCESS )
{
- /*CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ /*AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("cm_res_init failed with status %s.\n",
CL_STATUS_MSG( cl_status )) );*/
return CL_ERROR;
@@ -1691,7 +1699,7 @@
cl_status = cl_timer_init( &p_conn->timer, __conn_timer_cb,
p_conn );
if( cl_status != CL_SUCCESS )
{
- /*CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ /*AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("cl_timer_init failed with status %s.\n",
CL_STATUS_MSG( cl_status )) );*/
cm_res_destroy( p_conn );
@@ -1744,7 +1752,7 @@
cl_status_t cl_status;
ib_pnp_req_t pnp_req;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
CL_ASSERT( gp_cm == NULL );
@@ -1752,7 +1760,7 @@
gp_cm = (al_cm_agent_t*)cl_zalloc( sizeof(al_cm_agent_t) );
if( !gp_cm )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Failed allocation of global CM agent.\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -1771,7 +1779,7 @@
if( status != IB_SUCCESS )
{
__free_cm( &gp_cm->obj );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("init_al_obj failed with status %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -1780,7 +1788,7 @@
if( status != IB_SUCCESS )
{
gp_cm->obj.pfn_destroy( &gp_cm->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("attach_al_obj returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -1791,7 +1799,7 @@
if( cl_status != CL_SUCCESS )
{
gp_cm->obj.pfn_destroy( &gp_cm->obj, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("cl_qpool_init failed with status %s.\n",
CL_STATUS_MSG(cl_status)) );
return ib_convert_cl_status( cl_status );
@@ -1802,7 +1810,7 @@
if( cl_status != CL_SUCCESS )
{
gp_cm->obj.pfn_destroy( &gp_cm->obj, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("cl_pool_init failed with status %s.\n",
CL_STATUS_MSG(cl_status)) );
return ib_convert_cl_status( cl_status );
@@ -1816,7 +1824,7 @@
if( status != IB_SUCCESS )
{
gp_cm->obj.pfn_destroy( &gp_cm->obj, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("ib_reg_pnp failed with status %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -1827,7 +1835,7 @@
* deref the object.
*/
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_SUCCESS;
}
@@ -1847,7 +1855,7 @@
ib_port_attr_t *p_port_attr;
uint16_t gid_idx;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
cl_spinlock_acquire( &gp_cm->obj.lock );
for( p_item = cl_qlist_head( &gp_cm->obj.obj_list );
@@ -1886,7 +1894,7 @@
if( pp_port_cm )
*pp_port_cm = p_port_cm;
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_SUCCESS;
}
@@ -1895,7 +1903,7 @@
}
cl_spinlock_release( &gp_cm->obj.lock );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("No match found.\n") );
return status;
}
Index: core/al/kernel/al_cm_cep.c
===================================================================
--- core/al/kernel/al_cm_cep.c (revision 1349)
+++ core/al/kernel/al_cm_cep.c (working copy)
@@ -40,6 +40,12 @@
#include "al_cm_conn.h"
#include "al_cm_sidr.h"
#include "al_debug.h"
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "al_cm_cep.tmh"
+#endif
#include "ib_common.h"
#include "al_mgr.h"
#include "al_ca.h"
@@ -572,7 +578,7 @@
status = ib_get_mad( p_port_cep->pool_key, MAD_BLOCK_SIZE,
&p_rej_mad );
if( status != IB_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("ib_get_mad returned %s\n", ib_get_err_str(
status )) );
return;
}
@@ -897,7 +903,7 @@
*/
if( p_rej->reason == IB_REJ_INVALID_SID )
{
- AL_TRACE( AL_DBG_CM,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM ,
("Request rejected (invalid SID) -
retrying.\n") );
goto err1;
}
@@ -950,7 +956,7 @@
default:
/* Ignore the REJ. */
- AL_TRACE( AL_DBG_CM, ("REJ received in invalid
state.\n") );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM , ("REJ
received in invalid state.\n") );
err1:
ib_put_mad( p_mad );
AL_EXIT( AL_DBG_CM );
@@ -1028,7 +1034,7 @@
p_req = (mad_cm_req_t*)p_mad->p_mad_buf;
- AL_TRACE( AL_DBG_CM,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM ,
("REQ: comm_id (x%x) qpn (x%x) received\n",
p_req->local_comm_id, conn_req_get_lcl_qpn( p_req )) );
@@ -1037,7 +1043,7 @@
if( conn_req_get_qp_type( p_req ) > IB_QPT_UNRELIABLE_CONN )
{
/* Reserved value. Reject. */
- AL_TRACE( AL_DBG_ERROR, ("Invalid transport type
received.\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid
transport type received.\n") );
reason = IB_REJ_INVALID_XPORT;
goto reject;
}
@@ -1056,7 +1062,7 @@
case CEP_STATE_TIMEWAIT:
case CEP_STATE_DESTROY:
/* Send a reject. */
- AL_TRACE( AL_DBG_CM,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM ,
("REQ received for connection in
TIME_WAIT state.\n") );
__reject_req( p_port_cep, p_mad,
IB_REJ_STALE_CONN );
break;
@@ -1068,7 +1074,7 @@
* dropped, then the remote CM will eventually
process it, and
* we'd just be adding traffic.
*/
- AL_TRACE( AL_DBG_CM, ("Duplicate REQ
received.\n") );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM ,
("Duplicate REQ received.\n") );
ib_put_mad( p_mad );
}
KeReleaseInStackQueuedSpinLockFromDpcLevel( &hdl );
@@ -1085,7 +1091,7 @@
{
/* Reject the request for insufficient resources. */
reason = IB_REJ_INSUF_RESOURCES;
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("al_create_cep failed\nREJ sent for
insufficient resources.\n") );
goto reject;
}
@@ -1131,7 +1137,7 @@
}
else
{
- AL_TRACE( AL_DBG_CM, ("No listens active!\n") );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM , ("No
listens active!\n") );
/* Match against peer-to-peer requests using SID and
compare data. */
//p_cep = __lookup_peer();
@@ -1146,7 +1152,7 @@
// p_conn = PARENT_STRUCT( p_list_item,
kcep_t, map_item );
// __peer_req( p_port_cep, p_conn,
p_async_mad->p_mad );
// cl_free( p_async_mad );
- // CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ // AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM
,
// ("REQ matched a peer-to-peer
request.\n") );
// return;
// }
@@ -1157,7 +1163,7 @@
{
/* No match found. Reject. */
reason = IB_REJ_INVALID_SID;
- AL_TRACE( AL_DBG_CM, ("REQ received but no match
found.\n") );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM ,
("REQ received but no match found.\n") );
goto cleanup;
}
}
@@ -1258,7 +1264,7 @@
p_cep = __lookup_cep( NULL, p_mra->remote_comm_id );
if( !p_cep )
{
- AL_TRACE( AL_DBG_CM,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM ,
("MRA received that could not be matched.\n") );
goto err;
}
@@ -1267,7 +1273,7 @@
{
if( p_cep->remote_comm_id != p_mra->local_comm_id )
{
- AL_TRACE( AL_DBG_CM,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM ,
("MRA received that could not be
matched.\n") );
goto err;
}
@@ -1284,7 +1290,7 @@
(p_cep->state & CEP_MSG_MASK)) )
{
/* Invalid state. */
- AL_TRACE( AL_DBG_CM, ("MRA received in invalid
state.\n") );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM , ("MRA
received in invalid state.\n") );
goto err;
}
@@ -1298,7 +1304,7 @@
if( p_cep->state & CEP_STATE_MRA )
{
/* Invalid state. */
- AL_TRACE( AL_DBG_CM, ("Already received MRA.\n") );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM , ("Already
received MRA.\n") );
goto err;
}
@@ -1398,7 +1404,7 @@
p_rep = (mad_cm_rep_t*)p_mad->p_mad_buf;
- AL_TRACE( AL_DBG_CM,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM ,
("REP: comm_id (x%x) received\n", p_rep->local_comm_id )
);
KeAcquireInStackQueuedSpinLockAtDpcLevel( &gp_cep_mgr->lock,
&hdl );
@@ -1407,7 +1413,7 @@
{
KeReleaseInStackQueuedSpinLockFromDpcLevel( &hdl );
ib_put_mad( p_mad );
- AL_TRACE_EXIT( AL_DBG_CM,
+ AL_PRINT_EXIT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM,
("REP received that could not be matched.\n") );
return;
}
@@ -1463,7 +1469,7 @@
default:
ib_put_mad( p_mad );
- AL_TRACE( AL_DBG_CM, ("REP received in invalid
state.\n") );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM , ("REP
received in invalid state.\n") );
break;
}
@@ -1488,7 +1494,7 @@
p_rtu = (mad_cm_rtu_t*)p_mad->p_mad_buf;
- AL_TRACE( AL_DBG_CM,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM ,
("RTU: comm_id (x%x) received\n", p_rtu->local_comm_id)
);
/* Find the connection by local connection ID. */
@@ -1496,7 +1502,7 @@
p_cep = __lookup_cep( NULL, p_rtu->remote_comm_id );
if( !p_cep || p_cep->remote_comm_id != p_rtu->local_comm_id )
{
- AL_TRACE( AL_DBG_CM, ("RTU received that could not be
matched.\n") );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM , ("RTU
received that could not be matched.\n") );
goto done;
}
@@ -1527,7 +1533,7 @@
return;
default:
- AL_TRACE( AL_DBG_CM, ("RTU received in invalid
state.\n") );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM , ("RTU
received in invalid state.\n") );
break;
}
@@ -1554,7 +1560,7 @@
p_dreq = (mad_cm_dreq_t*)p_mad->p_mad_buf;
- AL_TRACE( AL_DBG_CM,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM ,
("DREQ: comm_id (x%x) qpn (x%x) received\n",
p_dreq->local_comm_id, conn_dreq_get_remote_qpn( p_dreq
)) );
@@ -1565,7 +1571,7 @@
p_cep->remote_comm_id != p_dreq->local_comm_id ||
p_cep->local_qpn != conn_dreq_get_remote_qpn( p_dreq ) )
{
- AL_TRACE( AL_DBG_CM, ("DREQ received that could not be
matched.\n") );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM , ("DREQ
received that could not be matched.\n") );
KeReleaseInStackQueuedSpinLockFromDpcLevel( &hdl );
ib_put_mad( p_mad );
AL_EXIT( AL_DBG_CM );
@@ -1611,7 +1617,7 @@
break;
default:
- AL_TRACE( AL_DBG_CM, ("DREQ received in invalid
state.\n") );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM , ("DREQ
received in invalid state.\n") );
case CEP_STATE_DREQ_RCVD:
ib_put_mad( p_mad );
break;
@@ -1642,7 +1648,7 @@
p_cep = __lookup_cep( NULL, p_drep->remote_comm_id );
if( !p_cep || p_cep->remote_comm_id != p_drep->local_comm_id )
{
- AL_TRACE( AL_DBG_CM, ("DREP received that could not be
matched.\n") );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM , ("DREP
received that could not be matched.\n") );
KeReleaseInStackQueuedSpinLockFromDpcLevel( &hdl );
ib_put_mad( p_mad );
AL_EXIT( AL_DBG_CM );
@@ -1652,7 +1658,7 @@
if( p_cep->state != CEP_STATE_DREQ_SENT &&
p_cep->state != CEP_STATE_DREQ_DESTROY )
{
- AL_TRACE( AL_DBG_CM, ("DREP received in invalid
state.\n") );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM , ("DREP
received in invalid state.\n") );
KeReleaseInStackQueuedSpinLockFromDpcLevel( &hdl );
ib_put_mad( p_mad );
@@ -1784,7 +1790,7 @@
{
KeReleaseInStackQueuedSpinLockFromDpcLevel( &hdl );
ib_put_mad( p_mad );
- AL_TRACE_EXIT( AL_DBG_CM, ("LAP received that could not
be matched.\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM, ("LAP
received that could not be matched.\n") );
return;
}
@@ -1840,7 +1846,7 @@
break;
default:
- AL_TRACE( AL_DBG_CM, ("LAP received in invalid
state.\n") );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM , ("LAP
received in invalid state.\n") );
ib_put_mad( p_mad );
break;
}
@@ -1869,7 +1875,7 @@
p_cep = __lookup_cep( NULL, p_apr->remote_comm_id );
if( !p_cep || p_cep->remote_comm_id != p_apr->local_comm_id )
{
- AL_TRACE( AL_DBG_CM, ("APR received that could not be
matched.\n") );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM , ("APR
received that could not be matched.\n") );
goto done;
}
@@ -1906,7 +1912,7 @@
return;
default:
- AL_TRACE( AL_DBG_CM, ("APR received in invalid
state.\n") );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM , ("APR
received in invalid state.\n") );
break;
}
@@ -1990,7 +1996,7 @@
//
default:
ib_put_mad( p_mad );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("Invalid CM MAD attribute ID.\n") );
return;
}
@@ -2064,7 +2070,7 @@
if( status != IB_SUCCESS )
{
ib_put_mad( p_mad );
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("ib_send_mad failed with status %s.\n",
ib_get_err_str(status)) );
}
@@ -2122,7 +2128,7 @@
cl_atomic_dec( &p_cep->ref_cnt );
p_cep->p_send_mad = NULL;
ib_put_mad( p_mad );
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("ib_send_mad failed with status %s.\n",
ib_get_err_str(status)) );
}
@@ -2287,7 +2293,7 @@
&p_port_cep->h_pd );
if( status != IB_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("ib_alloc_pd failed with status %s\n",
ib_get_err_str(status)) );
return status;
}
@@ -2311,7 +2317,7 @@
&p_port_cep->h_qp );
if( status != IB_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("ib_get_spl_qp failed with status %s\n",
ib_get_err_str(status)) );
return status;
}
@@ -2331,7 +2337,7 @@
ib_reg_mad_svc( p_port_cep->h_qp, &mad_svc,
&p_port_cep->h_mad_svc );
if( status != IB_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("ib_reg_mad_svc failed with status %s\n",
ib_get_err_str(status)) );
return status;
}
@@ -2429,7 +2435,7 @@
p_port_cep = (cep_agent_t*)cl_zalloc( sizeof(cep_agent_t) );
if( !p_port_cep )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("Failed to cl_zalloc port CM agent.\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -2441,7 +2447,7 @@
if( status != IB_SUCCESS )
{
__free_port_cep( &p_port_cep->obj );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("init_al_obj failed with status %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -2451,7 +2457,7 @@
if( status != IB_SUCCESS )
{
p_port_cep->obj.pfn_destroy( &p_port_cep->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("attach_al_obj returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -2470,14 +2476,14 @@
if( !p_port_cep->h_ca )
{
p_port_cep->obj.pfn_destroy( &p_port_cep->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR, ("acquire_ca failed.\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("acquire_ca failed.\n") );
return IB_INVALID_GUID; }
status = __init_data_svc( p_port_cep, p_pnp_rec->p_port_attr );
if( status != IB_SUCCESS )
{
p_port_cep->obj.pfn_destroy( &p_port_cep->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("__init_data_svc failed with status %s.\n",
ib_get_err_str(status)) );
return status;
@@ -2676,7 +2682,7 @@
else
p_item = cl_rbmap_right( p_item );
- AL_TRACE( AL_DBG_CM,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM ,
("Svc ID match but compare buffer
mismatch.\n") );
continue;
}
@@ -2719,7 +2725,7 @@
p_item = cl_rbmap_right( p_item ), left = FALSE;
else
{
- AL_TRACE( AL_DBG_CM | AL_DBG_WARN,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("WARNING: Duplicate remote CID and CA
GUID.\n") );
goto done;
}
@@ -2762,8 +2768,8 @@
p_item = cl_rbmap_right( p_item ), left = FALSE;
else
{
- AL_TRACE( AL_DBG_CM | AL_DBG_WARN,
- ("WARNING: Duplicate remote QPN and CA
GUID.\n") );
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
+ ("WARNING: Duplicate remote QPN and CA GUID.\n")
);
goto done;
}
}
@@ -3142,7 +3148,7 @@
gp_cep_mgr->h_pnp,
(ib_pfn_destroy_cb_t)deref_al_obj );
if( status != IB_SUCCESS )
{
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("ib_dereg_pnp failed with status
%s.\n",
ib_get_err_str(status)) );
deref_al_obj( &gp_cep_mgr->obj );
@@ -3238,7 +3244,7 @@
gp_cep_mgr = (al_cep_mgr_t*)cl_zalloc( sizeof(al_cep_mgr_t) );
if( !gp_cep_mgr )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("Failed allocation of global CM agent.\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -3260,7 +3266,7 @@
if( status != IB_SUCCESS )
{
__free_cep_mgr( &gp_cep_mgr->obj );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("init_al_obj failed with status %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -3269,7 +3275,7 @@
if( status != IB_SUCCESS )
{
gp_cep_mgr->obj.pfn_destroy( &gp_cep_mgr->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("attach_al_obj returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -3279,7 +3285,7 @@
if( cl_status != CL_SUCCESS )
{
gp_cep_mgr->obj.pfn_destroy( &gp_cep_mgr->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("cl_vector_init failed with status %s.\n",
CL_STATUS_MSG(cl_status)) );
return ib_convert_cl_status( cl_status );
@@ -3296,7 +3302,7 @@
if( status != IB_SUCCESS )
{
gp_cep_mgr->obj.pfn_destroy( &gp_cep_mgr->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("ib_reg_pnp failed with status %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -3462,7 +3468,7 @@
p_cep = ExAllocateFromNPagedLookasideList( &gp_cep_mgr->cep_pool
);
if( !p_cep )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("Failed to allocate
CEP.\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("Failed
to allocate CEP.\n") );
return NULL;
}
@@ -3485,7 +3491,7 @@
if( !p_cep->p_cid )
{
ExFreeToNPagedLookasideList( &gp_cep_mgr->cep_pool,
p_cep );
- AL_TRACE_EXIT( AL_DBG_ERROR, ("Failed to get CID.\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("Failed
to get CID.\n") );
return NULL;
}
@@ -3663,14 +3669,14 @@
p_port_cep = __get_cep_agent( p_cep );
if( !p_port_cep )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("__get_cep_agent
failed.\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("__get_cep_agent failed.\n") );
return IB_INSUFFICIENT_RESOURCES;
}
status = ib_get_mad( p_port_cep->pool_key, MAD_BLOCK_SIZE,
pp_mad );
if( status != IB_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("ib_get_mad returned %s.\n", ib_get_err_str(
status )) );
return status;
}
@@ -3888,7 +3894,7 @@
break;
default:
- AL_TRACE( AL_DBG_ERROR, ("CEP in state %d.\n",
p_cep->state) );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("CEP in
state %d.\n", p_cep->state) );
case CEP_STATE_TIMEWAIT:
/* Already in timewait - so all is good. */
p_cep->state = CEP_STATE_DESTROY;
@@ -3950,7 +3956,7 @@
if( !p_cep )
{
KeReleaseInStackQueuedSpinLock( &hdl );
- AL_TRACE_EXIT( AL_DBG_ERROR, ("Failed to allocate
CEP.\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("Failed
to allocate CEP.\n") );
return IB_INSUFFICIENT_MEMORY;
}
KeReleaseInStackQueuedSpinLock( &hdl );
@@ -4119,7 +4125,7 @@
else
break;
- AL_TRACE( AL_DBG_CM,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM ,
("Svc ID match but compare buffer
mismatch.\n") );
continue;
}
@@ -4138,7 +4144,7 @@
p_cep->p_cmp_buf = cl_malloc( p_listen_info->cmp_len );
if( !p_cep->p_cmp_buf )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Failed to allocate compare buffer.\n")
);
status = IB_INSUFFICIENT_MEMORY;
goto done;
@@ -4350,7 +4356,7 @@
if( !p_cm_req->p_primary_path )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("Invalid primary path
record.\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("Invalid
primary path record.\n") );
return IB_INVALID_SETTING;
}
@@ -4394,7 +4400,7 @@
p_port_cep = __format_path_av( p_cm_req->p_primary_path,
&p_cep->av[0] );
if( !p_port_cep )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("Primary path
unrealizable.\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("Primary
path unrealizable.\n") );
return IB_INVALID_SETTING;
}
@@ -4404,7 +4410,7 @@
if( p_port_cep->h_ca->obj.p_ci_ca->verbs.guid !=
p_cm_req->h_qp->obj.p_ci_ca->verbs.guid )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("Primary path not realizable on given QP.\n")
);
return IB_INVALID_SETTING;
}
@@ -4427,7 +4433,7 @@
if( ib_path_rec_mtu( p_cm_req->p_primary_path ) !=
ib_path_rec_mtu( p_cm_req->p_alt_path ) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("Mismatched primary and alternate path
MTUs.\n") );
return IB_INVALID_SETTING;
}
@@ -4435,7 +4441,7 @@
/* The PKEY must match too. */
if( p_cm_req->p_alt_path->pkey !=
p_cm_req->p_primary_path->pkey )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("Mismatched pimary and alternate
PKEYs.\n") );
return IB_INVALID_SETTING;
}
@@ -4446,7 +4452,7 @@
p_port_cep->h_ca->obj.p_ci_ca->verbs.guid !=
p_cep->local_ca_guid )
{
/* Alternate path is not on same CA. */
- AL_TRACE_EXIT( AL_DBG_ERROR, ("Alternate path
unrealizable.\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("Alternate path unrealizable.\n") );
return IB_INVALID_SETTING;
}
@@ -4554,7 +4560,7 @@
status = __format_req( p_cep, p_cm_req );
if( status != IB_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("Invalid pdata
length.\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("Invalid pdata length.\n") );
ib_put_mad( p_cep->p_mad );
p_cep->p_mad = NULL;
break;
@@ -5200,7 +5206,7 @@
p_cm_lap->p_lap_pdata, p_cm_lap->lap_length, p_lap );
if( status != IB_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("lap pdata invalid.\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("lap
pdata invalid.\n") );
return status;
}
@@ -5244,7 +5250,7 @@
if( !p_cep->was_active )
{
/* Only the side that took the active role can
initialte a LAP. */
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Only the active side of a connection
can initiate a LAP.\n") );
status = IB_INVALID_STATE;
break;
@@ -5257,7 +5263,7 @@
p_port_cep = __format_path_av( p_cm_lap->p_alt_path,
&p_cep->alt_av );
if( !p_port_cep )
{
- AL_TRACE( AL_DBG_ERROR, ("Alternate path
invalid!\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Alternate path invalid!\n") );
status = IB_INVALID_SETTING;
break;
}
@@ -5269,7 +5275,7 @@
if( p_port_cep->h_ca->obj.p_ci_ca->verbs.guid !=
p_cep->local_ca_guid )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Alternate CA GUID different from
current!\n") );
status = IB_INVALID_SETTING;
break;
@@ -5322,7 +5328,7 @@
p_cm_apr->info_length, p_apr );
if( status != IB_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("apr_info invalid\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("apr_info invalid\n") );
return status;
}
@@ -5330,7 +5336,7 @@
p_cm_apr->apr_length, p_apr );
if( status != IB_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("apr pdata invalid\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("apr
pdata invalid\n") );
return status;
}
@@ -5522,7 +5528,7 @@
status = __format_dreq( p_cep, p_pdata, pdata_len, p_mad
);
if( status != IB_SUCCESS )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("__format_dreq returned %s.\n",
ib_get_err_str( status )) );
break;
}
@@ -5640,7 +5646,7 @@
break;
}
- AL_TRACE( AL_DBG_ERROR, ("No alternate path
avaialble.\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("No
alternate path avaialble.\n") );
/* Fall through. */
default:
Index: core/al/kernel/al_cm_conn.c
===================================================================
--- core/al/kernel/al_cm_conn.c (revision 1349)
+++ core/al/kernel/al_cm_conn.c (working copy)
@@ -57,7 +57,7 @@
mad_cm_req_t *p_req;
al_conn_t *p_conn;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
CL_ASSERT( p_list_item );
CL_ASSERT( context );
@@ -67,14 +67,14 @@
if( p_req->local_comm_id != p_conn->remote_comm_id )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("Remote comm ID mismatch.\n") );
return CL_NOT_FOUND;
}
if( p_req->local_ca_guid != p_conn->remote_ca_guid )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("Remote CA GUID mismatch.\n") );
return CL_NOT_FOUND;
}
@@ -82,7 +82,7 @@
/* Reference the connection since we're working on it... */
__ref_conn( p_conn );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_SUCCESS;
}
@@ -100,7 +100,7 @@
al_conn_t *p_conn;
conn_req_t *p_info;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
CL_ASSERT( p_list_item );
CL_ASSERT( context );
@@ -112,11 +112,11 @@
if( p_conn->remote_ca_guid != p_req->local_ca_guid ||
conn_req_get_lcl_qpn( p_req ) != p_conn->remote_qpn )
{
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_NOT_FOUND;
}
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("REQ received for stale connection.\n") );
return CL_SUCCESS;
}
@@ -133,7 +133,7 @@
mad_cm_req_t *p_req;
al_listen_t *p_listen;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
CL_ASSERT( p_list_item );
CL_ASSERT( context );
@@ -146,7 +146,7 @@
if( p_req->sid != p_listen->info.svc_id )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl, ("Svc ID
mismatch.\n") );
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM , ("Svc ID
mismatch.\n") );
return CL_NOT_FOUND;
}
@@ -155,7 +155,7 @@
if( cl_memcmp(
&p_req->pdata[p_listen->info.compare_offset],
p_listen->info.p_compare_buffer,
p_listen->info.compare_length ) )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("Svc ID match but compare buffer
mismatch.\n") );
return CL_NOT_FOUND;
}
@@ -164,7 +164,7 @@
/* Reference the listen so that it doesn't go away. */
ref_al_obj( &p_listen->obj );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_SUCCESS;
}
@@ -180,7 +180,7 @@
mad_cm_req_t *p_req;
al_conn_t *p_conn;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
CL_ASSERT( p_list_item );
CL_ASSERT( context );
@@ -191,14 +191,14 @@
/* Only match against peer-to-peer requests, not client
requests. */
if( !p_conn->p_req_info->pfn_cm_req_cb )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl, ("Client
request.\n") );
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM , ("Client
request.\n") );
return CL_NOT_FOUND;
}
/* Validate the transport type against the connection's QP type.
*/
if( conn_req_get_qp_type( p_req ) != p_conn->h_qp->type )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("Transport type mismatch.\n") );
return CL_NOT_FOUND;
}
@@ -206,13 +206,13 @@
/* Compare SID and compare data. */
if( p_req->sid != p_conn->p_req_info->svc_id )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl, ("Svc ID
mismatch.\n") );
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM , ("Svc ID
mismatch.\n") );
return CL_NOT_FOUND;
}
if( p_conn->state != CM_CONN_REQ_SENT )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("Peer connection already matched.\n") );
return CL_NOT_FOUND;
}
@@ -226,7 +226,7 @@
/* Trying to connect to the same CA as the request. */
if( p_conn->local_comm_id == p_req->local_comm_id )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("Same peer request.\n") );
return CL_NOT_FOUND;
}
@@ -235,28 +235,28 @@
/* do a local lid and gid match */
if( p_conn->path->slid != p_req->primary_path.remote_lid )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("slid mismatch. May be a different req in
list\n") );
return CL_NOT_FOUND;
}
if( cl_memcmp( &p_conn->path->sgid,
&p_req->primary_path.remote_gid,
sizeof(ib_gid_t) ) )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("sgid mismatch. May be a different req in
list\n") );
return CL_NOT_FOUND;
}
if( p_conn->path->dlid != p_req->primary_path.local_lid )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("dlid mismatch. May be a different req in
list\n") );
return CL_NOT_FOUND;
}
if( cl_memcmp( &p_conn->path->dgid,
&p_req->primary_path.local_gid,
sizeof(ib_gid_t) ) )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("dgid mismatch. May be a different req in
list\n") );
return CL_NOT_FOUND;
}
@@ -268,7 +268,7 @@
p_conn->p_req_info->p_compare_buffer,
p_conn->p_req_info->compare_length ) )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("Svc ID match but compare buffer
mismatch.\n") );
return CL_NOT_FOUND;
}
@@ -277,7 +277,7 @@
/* Reference the connection object so it doesn't go away. */
__ref_conn( p_conn );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_SUCCESS;
}
@@ -289,7 +289,7 @@
al_conn_t *p_conn;
al_listen_t *p_listen;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
CL_ASSERT( p_list_item );
CL_ASSERT( context );
@@ -302,7 +302,7 @@
if( p_conn->p_req_info->svc_id != p_listen->info.svc_id )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl, ("Svc ID
mismatch.\n") );
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM , ("Svc ID
mismatch.\n") );
return CL_NOT_FOUND;
}
@@ -310,7 +310,7 @@
{
if( !p_conn->p_req_info->p_compare_buffer )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("Svc ID match but compare buffer
mismatch.\n") );
return CL_NOT_FOUND;
}
@@ -319,14 +319,14 @@
( p_conn->p_req_info->compare_offset !=
p_listen->info.compare_offset ) )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("Svc ID match but compare buffer
mismatch.\n") );
return CL_NOT_FOUND;
}
if( cl_memcmp( p_conn->p_req_info->p_compare_buffer,
p_listen->info.p_compare_buffer,
p_listen->info.compare_length ) )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("Svc ID match but compare buffer
mismatch.\n") );
return CL_NOT_FOUND;
}
@@ -335,7 +335,7 @@
/* Reference the listen so that it doesn't go away. */
ref_al_obj( &p_listen->obj );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_SUCCESS;
}
@@ -372,7 +372,7 @@
IN req_path_info_t
*p_path,
OUT ib_path_rec_t
*p_path_rec )
{
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
CL_ASSERT( p_req );
CL_ASSERT( p_path );
@@ -409,7 +409,7 @@
p_path_rec->tclass = p_path->traffic_class;
}
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
ib_rej_status_t
@@ -420,7 +420,7 @@
{
ib_port_attr_t *p_port_attr;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
p_port_attr =
&p_port_cm->p_ca_attr->p_port_attr[p_port_cm->port_idx];
@@ -428,7 +428,7 @@
if( ( p_listen->info.ca_guid != IB_ALL_CAS ) &&
( p_listen->info.ca_guid !=
p_port_cm->p_ca_attr->ca_guid ) )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("CaGuid mismatch on listen.\n") );
return IB_REJ_INVALID_SID;
}
@@ -437,7 +437,7 @@
( ( p_listen->info.lid != p_path_rec->slid ) ||
( p_listen->info.lid != p_port_attr->lid ) ) )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("lid mismatch on listen.\n") );
return IB_REJ_INVALID_LID;
}
@@ -445,7 +445,7 @@
if( ( p_listen->info.port_guid != IB_ALL_PORTS ) &&
( p_listen->info.port_guid != p_port_attr->port_guid ) )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("PortGuid mismatch on listen.\n") );
return IB_REJ_INVALID_SID;
}
@@ -453,12 +453,12 @@
if( ( p_listen->info.pkey != IB_ALL_PKEYS ) &&
( p_listen->info.pkey != p_path_rec->pkey ) )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("pkey mismatch on listen.\n") );
return IB_REJ_INVALID_SID;
}
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return 0;
}
@@ -472,7 +472,7 @@
{
ib_rej_status_t rej_status;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
CL_ASSERT( p_port_cm );
CL_ASSERT( p_req );
@@ -484,7 +484,7 @@
switch( p_req->hdr.class_ver )
{
default:
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Invalid class version type received.\n") );
return IB_REJ_UNSUPPORTED;
@@ -494,7 +494,7 @@
if( conn_req_get_qp_type( p_req ) > IB_QPT_UNRELIABLE_CONN )
{
/* Reserved value. Reject. */
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Invalid transport type received.\n") );
return IB_REJ_INVALID_XPORT;
}
@@ -529,7 +529,7 @@
p_req_rec->h_cm_listen = ;
*/
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return 0;
}
@@ -543,7 +543,7 @@
mad_cm_req_t *p_req;
mad_cm_rej_t *p_rej;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
CL_ASSERT( p_port_cm );
CL_ASSERT( p_mad );
@@ -568,7 +568,7 @@
/* Assumption: The retry count, send options, etc are zeroed on
a recv. */
__cm_send_mad( p_port_cm, p_mad );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -584,7 +584,7 @@
ib_api_status_t status;
cm_port_agent_t *p_port_cm;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
CL_ASSERT( p_conn );
CL_ASSERT( pp_port_cm );
@@ -596,7 +596,7 @@
&p_port_cm, &p_conn->p_req_info->p_ca_attr );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("__get_port_attr failed for primary path.\n")
);
return status;
}
@@ -604,7 +604,7 @@
if( p_conn->p_req_info->p_ca_attr->ca_guid !=
p_conn->h_qp->obj.p_ci_ca->verbs.guid )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Primary path is not on the same CA as QP.\n")
);
return IB_INVALID_SETTING;
}
@@ -612,7 +612,7 @@
p_conn->p_req_info->port_idx = p_port_cm->port_idx;
*pp_port_cm = p_port_cm;
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_SUCCESS;
}
@@ -629,26 +629,26 @@
cm_port_agent_t *p_port_cm;
ib_ca_attr_t *p_ca_attr;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Get the alternate path port attributes. */
status = __get_port_attr( &p_conn->path[1].sgid,
p_conn->path[1].slid,
&p_port_cm, &p_ca_attr );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("__get_port_attr failed for alternate path.\n")
);
return status;
}
if( p_ca_attr->ca_guid != p_conn->p_req_info->p_ca_attr->ca_guid
)
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Primary and alternate paths on different
CAs.\n") );
return IB_INVALID_SETTING;
}
p_conn->p_req_info->alt_port_idx = p_port_cm->port_idx;
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_SUCCESS;
}
@@ -740,7 +740,7 @@
struct _qp_rtr *p_rtr;
struct _qp_rts *p_rts;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
p_conn->state = CM_CONN_REQ_RCVD;
p_conn->was_active = FALSE;
@@ -848,7 +848,7 @@
/* copy mad info for cm handoff */
p_conn->mads.req = *p_req;
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
void
@@ -862,7 +862,7 @@
ib_cm_req_rec_t req_rec;
ib_rej_status_t rej_status;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
CL_ASSERT( p_port_cm );
CL_ASSERT( p_listen );
@@ -876,7 +876,7 @@
{
/* The request is malformed. Reject it. */
__reject_req( p_port_cm, p_mad, rej_status );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("REJ sent for malformed REQ.\n") );
return;
}
@@ -888,7 +888,7 @@
{
/* Reject the request for insufficient resources. */
__reject_req( p_port_cm, p_mad, IB_REJ_INSUF_RESOURCES
);
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("REJ sent for insufficient resources.\n") );
return;
}
@@ -924,7 +924,7 @@
/* Return the REQ to the mad pool */
ib_put_mad( p_mad );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -939,7 +939,7 @@
ib_rej_status_t rej_status;
ib_api_status_t status;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
CL_ASSERT( p_port_cm );
CL_ASSERT( p_conn );
@@ -961,7 +961,7 @@
__repeated_mad( p_port_cm, p_conn, p_mad );
/* Release reference on p_conn obtained from
__match_peer. */
__deref_conn( p_conn );
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("Won peer compare, repeating REQ.\n") );
return;
}
@@ -972,7 +972,7 @@
__repeated_mad( p_port_cm, p_conn, p_mad );
/* Release reference on p_conn obtained from
__match_peer. */
__deref_conn( p_conn );
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("Won peer compare, repeating REQ.\n") );
return;
}
@@ -987,7 +987,7 @@
/* The request is malformed. Reject it. */
__reject_req( p_port_cm, p_mad, rej_status );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("REJ sent for malformed REQ.\n") );
return;
}
@@ -1000,7 +1000,7 @@
cm_res_release( p_conn );
/* Release reference on p_conn obtained from
__match_peer. */
__deref_conn( p_conn );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("REQ in invalid state.\n") );
return;
}
@@ -1021,7 +1021,7 @@
/* Return the REQ to the mad pool */
ib_put_mad( p_mad );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -1036,7 +1036,7 @@
ib_rej_status_t rej_status;
al_conn_t *p_conn_handoff;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
CL_ASSERT( p_conn );
@@ -1059,7 +1059,7 @@
cl_spinlock_release( &gp_cm->obj.lock );
__conn_reject( p_conn, IB_REJ_INVALID_SID, NULL, 0, NULL
);
cm_res_release( p_conn );
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("Handoff failed on svc_id!\n") );
return IB_INVALID_PARAMETER;
}
@@ -1076,7 +1076,7 @@
/* The request does not conform to the handoff process
service. */
__conn_reject( p_conn, rej_status, NULL, 0, NULL );
cm_res_release( p_conn );
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("Handoff failed on svc_id info!\n") );
return IB_INVALID_PARAMETER;
}
@@ -1089,7 +1089,7 @@
/* Reject the request for insufficient resources. */
__conn_reject( p_conn, IB_REJ_INSUF_RESOURCES, NULL, 0,
NULL );
cm_res_release( p_conn );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Handoff failed on insufficient resources.\n")
);
return IB_INSUFFICIENT_MEMORY;
}
@@ -1129,7 +1129,7 @@
/* deref the listen object */
deref_al_obj( &p_listen->obj );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_SUCCESS;
}
@@ -1145,13 +1145,13 @@
al_conn_t *p_conn;
al_listen_t *p_listen;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
p_async_mad = PARENT_STRUCT( p_item, cm_async_mad_t, item );
p_req = (mad_cm_req_t*)p_async_mad->p_mad->p_mad_buf;
p_port_cm = p_async_mad->p_port_cm;
- CL_TRACE( AL_DBG_CM, g_al_dbg_lvl, ("REQ: comm_id (x%x)
received\n",
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM , ("REQ: comm_id
(x%x) received\n",
p_req->local_comm_id ) );
/* Match against pending connections using remote comm ID and CA
GUID. */
@@ -1166,7 +1166,7 @@
__repeated_mad( p_port_cm, p_conn, p_async_mad->p_mad );
__deref_conn( p_conn );
cl_free( p_async_mad );
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("Duplicate REQ received.\n") );
return;
}
@@ -1179,7 +1179,7 @@
cl_spinlock_release( &gp_cm->obj.lock );
__reject_req( p_port_cm, p_async_mad->p_mad,
IB_REJ_STALE_CONN );
cl_free( p_async_mad );
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("REQ received for connection in TIME_WAIT
state.\n") );
return;
}
@@ -1194,12 +1194,12 @@
__listen_req( p_port_cm, p_listen, p_async_mad->p_mad );
deref_al_obj( &p_listen->obj );
cl_free( p_async_mad );
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("REQ matched a listen.\n") );
return;
}
- CL_TRACE( AL_DBG_CM, g_al_dbg_lvl, ("No listens active!\n") );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM , ("No listens
active!\n") );
/* Match against peer-to-peer requests using SID and compare
data. */
p_list_item = cl_qlist_find_from_head( &gp_cm->pending_list,
@@ -1210,7 +1210,7 @@
p_conn = PARENT_STRUCT( p_list_item, al_conn_t, map_item
);
__peer_req( p_port_cm, p_conn, p_async_mad->p_mad );
cl_free( p_async_mad );
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("REQ matched a peer-to-peer request.\n") );
return;
}
@@ -1219,7 +1219,7 @@
cl_spinlock_release( &gp_cm->obj.lock );
__reject_req( p_port_cm, p_async_mad->p_mad, IB_REJ_INVALID_SID
);
cl_free( p_async_mad );
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("REQ received but no match found.\n") );
}
@@ -1235,14 +1235,14 @@
al_conn_t *p_conn;
mad_cm_mra_t *p_mra;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
p_conn = PARENT_STRUCT( p_list_item, al_conn_t, map_item );
p_mra = (mad_cm_mra_t*)context;
if( p_conn->local_comm_id != p_mra->remote_comm_id )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("Local conn ID mismatch.\n") );
return CL_NOT_FOUND;
}
@@ -1250,12 +1250,12 @@
if( p_conn->remote_comm_id &&
p_conn->remote_comm_id == p_mra->local_comm_id )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("Remote conn ID mismatch.\n") );
return CL_NOT_FOUND;
}
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_SUCCESS;
}
@@ -1268,7 +1268,7 @@
uint32_t timeout;
uint8_t pkt_life;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Cancel the send for the REQ, REP, or LAP. */
ib_cancel_mad( p_conn->h_mad_svc, p_conn->p_send_mad );
@@ -1309,7 +1309,7 @@
__deref_conn( p_conn );
}
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -1320,7 +1320,7 @@
{
ib_cm_mra_rec_t mra_rec;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
CL_ASSERT( p_conn->h_qp );
@@ -1337,7 +1337,7 @@
*/
p_conn->pfn_cm_mra_cb( &mra_rec );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -1353,7 +1353,7 @@
boolean_t do_callback = TRUE;
uint64_t key;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
p_async_mad = PARENT_STRUCT( p_item, cm_async_mad_t, item );
p_port_cm = p_async_mad->p_port_cm;
@@ -1372,7 +1372,7 @@
ib_put_mad( p_async_mad->p_mad );
cl_free( p_async_mad );
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("MRA received for LAP that could not be
matched.\n") );
return;
}
@@ -1384,7 +1384,7 @@
if( p_map_item ==
(cl_map_item_t*)cl_qlist_end(
&gp_cm->pending_list ) )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("MRA received that could not be
matched.\n") );
cl_spinlock_release( &gp_cm->obj.lock );
@@ -1445,7 +1445,7 @@
break;
default:
- CL_TRACE( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM ,
("MRA received in invalid state.\n") );
do_callback = FALSE;
break;
@@ -1459,7 +1459,7 @@
ib_put_mad( p_async_mad->p_mad );
cl_free( p_async_mad );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -1507,7 +1507,7 @@
const ib_net64_t UNALIGNED *p_ca_guid;
uint8_t ari_len;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
p_conn = PARENT_STRUCT( p_list_item, al_conn_t, map_item );
p_rej = (mad_cm_rej_t*)context;
@@ -1519,7 +1519,7 @@
if( p_rej->remote_comm_id &&
p_conn->local_comm_id != p_rej->remote_comm_id )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("Local comm ID mismatch.\n") );
return CL_NOT_FOUND;
}
@@ -1528,7 +1528,7 @@
if( p_conn->remote_comm_id &&
p_conn->remote_comm_id != p_rej->local_comm_id )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("Remote comm ID mismatch.\n") );
return CL_NOT_FOUND;
}
@@ -1543,7 +1543,7 @@
if( ( p_conn->p_req_info->p_ca_attr ) &&
( p_conn->p_req_info->p_ca_attr->ca_guid !=
*p_ca_guid ) )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("Local CA GUID mismatch.\n") );
return CL_NOT_FOUND;
}
@@ -1552,7 +1552,7 @@
/* We reached here with a comm id match which is good enough for
me */
__ref_conn( p_conn );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_SUCCESS;
}
@@ -1568,7 +1568,7 @@
al_conn_t *p_conn;
uint64_t key;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
p_async_mad = PARENT_STRUCT( p_item, cm_async_mad_t, item );
p_port_cm = p_async_mad->p_port_cm;
@@ -1591,7 +1591,7 @@
ib_put_mad( p_async_mad->p_mad );
cl_free( p_async_mad );
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("REJ received that could not be
matched.\n") );
return;
}
@@ -1624,7 +1624,7 @@
__deref_conn( p_conn );
ib_put_mad( p_async_mad->p_mad );
cl_free( p_async_mad );
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("Request rejected (invalid SID) -
retrying.\n") );
return;
}
@@ -1663,7 +1663,7 @@
__deref_conn( p_conn );
ib_put_mad( p_async_mad->p_mad );
cl_free( p_async_mad );
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("REJ received in invalid state.\n") );
return;
}
@@ -1673,7 +1673,7 @@
ib_put_mad( p_async_mad->p_mad );
cl_free( p_async_mad );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -1691,7 +1691,7 @@
cm_port_agent_t *p_port_cm;
ib_api_status_t status;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
UNUSED_PARAM( p_rej_pdata );
/*
@@ -1743,7 +1743,7 @@
&p_port_cm, NULL );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("__get_port_attr returned %s\n",
ib_get_err_str(status)) );
return;
}
@@ -1758,7 +1758,7 @@
__cm_send( p_port_cm, p_conn );
__conn_abort( p_conn );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -1773,12 +1773,12 @@
al_conn_t *p_conn;
mad_cm_rep_t *p_rep;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
p_conn = PARENT_STRUCT( p_list_item, al_conn_t, map_item );
p_rep = (mad_cm_rep_t*)context;
- CL_PRINT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM ,
("p_conn:: local_comm_id (x%x) remote_comm_id (x%x)\n"
"p_rep:: local_comm_id (x%x) remote_comm_id (x%x)\n",
p_conn->local_comm_id,
@@ -1788,13 +1788,13 @@
if( p_conn->local_comm_id != p_rep->remote_comm_id )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("Local comm ID mismatch.\n") );
return CL_NOT_FOUND;
}
__ref_conn( p_conn );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_SUCCESS;
}
@@ -1806,7 +1806,7 @@
IN const al_conn_t* const
p_conn,
OUT ib_cm_rep_rec_t* const
p_rep_rec )
{
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
cl_memclr( p_rep_rec, sizeof(ib_cm_rep_rec_t) );
@@ -1820,7 +1820,7 @@
p_rep_rec->flow_ctrl = conn_rep_get_e2e_flow_ctl( p_rep );
p_rep_rec->apr_status = conn_rep_get_failover( p_rep );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
void
@@ -1831,7 +1831,7 @@
struct _qp_rtr *p_rtr;
struct _qp_rts *p_rts;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* The send should have been cancelled during MRA processing. */
p_conn->state = CM_CONN_REP_RCVD;
@@ -1907,7 +1907,7 @@
p_rts->qkey = p_rep->local_qkey;
*/
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
void
@@ -1921,12 +1921,12 @@
ib_cm_rep_rec_t rep_rec;
uint64_t key;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
p_async_mad = PARENT_STRUCT( p_item, cm_async_mad_t, item );
p_rep = (mad_cm_rep_t*)p_async_mad->p_mad->p_mad_buf;
- CL_TRACE( AL_DBG_CM, g_al_dbg_lvl, ("REP: comm_id (x%x)
received\n",
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM , ("REP: comm_id
(x%x) received\n",
p_rep->local_comm_id ) );
/* Check the pending list by the local connection ID. */
@@ -1946,7 +1946,7 @@
ib_put_mad( p_async_mad->p_mad );
cl_free( p_async_mad );
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("REP received that could not be
matched.\n") );
return;
}
@@ -1997,7 +1997,7 @@
break;
default:
- CL_TRACE( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM ,
("REP received in invalid state.\n") );
cm_res_release( p_conn );
ib_put_mad( p_async_mad->p_mad );
@@ -2007,7 +2007,7 @@
__deref_conn( p_conn );
cl_free( p_async_mad );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -2022,27 +2022,27 @@
al_conn_t *p_conn;
mad_cm_rtu_t *p_rtu;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
p_conn = PARENT_STRUCT( p_list_item, al_conn_t, map_item );
p_rtu = (mad_cm_rtu_t*)context;
if( p_conn->local_comm_id != p_rtu->remote_comm_id )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("Local comm ID mismatch.\n") );
return CL_NOT_FOUND;
}
if( p_conn->remote_comm_id != p_rtu->local_comm_id )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("Remote comm ID mismatch.\n") );
return CL_NOT_FOUND;
}
__ref_conn( p_conn );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_SUCCESS;
}
@@ -2052,7 +2052,7 @@
IN const al_conn_t* const p_conn,
OUT ib_cm_rtu_rec_t* const
p_rtu_rec )
{
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
cl_memclr( p_rtu_rec, sizeof(ib_cm_rtu_rec_t) );
@@ -2061,7 +2061,7 @@
p_rtu_rec->h_qp = p_conn->h_qp;
p_rtu_rec->qp_context = p_conn->h_qp->obj.context;
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
void
@@ -2075,12 +2075,12 @@
ib_pfn_cm_rtu_cb_t pfn_rtu;
ib_cm_rtu_rec_t rtu_rec;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
p_async_mad = PARENT_STRUCT( p_item, cm_async_mad_t, item );
p_rtu = (mad_cm_rtu_t*)p_async_mad->p_mad->p_mad_buf;
- CL_TRACE( AL_DBG_CM, g_al_dbg_lvl, ("RTU: comm_id (x%x)
received\n",
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM , ("RTU: comm_id
(x%x) received\n",
p_rtu->local_comm_id ) );
/* Find the connection by local connection ID. */
@@ -2090,7 +2090,7 @@
cl_spinlock_release( &gp_cm->obj.lock );
if( p_list_item == cl_qlist_end( &gp_cm->pending_list ) )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("RTU received that could not be matched.\n") );
ib_put_mad( p_async_mad->p_mad );
cl_free( p_async_mad );
@@ -2135,7 +2135,7 @@
break;
default:
- CL_TRACE( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM ,
("RTU received in invalid state.\n") );
cm_res_release( p_conn );
break;
@@ -2146,7 +2146,7 @@
ib_put_mad( p_async_mad->p_mad );
cl_free( p_async_mad );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -2161,33 +2161,33 @@
al_conn_t *p_conn;
mad_cm_dreq_t *p_dreq;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
p_conn = PARENT_STRUCT( p_list_item, al_conn_t, map_item );
p_dreq = (mad_cm_dreq_t*)context;
if( p_conn->local_comm_id != p_dreq->remote_comm_id )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("Local comm ID mismatch.\n") );
return CL_NOT_FOUND;
}
if( p_conn->remote_comm_id != p_dreq->local_comm_id )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("Remote comm ID mismatch.\n") );
return CL_NOT_FOUND;
}
if( p_conn->local_qpn != conn_dreq_get_remote_qpn( p_dreq ) )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("local QPN mismatch.\n") );
return CL_NOT_FOUND;
}
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_SUCCESS;
}
@@ -2197,7 +2197,7 @@
IN const al_conn_t* const p_conn,
OUT ib_cm_dreq_rec_t* const
p_dreq_rec )
{
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
cl_memclr( p_dreq_rec, sizeof(ib_cm_dreq_rec_t) );
@@ -2207,7 +2207,7 @@
p_dreq_rec->qp_type = p_conn->qp_type;
p_dreq_rec->qp_context = p_conn->h_qp->obj.context;
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -2223,7 +2223,7 @@
uint64_t key;
ib_cm_dreq_rec_t dreq_rec;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
p_async_mad = PARENT_STRUCT( p_item, cm_async_mad_t, item );
p_dreq = (mad_cm_dreq_t*)p_async_mad->p_mad->p_mad_buf;
@@ -2242,7 +2242,7 @@
(cl_map_item_t*)cl_qlist_end(
&gp_cm->time_wait_list ) )
{
cl_spinlock_release( &gp_cm->obj.lock );
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("DREQ received that could not be
matched.\n") );
ib_put_mad( p_async_mad->p_mad );
cl_free( p_async_mad );
@@ -2269,7 +2269,7 @@
__deref_conn( p_conn );
ib_put_mad( p_async_mad->p_mad );
cl_free( p_async_mad );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return;
}
@@ -2305,7 +2305,7 @@
break;
default:
- CL_TRACE( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM ,
("DREQ received in invalid state.\n") );
cm_res_release( p_conn );
ib_put_mad( p_async_mad->p_mad );
@@ -2325,7 +2325,7 @@
IN const al_conn_t* const
p_conn,
OUT ib_cm_drep_rec_t* const
p_drep_rec )
{
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
cl_memclr( p_drep_rec, sizeof(ib_cm_drep_rec_t) );
@@ -2336,7 +2336,7 @@
p_drep_rec->h_qp = p_conn->h_qp;
p_drep_rec->qp_context = p_conn->h_qp->obj.context;
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -2351,7 +2351,7 @@
al_conn_t *p_conn;
ib_cm_drep_rec_t drep_rec;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
p_async_mad = PARENT_STRUCT( p_item, cm_async_mad_t, item );
p_drep = (mad_cm_drep_t*)p_async_mad->p_mad->p_mad_buf;
@@ -2364,7 +2364,7 @@
if( p_map_item == cl_qmap_end( &gp_cm->conn_map ) )
{
cl_spinlock_release( &gp_cm->obj.lock );
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("DREP received that could not be matched.\n")
);
ib_put_mad( p_async_mad->p_mad );
cl_free( p_async_mad );
@@ -2402,7 +2402,7 @@
break;
default:
- CL_TRACE( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM ,
("DREP received in invalid state.\n") );
cm_res_release( p_conn );
}
@@ -2412,7 +2412,7 @@
ib_put_mad( p_async_mad->p_mad );
cl_free( p_async_mad );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -2424,7 +2424,7 @@
{
const lap_path_info_t* const p_path = &p_lap->alternate_path;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
CL_ASSERT( p_lap );
CL_ASSERT( p_path_rec );
@@ -2463,7 +2463,7 @@
p_path_rec->tclass = conn_lap_path_get_tclass( p_path );
}
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -2479,7 +2479,7 @@
al_conn_t *p_conn;
ib_cm_lap_rec_t lap_rec;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
p_async_mad = PARENT_STRUCT( p_item, cm_async_mad_t, item );
p_port_cm = p_async_mad->p_port_cm;
@@ -2496,7 +2496,7 @@
ib_put_mad( p_async_mad->p_mad );
cl_free( p_async_mad );
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("LAP received that could not be matched.\n") );
return;
}
@@ -2531,7 +2531,7 @@
break;
default:
- CL_TRACE( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM ,
("LAP received in invalid state.\n") );
cm_res_release( p_conn );
break;
@@ -2539,7 +2539,7 @@
ib_put_mad( p_async_mad->p_mad );
cl_free( p_async_mad );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -2552,13 +2552,13 @@
ib_ca_attr_t *p_ca_attr;
ib_qp_mod_t qp_mod;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
status = __get_port_attr( &p_conn->new_alt_path.sgid,
p_conn->new_alt_path.slid, &p_port_cm, &p_ca_attr );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("__get_port_attr returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -2576,14 +2576,14 @@
status = ib_modify_qp( p_conn->h_qp, &qp_mod );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("ib_modify_qp for LAP returned %s.\n",
ib_get_err_str(status)) );
return status;
}
cl_memcpy( &p_conn->path[(p_conn->idx_primary + 1) & 0x1],
&p_conn->new_alt_path, sizeof(ib_path_rec_t) );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_SUCCESS;
}
@@ -2600,7 +2600,7 @@
uint64_t key;
ib_cm_apr_rec_t apr_rec;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
p_async_mad = PARENT_STRUCT( p_item, cm_async_mad_t, item );
p_port_cm = p_async_mad->p_port_cm;
@@ -2614,7 +2614,7 @@
if( p_map_item == cl_qmap_end( &gp_cm->conn_map ) )
{
cl_spinlock_release( &gp_cm->obj.lock );
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("APR received that could not be matched.\n") );
ib_put_mad( p_async_mad->p_mad );
cl_free( p_async_mad );
@@ -2659,7 +2659,7 @@
default:
cm_res_release( p_conn );
- CL_TRACE( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM ,
("APR received in invalid state.\n") );
break;
}
@@ -2681,7 +2681,7 @@
ib_cm_drep_rec_t drep_rec;
ib_cm_drep_t cm_drep;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
p_conn = PARENT_STRUCT( p_item, al_conn_t, timeout_item );
@@ -2725,7 +2725,7 @@
/* Release the reference taken when sending. */
__deref_conn( p_conn );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -2738,7 +2738,7 @@
IN const uint8_t
ack_delay,
OUT req_path_info_t* const
p_req_path )
{
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
p_req_path->local_lid = p_path_rec->slid;
p_req_path->remote_lid = p_path_rec->dlid;
@@ -2765,7 +2765,7 @@
conn_req_path_clr_rsvd_fields( p_req_path );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_SUCCESS;
}
@@ -2777,7 +2777,7 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
if( p_cm_req->p_alt_path )
{
@@ -2785,7 +2785,7 @@
if( ib_path_rec_mtu( p_cm_req->p_primary_path ) !=
ib_path_rec_mtu( p_cm_req->p_alt_path ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Mismatched primary and alternate path
MTUs.\n") );
return IB_INVALID_SETTING;
}
@@ -2797,7 +2797,7 @@
if( status != IB_SUCCESS )
{
- CL_EXIT( AL_DBG_ERROR, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_ERROR);
return status;
}
}
@@ -2814,7 +2814,7 @@
if( status != IB_SUCCESS )
{
- CL_EXIT( AL_DBG_ERROR, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_ERROR);
return status;
}
@@ -2861,7 +2861,7 @@
IN const ib_cm_rep_t* const
p_cm_rep,
IN OUT al_conn_t* const
p_conn )
{
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
p_conn->mads.rep.hdr.attr_id = CM_REP_ATTR_ID;
p_conn->mads.rep.local_comm_id = p_conn->local_comm_id;
@@ -2905,7 +2905,7 @@
conn_rep_clr_rsvd_fields( &p_conn->mads.rep );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_SUCCESS;
}
@@ -2915,7 +2915,7 @@
IN const ib_cm_rtu_t* const
p_cm_rtu,
IN OUT al_conn_t* const
p_conn )
{
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
p_conn->mads.rtu.hdr.attr_id = CM_RTU_ATTR_ID;
@@ -2926,7 +2926,7 @@
conn_rtu_set_pdata( p_cm_rtu->p_rtu_pdata, p_cm_rtu->rtu_length,
&p_conn->mads.rtu );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -2939,7 +2939,7 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Cache the local QPN. */
p_conn->p_req_info->local_qpn = p_conn->h_qp->num;
@@ -2948,7 +2948,7 @@
status = __validate_primary_path( p_conn, pp_port_cm );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Primary path validation failed: %s.\n",
ib_get_err_str(status)) );
/* Reject and abort the connection. */
@@ -2960,7 +2960,7 @@
status = __validate_alt_path( p_conn );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Alternate path validation failed:
%s.\n",
ib_get_err_str(status)) );
@@ -2975,7 +2975,7 @@
if( p_cm_rep->qp_type != p_conn->p_req_info->xport_type )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("qp_type mistach!\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("qp_type mistach!\n") );
return IB_REJ_INVALID_XPORT;
}
@@ -2989,7 +2989,7 @@
set_al_obj_timeout( &p_cm_rep->h_qp->obj,
p_conn->retry_timeout * p_conn->max_cm_retries + 2000 );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return 0;
}
@@ -3003,13 +3003,13 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
status = __get_port_attr( &p_conn->path[0].sgid,
p_conn->path[0].slid,
pp_port_cm, NULL );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("__get_port_attr returned %s.\n",
ib_get_err_str(status)) );
/*
* Don't fail the connection since the remote side will
repeat
@@ -3023,7 +3023,7 @@
cm_save_rtu_qp_attr( p_cm_rtu, &p_conn->p_req_info->qp_mod_rtr
);
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_SUCCESS;
}
@@ -3038,7 +3038,7 @@
IN const uint8_t
ack_delay,
OUT lap_path_info_t* const
p_lap_path )
{
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
p_lap_path->local_lid = p_path_rec->slid;
p_lap_path->remote_lid = p_path_rec->dlid;
@@ -3066,7 +3066,7 @@
conn_lap_path_clr_rsvd_fields( p_lap_path );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_SUCCESS;
}
@@ -3086,7 +3086,7 @@
cm_port_agent_t *p_port_cm;
ib_ca_attr_t *p_ca_attr, *p_alt_ca_attr;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
CL_ASSERT( p_conn );
CL_ASSERT( pp_port_cm );
@@ -3097,7 +3097,7 @@
if( status != IB_SUCCESS )
{
/* Primary path invalid. Should have received a path
migration. */
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Primary connection path invalid!\n") );
return IB_INVALID_SETTING;
}
@@ -3107,7 +3107,7 @@
if( status != IB_SUCCESS )
{
/* Alternate path invalid. */
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Alternate path invalid!\n") );
return status;
}
@@ -3119,14 +3119,14 @@
if( p_ca_attr->ca_guid != p_alt_ca_attr->ca_guid )
{
/* Paths are not on the same CA. */
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Primary and alternate paths must be on the
same CA.\n") );
return IB_INVALID_SETTING;
}
*p_ack_delay = p_ca_attr->local_ack_delay;
*pp_port_cm = p_port_cm;
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_SUCCESS;
}
@@ -3136,7 +3136,7 @@
IN const ib_cm_dreq_t* const
p_cm_dreq,
OUT al_conn_t* const
p_conn )
{
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
p_conn->mads.dreq.hdr.attr_id = CM_DREQ_ATTR_ID;
p_conn->mads.dreq.local_comm_id = p_conn->local_comm_id;
@@ -3146,7 +3146,7 @@
&p_conn->mads.dreq );
conn_dreq_clr_rsvd_fields( &p_conn->mads.dreq );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
void
@@ -3154,7 +3154,7 @@
IN const ib_cm_drep_t* const
p_cm_drep,
OUT al_conn_t* const
p_conn )
{
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
p_conn->mads.drep.hdr.attr_id = CM_DREP_ATTR_ID;
p_conn->mads.drep.local_comm_id = p_conn->local_comm_id;
@@ -3162,7 +3162,7 @@
conn_drep_set_pdata( p_cm_drep->p_drep_pdata,
p_cm_drep->drep_length,
&p_conn->mads.drep );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -3174,7 +3174,7 @@
ib_api_status_t status;
cm_port_agent_t *p_port_cm;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
switch( p_conn->state )
{
@@ -3198,7 +3198,7 @@
default:
/* Invalid state. Fail the request. */
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Invalid state for sending MRA.\n") );
return IB_INVALID_STATE;
}
@@ -3218,14 +3218,14 @@
p_conn->path[p_conn->idx_primary].slid, &p_port_cm, NULL
);
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("__get_port_attr for MRA returned %s.\n",
ib_get_err_str(status)) );
return status;
}
status = __cm_send( p_port_cm, p_conn );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return status;
}
@@ -3238,7 +3238,7 @@
__conn_abort(
IN al_conn_t* const
p_conn )
{
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
switch( p_conn->state )
{
@@ -3286,7 +3286,7 @@
/* Should never get here. */
break;
}
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -3322,7 +3322,7 @@
struct _qp_rts *p_rts;
uint8_t pkt_life;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Format the request info. */
p_conn->p_req_info->svc_id = p_cm_req->svc_id;
@@ -3337,7 +3337,7 @@
(uint8_t*)cl_malloc( p_cm_req->compare_length );
if( !p_conn->p_req_info->p_compare_buffer )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("cl_malloc failed for compare buffer
[%d bytes].\n",
p_cm_req->compare_length) );
return IB_INSUFFICIENT_MEMORY;
@@ -3408,7 +3408,7 @@
status = __validate_primary_path( p_conn, pp_port_cm );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Primary path validation failure: %s\n",
ib_get_err_str(status)) );
return status;
}
@@ -3419,7 +3419,7 @@
status = __validate_alt_path( p_conn );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Alternate path validation failure:
%s\n",
ib_get_err_str(status)) );
return status;
@@ -3481,7 +3481,7 @@
&p_rtr->alternate_av );
}
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_SUCCESS;
}
@@ -3511,12 +3511,12 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Exported QPs have done this in user-mode already. */
if( AL_OBJ_IS_SUBTYPE( p_conn->h_qp, AL_OBJ_SUBTYPE_UM_EXPORT )
)
{
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_SUCCESS;
}
@@ -3529,12 +3529,12 @@
(IB_AC_RDMA_READ | IB_AC_RDMA_WRITE | IB_AC_LOCAL_WRITE
| IB_AC_MW_BIND) );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("cm_init_qp returned %s\n",
ib_get_err_str(status)) );
return status;
}
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_SUCCESS;
}
@@ -3547,12 +3547,12 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Exported QPs have done this in user-mode already. */
if( AL_OBJ_IS_SUBTYPE( p_conn->h_qp, AL_OBJ_SUBTYPE_UM_EXPORT )
)
{
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_SUCCESS;
}
@@ -3561,7 +3561,7 @@
p_conn->path[0].pkey, p_cm_rep->access_ctrl );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("cm_init_qp returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -3573,7 +3573,7 @@
p_cm_rep->pp_recv_failure );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("ib_post_recv returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -3584,11 +3584,11 @@
&p_conn->p_req_info->qp_mod_rts );
if( status != IB_SUCCESS )
{
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("cm_rts_qp returned %s.\n",
ib_get_err_str(status)) );
}
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return status;
}
@@ -3600,12 +3600,12 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Exported QPs have done this in user-mode already. */
if( AL_OBJ_IS_SUBTYPE( p_conn->h_qp, AL_OBJ_SUBTYPE_UM_EXPORT )
)
{
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_SUCCESS;
}
@@ -3613,11 +3613,11 @@
&p_conn->p_req_info->qp_mod_rts );
if( status != IB_SUCCESS )
{
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("cm_rts_qp returned %s.\n",
ib_get_err_str(status)) );
}
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return status;
}
@@ -3633,16 +3633,16 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
if( AL_OBJ_INVALID_HANDLE( h_al, AL_OBJ_TYPE_H_AL ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_AL_HANDLE\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_AL_HANDLE\n") );
return IB_INVALID_AL_HANDLE;
}
if( !p_cm_listen || !pfn_listen_err_cb || !ph_cm_listen )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -3653,7 +3653,7 @@
if( status == IB_SUCCESS )
deref_al_obj( &(*ph_cm_listen)->obj );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return status;
}
@@ -3665,16 +3665,16 @@
ib_api_status_t status;
al_conn_t *p_conn;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
if( !h_cm )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_HANDLE\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_HANDLE\n") );
return IB_INVALID_HANDLE;
}
if( !p_cm_rej )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -3689,7 +3689,7 @@
/* Release the reference taken for the callback. */
__deref_conn( p_conn );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_SUCCESS;
}
@@ -3703,16 +3703,16 @@
ib_api_status_t status;
al_conn_t *p_conn;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
if( !h_cm )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_HANDLE\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_HANDLE\n") );
return IB_INVALID_HANDLE;
}
if( !p_cm_mra )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -3725,11 +3725,11 @@
cm_res_release( p_conn );
if( status != IB_SUCCESS )
{
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("__cm_send for MRA returned %s.\n",
ib_get_err_str(status)) );
}
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return status;
}
@@ -3741,11 +3741,11 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
if( !p_cm_req )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -3753,7 +3753,7 @@
if( ( p_cm_req->p_req_pdata ) &&
( p_cm_req->req_length > IB_REQ_PDATA_SIZE ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Invalid pdata length.\n") );
return IB_INVALID_SETTING;
}
@@ -3761,7 +3761,7 @@
/* Make sure there's a primary path. Both SIDR and CM require
it. */
if( !p_cm_req->p_primary_path )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Invalid primary path record.\n") );
return IB_INVALID_SETTING;
}
@@ -3770,7 +3770,7 @@
switch( p_cm_req->qp_type )
{
default:
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid
qp_type.\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid
qp_type.\n") );
return IB_INVALID_SETTING;
case IB_QPT_RELIABLE_CONN:
@@ -3778,7 +3778,7 @@
if( AL_OBJ_INVALID_HANDLE( p_cm_req->h_qp,
AL_OBJ_TYPE_H_QP ) ||
(p_cm_req->h_qp->type != p_cm_req->qp_type) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_QP_HANDLE\n") );
return IB_INVALID_QP_HANDLE;
}
@@ -3789,7 +3789,7 @@
case IB_QPT_UNRELIABLE_DGRM:
if( AL_OBJ_INVALID_HANDLE( p_cm_req->h_al,
AL_OBJ_TYPE_H_AL ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_AL_HANDLE\n") );
return IB_INVALID_AL_HANDLE;
}
@@ -3797,7 +3797,7 @@
break;
}
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return status;
}
@@ -3812,16 +3812,16 @@
ib_al_handle_t h_al;
al_conn_t *p_conn;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
if( !h_cm_req )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_HANDLE\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_HANDLE\n") );
return IB_INVALID_HANDLE;
}
if( !p_cm_rep )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -3839,11 +3839,11 @@
if( ( p_cm_rep->p_rep_pdata ) &&
( p_cm_rep->rep_length > IB_REP_PDATA_SIZE ) )
{
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid pdata
length.\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR , ("Invalid
pdata length.\n") );
cm_res_release( p_conn );
__deref_conn( p_conn );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_INVALID_SETTING;
}
@@ -3851,7 +3851,7 @@
if( p_conn->state != CM_CONN_REQ_RCVD &&
p_conn->state != CM_CONN_REQ_MRA_SENT )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Connection in invalid state (%d).\n",
p_conn->state) );
/*
* The connection will get cleaned up by whatever put it
in the
@@ -3867,7 +3867,7 @@
switch( p_cm_rep->qp_type )
{
default:
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid
qp_type.\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR , ("Invalid
qp_type.\n") );
status = IB_INVALID_SETTING;
break;
@@ -3876,7 +3876,7 @@
if( AL_OBJ_INVALID_HANDLE( p_cm_rep->h_qp,
AL_OBJ_TYPE_H_QP ) ||
(p_cm_rep->h_qp->type != p_cm_rep->qp_type) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_QP_HANDLE\n") );
status = IB_INVALID_QP_HANDLE;
}
@@ -3887,7 +3887,7 @@
(AL_OBJ_INVALID_HANDLE( p_cm_rep->h_qp,
AL_OBJ_TYPE_H_QP ) ||
(p_cm_rep->h_qp->type != p_cm_rep->qp_type) ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_QP_HANDLE\n") );
status = IB_INVALID_QP_HANDLE;
}
@@ -3899,7 +3899,7 @@
cm_res_release( p_conn );
__deref_conn( p_conn );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return status;
}
@@ -3929,7 +3929,7 @@
/* Release the reference taken for the callback. */
__deref_conn( p_conn );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return status;
}
@@ -3943,16 +3943,16 @@
al_conn_t *p_conn;
ib_api_status_t status;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
if( !h_cm_rep )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_HANDLE\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_HANDLE\n") );
return IB_INVALID_HANDLE;
}
if( !p_cm_rtu )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -3964,7 +3964,7 @@
if( ( p_cm_rtu->p_rtu_pdata ) &&
( p_cm_rtu->rtu_length > IB_RTU_PDATA_SIZE ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Invalid pdata length.\n") );
cm_res_release( p_conn );
@@ -3975,7 +3975,7 @@
if( p_conn->state != CM_CONN_REP_RCVD &&
p_conn->state != CM_CONN_REP_MRA_SENT )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Connection in invalid state (%d) for RTU.\n",
p_conn->state) );
cm_res_release( p_conn );
@@ -3989,7 +3989,7 @@
*/
if( p_conn->p_sync_event )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Connection in invalid state. Sync call in
progress.\n" ) );
cm_res_release( p_conn );
@@ -4004,7 +4004,7 @@
/* Release the reference taken for the callback. */
__deref_conn( p_conn );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_SUCCESS;
}
@@ -4017,11 +4017,11 @@
ib_api_status_t status;
al_conn_t *p_conn;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
if( !p_cm_dreq )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -4029,7 +4029,7 @@
switch( p_cm_dreq->qp_type )
{
default:
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid
qp_type.\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid
qp_type.\n") );
return IB_INVALID_SETTING;
case IB_QPT_RELIABLE_CONN:
@@ -4037,7 +4037,7 @@
if( AL_OBJ_INVALID_HANDLE( p_cm_dreq->h_qp,
AL_OBJ_TYPE_H_QP ) ||
(p_cm_dreq->h_qp->type != p_cm_dreq->qp_type) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_QP_HANDLE\n") );
return IB_INVALID_QP_HANDLE;
}
@@ -4046,7 +4046,7 @@
if( !((al_conn_qp_t*)p_cm_dreq->h_qp)->p_conn )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("No connection info!\n") );
return IB_INVALID_SETTING;
@@ -4064,7 +4064,7 @@
*/
if( p_conn->state != CM_CONN_ESTABLISHED )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("Invalid state (%d) for sending DREQ.\n",
p_conn->state) );
cm_res_release( p_conn );
@@ -4074,7 +4074,7 @@
if( ( p_cm_dreq->p_dreq_pdata ) &&
( p_cm_dreq->dreq_length > IB_DREQ_PDATA_SIZE ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Invalid pdata length.\n") );
cm_res_release( p_conn );
@@ -4100,7 +4100,7 @@
cm_res_release( p_conn );
__deref_conn( p_conn );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return status;
}
@@ -4114,16 +4114,16 @@
al_conn_t *p_conn;
ib_api_status_t status;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
if( !h_cm_dreq )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_HANDLE\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_HANDLE\n") );
return IB_INVALID_HANDLE;
}
if( !p_cm_drep )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -4132,7 +4132,7 @@
cm_res_acquire( p_conn );
if( p_conn->state != CM_CONN_DREQ_RCVD )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("Invalid state (%d) for DREP.\n",
p_conn->state) );
cm_res_release( p_conn );
@@ -4147,7 +4147,7 @@
/* Release the reference taken while processing. */
__deref_conn( p_conn );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_SUCCESS;
}
@@ -4158,11 +4158,11 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
if( !p_cm_lap )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -4170,7 +4170,7 @@
switch( p_cm_lap->qp_type )
{
default:
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid
qp_type.\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid
qp_type.\n") );
return IB_INVALID_SETTING;
case IB_QPT_RELIABLE_CONN:
@@ -4178,7 +4178,7 @@
if( AL_OBJ_INVALID_HANDLE( p_cm_lap->h_qp,
AL_OBJ_TYPE_H_QP ) ||
(p_cm_lap->h_qp->type != p_cm_lap->qp_type) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_QP_HANDLE\n") );
return IB_INVALID_QP_HANDLE;
}
@@ -4188,13 +4188,13 @@
/* Make sure a path was provided. */
if( !p_cm_lap->p_alt_path )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("Path
missing.\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Path
missing.\n") );
return IB_INVALID_SETTING;
}
status = cm_conn_lap( p_cm_lap );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return status;
}
@@ -4206,16 +4206,16 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
if( !h_cm_lap )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_HANDLE\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_HANDLE\n") );
return IB_INVALID_HANDLE;
}
if( !p_cm_apr )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -4223,7 +4223,7 @@
switch( p_cm_apr->qp_type )
{
default:
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid
qp_type.\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid
qp_type.\n") );
return IB_INVALID_SETTING;
case IB_QPT_RELIABLE_CONN:
@@ -4231,7 +4231,7 @@
if( AL_OBJ_INVALID_HANDLE( p_cm_apr->h_qp,
AL_OBJ_TYPE_H_QP ) ||
(p_cm_apr->h_qp->type != p_cm_apr->qp_type) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_QP_HANDLE\n") );
return IB_INVALID_QP_HANDLE;
}
@@ -4240,7 +4240,7 @@
status = cm_conn_apr( h_cm_lap, p_cm_apr );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return status;
}
@@ -4250,17 +4250,17 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
if( AL_OBJ_INVALID_HANDLE( h_qp, AL_OBJ_TYPE_H_QP ) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("IB_INVALID_QP_HANDLE\n")
);
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_INVALID_QP_HANDLE\n") );
return IB_INVALID_QP_HANDLE;
}
status = cm_force_apm( h_qp );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return status;
}
@@ -4278,16 +4278,16 @@
ib_api_status_t status;
al_conn_t *p_conn;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
if( !h_cm_req )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_HANDLE\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_HANDLE\n") );
return IB_INVALID_HANDLE;
}
if( !svc_id )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n" ) );
return IB_INVALID_PARAMETER;
}
@@ -4296,7 +4296,7 @@
if( p_conn->state != CM_CONN_REQ_RCVD )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("State not valid for handoff\n" ) );
return IB_INVALID_STATE;
}
@@ -4304,14 +4304,14 @@
/* only the passive side or the server can handoff */
if( p_conn->was_active == TRUE )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("State not valid for handoff\n" ) );
return IB_INVALID_STATE;
}
if( p_conn->qp_type != IB_QPT_RELIABLE_CONN )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Invalid conn handle for handoff\n" ) );
return IB_INVALID_STATE;
}
@@ -4322,7 +4322,7 @@
/* Release the reference taken for the callback. */
__deref_conn( p_conn );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return status;
}
@@ -4365,7 +4365,7 @@
ib_api_status_t status;
al_conn_t *p_conn;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/*
* We need to serialize with the destruction of the connection
object.
@@ -4378,7 +4378,7 @@
{
/* The connection object has already been unbound. */
cl_spinlock_release( &gp_cm->obj.lock );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return;
}
@@ -4447,7 +4447,7 @@
}
__deref_conn( p_conn );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -4463,7 +4463,7 @@
al_conn_t *p_conn;
ib_cm_rej_rec_t rej_rec;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
p_conn = PARENT_STRUCT( p_item, al_conn_t, timeout_item );
@@ -4493,14 +4493,14 @@
default:
/* Something changed our state, so ignore the timeout.
*/
cm_res_release( p_conn );
- CL_TRACE( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM ,
("Connection in invalid state for send
timeout.\n") );
break;
}
/* Release the reference taken for the send. */
__deref_conn( p_conn );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
/*
@@ -4512,7 +4512,7 @@
{
al_conn_t *p_conn;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
p_conn = PARENT_STRUCT( p_item, al_conn_t, timeout_item );
@@ -4541,14 +4541,14 @@
default:
cm_res_release( p_conn );
/* Something changed our state, so ignore the timeout.
*/
- CL_TRACE( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM ,
("Connection in invalid state for send
timeout.\n") );
break;
}
/* Release the reference taken for the send. */
__deref_conn( p_conn );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -4564,7 +4564,7 @@
{
ib_qp_handle_t h_qp;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/*
* See if we've already been unbound. Note that if we haven't,
then we
@@ -4589,7 +4589,7 @@
deref_al_obj( &h_qp->obj );
}
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -4604,7 +4604,7 @@
uint32_t timewait = 0;
uint8_t pkt_life;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
switch( p_conn->state )
{
@@ -4672,7 +4672,7 @@
/* Set the timer. */
if( cl_timer_start( &p_conn->timer, timewait ) !=
CL_SUCCESS )
{
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("Timer failed to start for comm_id( x%x
)!\n",
p_conn->local_comm_id) );
/* Never mind the timer then, just release the
connection now. */
@@ -4685,7 +4685,7 @@
break;
}
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -4700,7 +4700,7 @@
ib_port_attr_t *p_port_attr;
uint16_t i_pkey;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* A full wildcard listen should have been trapped elsewhere. */
CL_ASSERT( !(p_info->ca_guid == IB_ALL_CAS &&
@@ -4714,7 +4714,7 @@
p_info->ca_guid != p_ca_attr->ca_guid )
{
/* CA GUID is not wildcard and does not match. */
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_INVALID_GUID;
}
/* CA GUID is either wildcard or matches. */
@@ -4726,7 +4726,7 @@
p_info->port_guid != p_port_attr->port_guid )
{
/* Port GUID is not wildcard and does not match. */
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_INVALID_GUID;
}
/* Port GUID is either wildcard or matches. */
@@ -4740,7 +4740,7 @@
* LID is not wildcard and does not match the LID range
for
* the port.
*/
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_INVALID_LID;
}
/* LID is either wildcard or is within range. */
@@ -4749,7 +4749,7 @@
if( p_info->pkey == IB_ALL_PKEYS )
{
/* PKey is wildcard. */
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_SUCCESS;
}
@@ -4759,12 +4759,12 @@
if( p_info->pkey == p_port_attr->p_pkey_table[i_pkey] )
{
/* PKey is valid for the port. */
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_SUCCESS;
}
}
/* No PKey match. */
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_INVALID_PKEY;
}
@@ -4780,7 +4780,7 @@
cm_port_agent_t *p_port_cm;
al_listen_t *p_listen;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
p_port_cm = PARENT_STRUCT(
PARENT_STRUCT( p_list_item, al_obj_t, pool_item ),
@@ -4789,7 +4789,7 @@
p_listen->err_code = __is_listen_valid( p_port_cm,
&p_listen->info );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return( p_listen->err_code == IB_SUCCESS ? CL_SUCCESS :
CL_NOT_FOUND );
}
@@ -4808,7 +4808,7 @@
cl_list_item_t *p_port_item;
al_listen_t *p_listen;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
UNUSED_PARAM( context );
p_listen = PARENT_STRUCT( p_list_item, al_listen_t, list_item );
@@ -4819,7 +4819,7 @@
p_listen->info.lid == IB_ALL_LIDS &&
p_listen->info.pkey == IB_ALL_PKEYS )
{
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_NOT_FOUND;
}
@@ -4831,14 +4831,14 @@
__port_cm_validate_listen, p_listen );
if( p_port_item == cl_qlist_end( &gp_cm->obj.obj_list ) )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("Invalid listen found.\n") );
/* Reference the listen and queue it for a callback. */
ref_al_obj( &p_listen->obj );
cl_async_proc_queue( gp_async_proc_mgr,
&p_listen->async_item );
return CL_SUCCESS;
}
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_NOT_FOUND;
}
@@ -4847,7 +4847,7 @@
void
__validate_listens( void )
{
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Move all invalid listens to a temporary list. */
cl_spinlock_acquire( &gp_cm->obj.lock );
@@ -4855,7 +4855,7 @@
&gp_cm->inactive_listen_list, __is_listen_bad, NULL );
cl_spinlock_release( &gp_cm->obj.lock );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -4866,7 +4866,7 @@
al_listen_t *p_listen;
ib_listen_err_rec_t err_rec;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
p_listen = PARENT_STRUCT( p_item, al_listen_t, async_item );
@@ -4881,7 +4881,7 @@
/* Release the reference to the listen to allow destruction to
complete. */
deref_al_obj( &p_listen->obj );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -4946,18 +4946,18 @@
IN const ib_listen_handle_t
h_cm_listen,
IN const ib_pfn_destroy_cb_t
pfn_destroy_cb OPTIONAL )
{
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
if( AL_OBJ_INVALID_HANDLE( h_cm_listen, AL_OBJ_TYPE_H_LISTEN ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_HANDLE\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_HANDLE\n") );
return IB_INVALID_HANDLE;
}
ref_al_obj( &h_cm_listen->obj );
h_cm_listen->obj.pfn_destroy( &h_cm_listen->obj, pfn_destroy_cb
);
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_SUCCESS;
}
@@ -5061,7 +5061,7 @@
cl_list_item_t *p_port_item;
al_listen_t listen;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/*
* Check validity of CA GUID, Port GUID, LID, and PKey if any
@@ -5088,13 +5088,13 @@
if( p_port_item == cl_qlist_end( &gp_cm->obj.obj_list )
)
{
/* No port could accomodate the listen. */
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("Invalid listen request.\n") );
return listen.err_code;
}
}
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return __is_listen_unique( p_new_listen );
}
@@ -5110,7 +5110,7 @@
al_listen_t *p_listen;
size_t alloc_size;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
cl_spinlock_acquire( &gp_cm->obj.lock );
/* Validate the listen paramters to make sure they are unique.
*/
@@ -5172,7 +5172,7 @@
{
cl_spinlock_release( &gp_cm->obj.lock );
p_listen->obj.pfn_destroy( &p_listen->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("attach_al_obj returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -5180,7 +5180,7 @@
*ph_cm_listen = p_listen;
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_SUCCESS;
}
@@ -5192,7 +5192,7 @@
{
ib_api_status_t ib_status = IB_SUCCESS;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
switch( p_conn->state )
{
@@ -5208,7 +5208,7 @@
default:
break;
}
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return ib_status;
}
@@ -5263,13 +5263,13 @@
cl_event_t sync_event;
cl_event_t *p_sync_event = NULL;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Get a connection object from the pool. */
p_conn = __get_conn( h_al, p_cm_req->qp_type );
if( !p_conn )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("__get_conn
failed.\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("__get_conn
failed.\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -5278,7 +5278,7 @@
if( ((al_conn_qp_t*)p_cm_req->h_qp)->p_conn )
{
cl_spinlock_release( &p_cm_req->h_qp->obj.lock );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("QP already connected.\n") );
return IB_INVALID_STATE;
}
@@ -5292,7 +5292,7 @@
if( status != IB_SUCCESS )
{
__deref_conn( p_conn );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("__conn_save_user_req failed.\n") );
return status;
}
@@ -5302,7 +5302,7 @@
if( status != IB_SUCCESS )
{
__deref_conn( p_conn );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("__format_mad_req failed.\n") );
return status;
}
@@ -5312,7 +5312,7 @@
if( status != IB_SUCCESS )
{
__deref_conn( p_conn );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("__cm_pre_req returned %s\n",
ib_get_err_str(status)) );
return status;
}
@@ -5350,7 +5350,7 @@
if( p_sync_event )
cl_event_destroy( p_sync_event );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("__cm_send returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -5359,7 +5359,7 @@
/* wait on event if synchronous operation */
if( p_sync_event )
{
- CL_TRACE( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM ,
("event blocked on REQ...\n") );
cl_event_wait_on( p_sync_event, EVENT_NO_TIMEOUT, FALSE
);
@@ -5367,7 +5367,7 @@
}
/* We will set the retry timer upon completion. */
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_SUCCESS;
}
@@ -5382,7 +5382,7 @@
cm_port_agent_t *p_port_cm;
ib_rej_status_t rej_status;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
cl_spinlock_acquire( &p_cm_rep->h_qp->obj.lock );
if( ((al_conn_qp_t*)p_cm_rep->h_qp)->p_conn )
@@ -5390,7 +5390,7 @@
cl_spinlock_release( &p_cm_rep->h_qp->obj.lock );
__conn_reject( p_conn, IB_REJ_INSUF_QP, NULL, 0, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("QP already connected.\n") );
return IB_INVALID_QP_HANDLE;
}
@@ -5406,7 +5406,7 @@
/* Reject and abort the connection. */
__conn_reject( p_conn, rej_status, NULL, 0, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("__conn_save_user_rep failed.\n") );
return IB_INVALID_SETTING;
}
@@ -5418,7 +5418,7 @@
/* Reject and abort the connection. */
__conn_reject( p_conn, IB_REJ_INSUF_QP, NULL, 0, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("__format_mad_rep failed.\n") );
return status;
}
@@ -5430,7 +5430,7 @@
/* Reject and abort the connection. */
__conn_reject( p_conn, IB_REJ_INSUF_QP, NULL, 0, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("__cm_pre_req returned %s\n",
ib_get_err_str(status)) );
return status;
}
@@ -5449,12 +5449,12 @@
/* Reject and abort the connection. */
__conn_reject( p_conn, IB_REJ_INSUF_QP, NULL, 0, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("__cm_send returned %s.\n",
ib_get_err_str(status)) );
return status;
}
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_SUCCESS;
}
@@ -5468,13 +5468,13 @@
ib_api_status_t status;
cm_port_agent_t *p_port_cm;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* save user info */
status = __conn_save_user_rtu( p_cm_rtu, p_conn, &p_port_cm );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("__conn_save_user_rtu returned %s.\n",
ib_get_err_str(status)) );
/*
* Don't fail the connection since the remote side will
repeat
@@ -5493,7 +5493,7 @@
/* Reject and abort the connection. */
__conn_reject( p_conn, IB_REJ_INSUF_QP, NULL, 0, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("cm_pre_rtu to RTS returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -5506,7 +5506,7 @@
/* No need to check the send status since the RTU is unreliable.
*/
__cm_send( p_port_cm, p_conn );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_SUCCESS;
}
@@ -5521,13 +5521,13 @@
uint8_t ack_delay;
ib_api_status_t status;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
p_conn = ((al_conn_qp_t*)p_cm_lap->h_qp)->p_conn;
if( !p_conn )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Invalid connection info.\n") );
return IB_INVALID_STATE;
}
@@ -5536,7 +5536,7 @@
if( !p_conn->was_active )
{
/* Only the side that took the active role can initialte
a LAP. */
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Only the active side of a connection can
initiate a LAP.\n") );
cm_res_release( p_conn );
@@ -5546,7 +5546,7 @@
if( p_conn->state != CM_CONN_ESTABLISHED )
{
/* Only allow sending LAP if in the established state.
*/
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Invalid connection state (%d) for sending
LAP.\n",
p_conn->state) );
@@ -5568,7 +5568,7 @@
status = __validate_lap_path( p_conn, &p_port_cm, &ack_delay );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("__validate_lap_path returned %s.\n",
ib_get_err_str(status)) );
cm_res_release( p_conn );
@@ -5580,7 +5580,7 @@
&p_conn->mads.lap.alternate_path );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("__format_mad_lap_path returned %s.\n",
ib_get_err_str(status)) );
cm_res_release( p_conn );
@@ -5598,7 +5598,7 @@
&p_conn->mads.lap );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("lap pdata
invalid.\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("lap pdata
invalid.\n") );
cm_res_release( p_conn );
return status;
@@ -5622,7 +5622,7 @@
uint8_t ack_delay;
ib_api_status_t status;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
p_conn = h_cm_lap;
@@ -5630,7 +5630,7 @@
if( p_conn->was_active )
{
/* Only the side that took the active role can initiate
a LAP. */
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Only the inactive side of a connection can
initiate a APR.\n") );
cm_res_release( p_conn );
@@ -5641,7 +5641,7 @@
if( p_conn->state != CM_CONN_LAP_RCVD )
{
/* Only allow sending LAP if in the established state.
*/
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Invalid connection state (%d) for sending
APR.\n",
p_conn->state) );
@@ -5652,7 +5652,7 @@
status = __validate_lap_path( p_conn, &p_port_cm, &ack_delay );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("__validate_lap_path returned %s.\n",
ib_get_err_str(status)) );
cm_res_release( p_conn );
@@ -5663,7 +5663,7 @@
status = __cm_lap_qp( p_conn );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("lap failed on qp with %s.\n",
ib_get_err_str(status)) );
cm_res_release( p_conn );
@@ -5679,7 +5679,7 @@
p_cm_apr->info_length, &p_conn->mads.apr );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("apr_info invalid\n") );
cm_res_release( p_conn );
@@ -5689,7 +5689,7 @@
p_cm_apr->apr_length, &p_conn->mads.apr );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("apr pdata invalid\n") );
cm_res_release( p_conn );
@@ -5717,7 +5717,7 @@
ib_api_status_t status;
cm_port_agent_t *p_port_cm;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
p_conn = ((al_conn_qp_t*)p_cm_dreq->h_qp)->p_conn;
@@ -5732,7 +5732,7 @@
p_conn->path[p_conn->idx_primary].slid, &p_port_cm, NULL
);
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("__get_port_attr for DREQ returned %s.\n",
ib_get_err_str(status)) );
return status;
@@ -5742,7 +5742,7 @@
status = __cm_send( p_port_cm, p_conn );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("__cm_send for DREQ returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -5750,7 +5750,7 @@
/* Set the state. */
p_conn->state = CM_CONN_DREQ_SENT;
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_SUCCESS;
}
@@ -5764,7 +5764,7 @@
ib_api_status_t status;
cm_port_agent_t *p_port_cm;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Format the DREP. */
__format_mad_drep( p_cm_drep, p_conn );
@@ -5787,6 +5787,6 @@
__cm_send( p_port_cm, p_conn );
}
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return status;
}
Index: core/al/kernel/al_cm_sidr.c
===================================================================
--- core/al/kernel/al_cm_sidr.c (revision 1349)
+++ core/al/kernel/al_cm_sidr.c (working copy)
@@ -56,7 +56,7 @@
ib_api_status_t status;
cm_port_agent_t *p_port_cm;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
CL_ASSERT( p_conn );
CL_ASSERT( p_conn->p_req_info );
@@ -66,7 +66,7 @@
&p_port_cm, &p_conn->p_req_info->p_ca_attr );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("__get_port_attr failed for primary path.\n")
);
return status;
}
@@ -74,7 +74,7 @@
p_conn->p_req_info->port_idx = p_port_cm->port_idx;
*pp_port_cm = p_port_cm;
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_SUCCESS;
}
@@ -84,7 +84,7 @@
IN const ib_cm_req_t* const
p_cm_req,
IN OUT al_conn_t* const
p_conn )
{
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Format the rest of the REQ. */
p_conn->mads.sidr_req.hdr.attr_id = CM_SIDR_REQ_ATTR_ID;
@@ -111,7 +111,7 @@
IN OUT al_conn_t* const
p_conn,
IN const mad_cm_sidr_req_t* const p_req )
{
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Store pertinent information in the connection. */
p_conn->remote_comm_id = p_req->req_id;
@@ -170,7 +170,7 @@
al_conn_t *p_conn;
cm_port_agent_t *p_port_cm;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
CL_ASSERT( p_cm_req->pfn_cm_rep_cb );
@@ -178,7 +178,7 @@
p_conn = __get_conn( h_al, p_cm_req->qp_type );
if( !p_conn )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("__get_conn
failed.\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("__get_conn
failed.\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -205,7 +205,7 @@
if( status != IB_SUCCESS )
{
__deref_conn( p_conn );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Primary path validation failure: %s\n",
ib_get_err_str(status)) );
return status;
}
@@ -215,7 +215,7 @@
if( status != IB_SUCCESS )
{
__deref_conn( p_conn );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("__format_sidr_mad_req failed.\n") );
return status;
}
@@ -235,14 +235,14 @@
{
cm_res_release( p_conn );
__deref_conn( p_conn );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("__cm_send returned %s.\n",
ib_get_err_str(status)) );
return status;
}
cm_res_release( p_conn );
/* We will set the retry timer upon completion. */
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_SUCCESS;
}
@@ -254,7 +254,7 @@
mad_cm_sidr_req_t *p_sidr_req;
al_listen_t *p_listen;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
CL_ASSERT( p_list_item );
CL_ASSERT( context );
@@ -267,14 +267,14 @@
if( p_sidr_req->hdr.class_ver != IB_MCLASS_CM_VER_2 )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("Class ver mismatch.\n") );
return CL_NOT_FOUND;
}
if( p_sidr_req->sid != p_listen->info.svc_id )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl, ("Svc ID
mismatch.\n") );
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM , ("Svc ID
mismatch.\n") );
return CL_NOT_FOUND;
}
@@ -282,7 +282,7 @@
p_sidr_req->pkey &&
( p_sidr_req->pkey != p_listen->info.pkey ) )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl, ("pkey
mismatch.\n") );
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM , ("pkey
mismatch.\n") );
return CL_NOT_FOUND;
}
@@ -292,7 +292,7 @@
p_listen->info.p_compare_buffer,
p_listen->info.compare_length ) )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("Svc ID match but compare buffer
mismatch.\n") );
return CL_NOT_FOUND;
}
@@ -301,7 +301,7 @@
/* Reference the listen so that it doesn't go away. */
ref_al_obj( &p_listen->obj );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_SUCCESS;
}
@@ -312,7 +312,7 @@
{
mad_cm_sidr_req_t *p_req;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
CL_ASSERT( p_mad );
CL_ASSERT( p_req_rec );
@@ -327,7 +327,7 @@
p_req_rec->qp_type = IB_QPT_UNRELIABLE_DGRM;
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
void
@@ -339,7 +339,7 @@
mad_cm_sidr_req_t *p_req;
mad_cm_sidr_rep_t *p_rep;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
CL_ASSERT( p_port_cm );
CL_ASSERT( p_mad );
@@ -370,7 +370,7 @@
__cm_send_mad( p_port_cm, p_mad );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
void
@@ -383,7 +383,7 @@
mad_cm_sidr_req_t *p_req;
ib_cm_req_rec_t req_rec;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
CL_ASSERT( p_port_cm );
CL_ASSERT( p_listen );
@@ -401,7 +401,7 @@
{
/* Reject the request for insufficient resources. */
__reject_sidr_req( p_port_cm, p_mad, IB_SIDR_REJECT );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("REJ sent for insufficient resources.\n") );
return;
}
@@ -433,7 +433,7 @@
/* Return the REQ to the mad pool */
ib_put_mad( p_mad );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
void
@@ -446,7 +446,7 @@
cl_list_item_t *p_list_item;
al_listen_t *p_listen;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
p_async_mad = PARENT_STRUCT( p_item, cm_async_mad_t, item );
p_req = (mad_cm_sidr_req_t*)p_async_mad->p_mad->p_mad_buf;
@@ -475,12 +475,12 @@
cl_spinlock_release( &gp_cm->obj.lock );
__reject_sidr_req( p_port_cm, p_async_mad->p_mad,
IB_SIDR_UNSUPPORTED );
cl_free( p_async_mad );
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("REQ received but no match found.\n") );
return;
}
- CL_TRACE( AL_DBG_CM, g_al_dbg_lvl, ("REQ matched a listen.\n")
);
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM , ("REQ matched a
listen.\n") );
cl_spinlock_release( &gp_cm->obj.lock );
p_listen = PARENT_STRUCT( p_list_item, al_listen_t, list_item );
@@ -488,7 +488,7 @@
deref_al_obj( &p_listen->obj );
cl_free( p_async_mad );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -500,12 +500,12 @@
ib_api_status_t status;
ib_qp_attr_t qp_attr;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Initialize the QP. */
if( ( p_cm_rep->status == IB_SIDR_SUCCESS ) && !p_cm_rep->h_qp )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid
h_qp\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid
h_qp\n") );
return IB_INVALID_QP_HANDLE;
}
@@ -514,7 +514,7 @@
&p_conn->mads.sidr_rep );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid
p_data\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid
p_data\n") );
return status;
}
@@ -545,7 +545,7 @@
status = ib_query_qp( p_cm_rep->h_qp, &qp_attr );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("ib_query_qp failed with status %s\n",
ib_get_err_str(status)) );
return status;
@@ -572,12 +572,12 @@
*/
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("__cm_send returned %s.\n",
ib_get_err_str(status)) );
return status;
}
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_SUCCESS;
}
@@ -594,12 +594,12 @@
al_conn_t *p_conn;
mad_cm_sidr_rep_t *p_rep;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
p_conn = PARENT_STRUCT( p_list_item, al_conn_t, map_item );
p_rep = (mad_cm_sidr_rep_t*)context;
- CL_PRINT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM ,
("p_conn:: local_comm_id (x%x)\n"
"p_rep:: local_comm_id (x%x)\n",
p_conn->local_comm_id,
@@ -607,19 +607,19 @@
if( p_conn->local_comm_id != p_rep->req_id )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("Local comm ID mismatch.\n") );
return CL_NOT_FOUND;
}
if( p_conn->p_req_info->svc_id != p_rep->sid )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("Service ID mismatch.\n") );
return CL_NOT_FOUND;
}
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_SUCCESS;
}
@@ -635,7 +635,7 @@
al_conn_t *p_conn;
ib_cm_rep_rec_t rep_rec;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
p_async_mad = PARENT_STRUCT( p_item, cm_async_mad_t, item );
p_rep = (mad_cm_sidr_rep_t*)p_async_mad->p_mad->p_mad_buf;
@@ -647,7 +647,7 @@
cl_spinlock_release( &gp_cm->obj.lock );
if( p_list_item == cl_qlist_end( &gp_cm->pending_list ) )
{
- CL_TRACE_EXIT( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("REP received that could not be matched.\n") );
ib_put_mad( p_async_mad->p_mad );
cl_free( p_async_mad );
@@ -698,7 +698,7 @@
break;
default:
- CL_TRACE( AL_DBG_CM, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM ,
("REP received in invalid state.\n") );
cm_res_release( p_conn );
break;
@@ -709,6 +709,6 @@
ib_put_mad( p_async_mad->p_mad );
cl_free( p_async_mad );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
Index: core/al/kernel/al_dev.c
===================================================================
--- core/al/kernel/al_dev.c (revision 1349)
+++ core/al/kernel/al_dev.c (working copy)
@@ -43,6 +43,12 @@
#include "al_common.h"
#include "al_cq.h"
#include "al_debug.h"
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "al_dev.tmh"
+#endif
#include "al_dev.h"
#include "al_qp.h"
#include "al_mgr.h"
@@ -140,7 +146,7 @@
IO_STACK_LOCATION *p_io_stack;
ULONG *p_ver;
- CL_ENTER( AL_DBG_DEV, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_DEV);
p_io_stack = IoGetCurrentIrpStackLocation( h_ioctl );
@@ -151,14 +157,14 @@
!p_ver ||
cl_ioctl_out_size( h_ioctl ) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("context already exists or bad parameters.\n")
);
return CL_INVALID_PARAMETER;
}
if( *p_ver != AL_IOCTL_VERSION )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("Unsupported client version: %d\n", *p_ver) );
return CL_INVALID_PARAMETER;
}
@@ -168,7 +174,7 @@
cl_zalloc( sizeof(al_dev_open_context_t) );
if( !p_context )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("cl_malloc( %d ) failed.\n",
sizeof(al_dev_open_context_t)) );
return CL_INSUFFICIENT_MEMORY;
}
@@ -210,7 +216,7 @@
cl_status = CL_INSUFFICIENT_RESOURCES;
}
- CL_EXIT( AL_DBG_DEV, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_DEV);
return cl_status;
}
@@ -263,7 +269,7 @@
al_handle_t *p_h;
size_t i;
- CL_ENTER( AL_DBG_DEV, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_DEV);
cl_spinlock_acquire( &p_context->h_al->obj.lock );
for( i = 0; i < cl_vector_get_size( &p_context->h_al->hdl_vector
); i++ )
@@ -300,7 +306,7 @@
}
cl_spinlock_release( &p_context->h_al->obj.lock );
- CL_EXIT( AL_DBG_DEV, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_DEV);
}
@@ -311,7 +317,7 @@
al_dev_open_context_t *p_context;
IO_STACK_LOCATION *p_io_stack;
- CL_ENTER( AL_DBG_DEV, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_DEV);
p_io_stack = IoGetCurrentIrpStackLocation( h_ioctl );
@@ -319,7 +325,7 @@
p_context =
(al_dev_open_context_t*)p_io_stack->FileObject->FsContext;
if( !p_context )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Client closed with a null open context .\n")
);
return CL_SUCCESS;
}
@@ -350,7 +356,7 @@
ASSERT( cl_status == IB_SUCCESS );
if( cl_status != IB_SUCCESS )
{
- AL_TRACE( AL_DBG_ERROR, ("Waiting on ref_cnt
timed out!\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Waiting on ref_cnt timed out!\n") );
break;
}
#else
@@ -375,7 +381,7 @@
__destroy_open_context( p_context );
cl_free( p_context );
- CL_EXIT( AL_DBG_DEV, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_DEV);
return CL_SUCCESS;
}
@@ -430,12 +436,12 @@
void *p_open_context;
IO_STACK_LOCATION *p_io_stack;
- CL_ENTER( AL_DBG_DEV, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_DEV);
p_io_stack = IoGetCurrentIrpStackLocation( h_ioctl );
p_open_context = p_io_stack->FileObject->FsContext;
- CL_TRACE( AL_DBG_DEV, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_DEV ,
("al_dev_ioctl: buf_size (%ld) p_buf (%p).\n",
cl_ioctl_in_size( h_ioctl ), cl_ioctl_in_buf( h_ioctl ))
);
@@ -477,7 +483,7 @@
cl_ioctl_complete( h_ioctl, cl_status, ret_bytes );
}
- CL_EXIT( AL_DBG_DEV, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_DEV);
return cl_status;
}
@@ -521,7 +527,7 @@
ph_ioctl = &p_context->h_misc_ioctl;
break;
default:
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid CB
type\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid CB
type\n") );
ph_ioctl = NULL;
break;
}
@@ -539,7 +545,7 @@
}
cl_spinlock_release( &p_context->cb_lock );
- CL_EXIT( AL_DBG_DEV, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_DEV);
}
Index: core/al/kernel/al_ioc_pnp.c
===================================================================
--- core/al/kernel/al_ioc_pnp.c (revision 1349)
+++ core/al/kernel/al_ioc_pnp.c (working copy)
@@ -34,6 +34,12 @@
#include "al_pnp.h"
#include "al_ioc_pnp.h"
#include "al_debug.h"
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "al_ioc_pnp.tmh"
+#endif
#include "ib_common.h"
#include "al_mgr.h"
#include "al_ca.h"
@@ -622,7 +628,7 @@
gp_ioc_pnp = (ioc_pnp_mgr_t*)cl_zalloc( sizeof(ioc_pnp_mgr_t) );
if( !gp_ioc_pnp )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("Failed to allocate IOC PnP manager.\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -633,7 +639,7 @@
if( status != IB_SUCCESS )
{
__free_ioc_pnp( &gp_ioc_pnp->obj );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("__construct_ioc_pnp returned %s\n",
ib_get_err_str( status )) );
return status;
}
@@ -643,7 +649,7 @@
if( status != IB_SUCCESS )
{
gp_ioc_pnp->obj.pfn_destroy( &gp_ioc_pnp->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("attach_al_obj returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -657,7 +663,7 @@
if( status != IB_SUCCESS )
{
gp_ioc_pnp->obj.pfn_destroy( &gp_ioc_pnp->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("ib_reg_pnp failed with status %s.\n",
ib_get_err_str( status )) );
return status;
@@ -709,7 +715,7 @@
cl_status = cl_spinlock_init( &p_ioc_mgr->iou_pool_lock );
if( cl_status != CL_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("cl_spinlock_init returned %s\n",
cl_status_text[cl_status]) );
return ib_convert_cl_status( cl_status );
}
@@ -717,7 +723,7 @@
cl_status = cl_spinlock_init( &p_ioc_mgr->path_pool_lock );
if( cl_status != CL_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("cl_spinlock_init returned %s\n",
cl_status_text[cl_status]) );
return ib_convert_cl_status( cl_status );
}
@@ -725,7 +731,7 @@
cl_status = cl_spinlock_init( &p_ioc_mgr->ioc_pool_lock );
if( cl_status != CL_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("cl_spinlock_init returned %s\n",
cl_status_text[cl_status]) );
return ib_convert_cl_status( cl_status );
}
@@ -735,7 +741,7 @@
sizeof(iou_node_t), __init_iou, NULL, p_ioc_mgr );
if( cl_status != CL_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("cl_qpool_init returned %s\n",
cl_status_text[cl_status]) );
return ib_convert_cl_status( cl_status );
}
@@ -744,7 +750,7 @@
sizeof(iou_path_t), NULL, NULL, NULL );
if( cl_status != CL_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("cl_qpool_init returned %s\n",
cl_status_text[cl_status]) );
return ib_convert_cl_status( cl_status );
}
@@ -753,7 +759,7 @@
sizeof(iou_ioc_t), NULL, NULL, NULL );
if( cl_status != CL_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("cl_qpool_init returned %s\n",
cl_status_text[cl_status]) );
return ib_convert_cl_status( cl_status );
}
@@ -763,7 +769,7 @@
__ioc_pnp_timer_cb, p_ioc_mgr );
if( cl_status != CL_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("cl_timer_init failed with %s\n",
cl_status_text[cl_status]) );
return ib_convert_cl_status( cl_status );
}
@@ -772,7 +778,7 @@
__destroying_ioc_pnp, NULL, __free_ioc_pnp );
if( status != IB_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("init_al_obj returned %s\n", ib_get_err_str(
status )) );
return status;
}
@@ -1268,7 +1274,7 @@
h_ca = acquire_ca( p_pnp_port_rec->p_ca_attr->ca_guid );
if( !h_ca )
{
- AL_TRACE_EXIT( AL_DBG_PNP, ("acquire_ca failed.\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("acquire_ca failed.\n") );
return IB_INVALID_GUID;
}
p_ioc_pnp_svc->obj.p_ci_ca = h_ca->obj.p_ci_ca;
@@ -1297,7 +1303,7 @@
/* Check for failure allocating the QP. */
if( status != IB_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("ib_get_spl_qp failed with status %s\n",
ib_get_err_str( status )) );
return status;
@@ -1315,7 +1321,7 @@
&p_ioc_pnp_svc->h_mad_svc );
if( status != IB_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("ib_reg_mad_svc failed with status %s\n",
ib_get_err_str( status )) );
return status;
@@ -1342,7 +1348,7 @@
p_ioc_pnp_svc = (ioc_pnp_svc_t*)cl_zalloc( sizeof(ioc_pnp_svc_t)
);
if( !p_ioc_pnp_svc )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("Failed to cl_zalloc port CM agent.\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -1354,7 +1360,7 @@
if( status != IB_SUCCESS )
{
__free_ioc_pnp_svc( &p_ioc_pnp_svc->obj );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("init_al_obj failed with status %s.\n",
ib_get_err_str( status )) );
return status;
@@ -1365,7 +1371,7 @@
if( status != IB_SUCCESS )
{
p_ioc_pnp_svc->obj.pfn_destroy( &p_ioc_pnp_svc->obj,
NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("attach_al_obj returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -1374,7 +1380,7 @@
if( status != IB_SUCCESS )
{
p_ioc_pnp_svc->obj.pfn_destroy( &p_ioc_pnp_svc->obj,
NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("__init_data_svc failed with status %s.\n",
ib_get_err_str( status )) );
return status;
@@ -1448,7 +1454,7 @@
if( p_mgr->obj.state == CL_DESTROYING )
{
- AL_TRACE_EXIT( AL_DBG_PNP,
+ AL_PRINT_EXIT(TRACE_LEVEL_INFORMATION ,AL_DBG_PNP,
("Destroying - not resetting timer.\n") );
return;
}
@@ -1501,7 +1507,7 @@
if( p_svc->obj.state == CL_DESTROYING )
{
- AL_TRACE_EXIT( AL_DBG_PNP,
+ AL_PRINT_EXIT(TRACE_LEVEL_INFORMATION ,AL_DBG_PNP,
("Destroying - not resetting timer.\n") );
return IB_NOT_DONE;
}
@@ -1533,7 +1539,7 @@
{
cl_atomic_dec( &p_svc->query_cnt );
deref_al_obj( &p_svc->obj );
- AL_TRACE_EXIT( AL_DBG_PNP | AL_DBG_WARN,
+ AL_PRINT_EXIT(TRACE_LEVEL_WARNING ,AL_DBG_PNP,
("ib_query returned %s\n", ib_get_err_str(
status )) );
return status;
}
@@ -1561,7 +1567,7 @@
{
cl_atomic_dec( &p_svc->query_cnt );
deref_al_obj( &p_svc->obj );
- AL_TRACE_EXIT( AL_DBG_PNP | AL_DBG_WARN,
+ AL_PRINT_EXIT(TRACE_LEVEL_WARNING ,AL_DBG_PNP,
("ib_query returned %s\n", ib_get_err_str(
status )) );
}
@@ -1962,7 +1968,7 @@
MAD_BLOCK_SIZE, &p_mad );
if( status != IB_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("ib_get_mad for IOU Info query returned
%s.\n",
ib_get_err_str( status )) );
break;
@@ -1988,7 +1994,7 @@
status = ib_send_mad( p_results->p_svc->h_mad_svc, p_mad_list,
&p_mad );
if( status != IB_SUCCESS )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("ib_send_mad returned %s\n", ib_get_err_str(
status )) );
/* If some sends succeeded, change the status. */
@@ -2960,7 +2966,7 @@
p_rec = cl_zalloc( event.rec_size * 2 );
if( !p_rec )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("Failed to allocate user record.\n") );
return;
}
@@ -3250,7 +3256,7 @@
default:
CL_ASSERT( pnp_get_class( p_reg->pnp_class ) ==
IB_PNP_IOU ||
pnp_get_class( p_reg->pnp_class ) == IB_PNP_IOC
);
- AL_TRACE_EXIT( AL_DBG_ERROR, ("Invalid PnP registartion
type.\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("Invalid
PnP registartion type.\n") );
}
/* Release the reference we took for processing the
deregistration. */
Index: core/al/kernel/al_mad_pool.c
===================================================================
--- core/al/kernel/al_mad_pool.c (revision 1349)
+++ core/al/kernel/al_mad_pool.c (working copy)
@@ -32,6 +32,14 @@
#include "al.h"
#include "al_ci_ca.h"
#include "al_debug.h"
+
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "al_mad_pool.tmh"
+#endif
+
#include "al_mad_pool.h"
#include "al_pd.h"
#include "al_verbs.h"
@@ -108,16 +116,16 @@
ib_pool_handle_t h_pool;
ib_api_status_t status;
- CL_ENTER( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_POOL);
if( AL_OBJ_INVALID_HANDLE( h_al, AL_OBJ_TYPE_H_AL ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_AL_HANDLE\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_AL_HANDLE\n") );
return IB_INVALID_AL_HANDLE;
}
if( !ph_pool )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -145,7 +153,7 @@
if( status != IB_SUCCESS )
{
__free_pool( &h_pool->obj );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("init_al_obj failed with status %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -155,7 +163,7 @@
if( status != IB_SUCCESS )
{
h_pool->obj.pfn_destroy( &h_pool->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("attach_al_obj returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -173,7 +181,7 @@
/* Release the reference taken in init_al_obj. */
deref_al_obj( &h_pool->obj );
- CL_EXIT( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_POOL);
return IB_SUCCESS;
}
@@ -189,7 +197,7 @@
ib_pool_handle_t h_pool;
ib_al_handle_t h_al;
- CL_ENTER( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_POOL);
CL_ASSERT( p_obj );
h_pool = PARENT_STRUCT( p_obj, al_pool_t, obj );
@@ -201,7 +209,7 @@
/* Deregister this MAD pool from all protection domains. */
al_dereg_pool( h_al, h_pool );
- CL_EXIT( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_POOL);
}
@@ -238,11 +246,11 @@
al_obj_t* p_obj;
boolean_t busy;
- CL_ENTER( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_POOL);
if( AL_OBJ_INVALID_HANDLE( h_pool, AL_OBJ_TYPE_H_MAD_POOL ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_HANDLE\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_HANDLE\n") );
return IB_INVALID_HANDLE;
}
@@ -261,7 +269,7 @@
/* Return an error if the pool is busy. */
if( busy )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("h_pool (0x%p) is busy!.\n", h_pool) );
return IB_RESOURCE_BUSY;
}
@@ -269,7 +277,7 @@
ref_al_obj( &h_pool->obj );
h_pool->obj.pfn_destroy( &h_pool->obj, NULL );
- CL_EXIT( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_POOL);
return IB_SUCCESS;
}
@@ -286,17 +294,17 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_POOL);
if( AL_OBJ_INVALID_HANDLE( h_pool, AL_OBJ_TYPE_H_MAD_POOL ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_HANDLE\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_HANDLE\n") );
return IB_INVALID_HANDLE;
}
/* Alias keys require an alias PD. */
if( AL_OBJ_INVALID_HANDLE( h_pd, AL_OBJ_TYPE_H_PD ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PD_HANDLE\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_PD_HANDLE\n") );
return IB_INVALID_PD_HANDLE;
}
@@ -305,7 +313,7 @@
if( status == IB_SUCCESS )
deref_al_obj( &(*pp_pool_key)->obj );
- CL_EXIT( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_POOL);
return status;
}
@@ -321,11 +329,11 @@
ib_api_status_t status;
al_key_type_t key_type;
- CL_ENTER( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_POOL);
if( !pp_pool_key )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -352,7 +360,7 @@
{
__free_pool_key( &p_pool_key->obj );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("init_al_obj failed with status %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -380,7 +388,7 @@
if( status != IB_SUCCESS )
{
p_pool_key->obj.pfn_destroy( &p_pool_key->obj,
NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("ib_reg_phys returned %s\n",
ib_get_err_str( status )) );
return status;
}
@@ -400,7 +408,7 @@
{
p_pool_key->obj.pfn_destroy( &p_pool_key->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("attach_al_obj returned %s\n",
ib_get_err_str(status)) );
return status;
}
@@ -428,7 +436,7 @@
/* Return the pool key. */
*pp_pool_key = (ib_pool_key_t)p_pool_key;
- CL_EXIT( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_POOL);
return IB_SUCCESS;
}
@@ -509,7 +517,7 @@
status = ib_put_mad( p_mad_element_list );
if( status != IB_SUCCESS )
{
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,
AL_DBG_ERROR ,
("ib_put_mad failed with status
%s, continuing.\n",
ib_get_err_str(status)) );
}
@@ -563,11 +571,11 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_POOL);
if( AL_OBJ_INVALID_HANDLE( pool_key, AL_OBJ_TYPE_H_POOL_KEY ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -577,7 +585,7 @@
if( status != IB_SUCCESS )
deref_al_obj( &pool_key->obj );
- CL_EXIT( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_POOL);
return status;
}
@@ -591,24 +599,24 @@
IN const ib_pool_key_t
pool_key ,
IN const al_key_type_t
expected_type )
{
- CL_ENTER( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_POOL);
if( pool_key->type != expected_type )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
/* Check mad_cnt to see if MADs are still outstanding. */
//if( pool_key->mad_cnt )
//{
- // CL_TRACE_EXIT( AL_DBG_MAD_POOL, g_al_dbg_lvl,
("IB_RESOURCE_BUSY\n") );
+ // AL_PRINT_EXIT( TRACE_LEVEL_ERROR, AL_DBG_MAD_POOL,
("IB_RESOURCE_BUSY\n") );
// return IB_RESOURCE_BUSY;
//}
pool_key->obj.pfn_destroy( &pool_key->obj, NULL );
- CL_EXIT( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_POOL);
return IB_SUCCESS;
}
@@ -625,7 +633,7 @@
mad_item_t* p_mad_item;
net32_t lkey;
- CL_ENTER( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_POOL);
CL_ASSERT( pool_key );
CL_ASSERT( pp_mad_element );
@@ -673,7 +681,7 @@
/* Return the MAD element. */
*pp_mad_element = &p_mad_item->al_mad_element;
- CL_EXIT( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_POOL);
return IB_SUCCESS;
}
@@ -811,23 +819,23 @@
al_mad_element_t* p_mad;
ib_api_status_t status;
- CL_ENTER( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_POOL);
if( AL_OBJ_INVALID_HANDLE( pool_key, AL_OBJ_TYPE_H_POOL_KEY ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
if( !buf_size || !pp_mad_element )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
status = __get_mad_element( pool_key, &p_mad );
if( status != IB_SUCCESS )
{
- CL_EXIT( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_POOL);
return status;
}
@@ -849,7 +857,7 @@
if( !p_mad->p_al_mad_buf )
{
__put_mad_element( p_mad );
- CL_EXIT( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_POOL);
return IB_INSUFFICIENT_MEMORY;
}
p_mad->element.p_mad_buf = p_mad->p_al_mad_buf;
@@ -862,7 +870,7 @@
/* Return the MAD element to the client. */
*pp_mad_element = &p_mad->element;
- CL_EXIT( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_POOL);
return IB_SUCCESS;
}
@@ -876,7 +884,7 @@
if( !p_mad_element_list )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
Index: core/al/kernel/al_mgr.c
===================================================================
--- core/al/kernel/al_mgr.c (revision 1349)
+++ core/al/kernel/al_mgr.c (working copy)
@@ -42,6 +42,14 @@
#include "al.h"
#include "al_cm_cep.h"
#include "al_debug.h"
+
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "al_mgr.tmh"
+#endif
+
#include "al_dm.h"
#include "al_mad_pool.h"
#include "al_mcast.h"
@@ -78,14 +86,14 @@
cl_status_t cl_status;
ib_api_status_t status;
- CL_ENTER( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MGR);
CL_ASSERT( !gp_al_mgr );
gp_al_mgr = cl_zalloc( sizeof( al_mgr_t ) );
if( !gp_al_mgr )
{
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl, ("cl_zalloc
failed.\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR , ("cl_zalloc
failed.\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -101,7 +109,7 @@
if( status != IB_SUCCESS )
{
__free_al_mgr( &gp_al_mgr->obj );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("init_al_obj failed, status = 0x%x.\n", status)
);
return status;
}
@@ -110,7 +118,7 @@
if( cl_status != CL_SUCCESS )
{
gp_al_mgr->obj.pfn_destroy( &gp_al_mgr->obj, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("cl_spinlock_init failed\n") );
return ib_convert_cl_status( cl_status );
}
@@ -120,7 +128,7 @@
if( status != IB_SUCCESS )
{
gp_al_mgr->obj.pfn_destroy( &gp_al_mgr->obj, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("ib_open_al failed, status = 0x%x.\n", status)
);
return status;
}
@@ -133,7 +141,7 @@
if( status != IB_SUCCESS )
{
gp_al_mgr->obj.pfn_destroy( &gp_al_mgr->obj, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("al_pnp_create failed with %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -143,7 +151,7 @@
if( status != IB_SUCCESS )
{
gp_al_mgr->obj.pfn_destroy( &gp_al_mgr->obj, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("ib_create_mad_pool failed with %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -153,7 +161,7 @@
if( status != IB_SUCCESS )
{
gp_al_mgr->obj.pfn_destroy( &gp_al_mgr->obj, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("create_res_mgr failed with %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -163,7 +171,7 @@
if( status != IB_SUCCESS )
{
gp_al_mgr->obj.pfn_destroy( &gp_al_mgr->obj, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("create_spl_qp_mgr failed with %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -173,7 +181,7 @@
if( status != IB_SUCCESS )
{
gp_al_mgr->obj.pfn_destroy( &gp_al_mgr->obj, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("create_sa_req_mgr failed, status = 0x%x.\n",
status) );
return status;
}
@@ -183,7 +191,7 @@
if( status != IB_SUCCESS )
{
gp_al_mgr->obj.pfn_destroy( &gp_al_mgr->obj, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("create_cm_mgr failed, status = 0x%x.\n",
status) );
return status;
}
@@ -193,7 +201,7 @@
if( status != IB_SUCCESS )
{
gp_al_mgr->obj.pfn_destroy( &gp_al_mgr->obj, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("create_dm_agent failed, status = 0x%x.\n",
status) );
return status;
}
@@ -202,7 +210,7 @@
if( status != IB_SUCCESS )
{
gp_al_mgr->obj.pfn_destroy( &gp_al_mgr->obj, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("create_ioc_pnp failed, status = 0x%x.\n",
status) );
return status;
}
@@ -210,7 +218,7 @@
/* Release the reference taken in init_al_obj. */
deref_al_obj( &gp_al_mgr->obj );
- CL_EXIT( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MGR);
return IB_SUCCESS;
}
@@ -247,22 +255,22 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MGR);
if( !p_ci )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
CL_ASSERT( !find_ci_ca( p_ci->guid ) );
- CL_TRACE( AL_DBG_MGR, g_al_dbg_lvl,
- ("CA guid %"PRIx64".\n", p_ci->guid) );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_MGR ,
+ ("CA guid %I64x.\n", p_ci->guid) );
/* Check the channel interface verbs version. */
if( p_ci->version != VERBS_VERSION )
{
- CL_TRACE_EXIT( AL_DBG_MGR, g_al_dbg_lvl,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Unsupported channel interface version, "
"expected = 0x%x, actual = 0x%x.\n",
VERBS_VERSION, p_ci->version) );
@@ -273,12 +281,12 @@
status = create_ci_ca( &gp_al_mgr->obj, p_ci );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("al_mgr_ca_init failed.\n") );
return status;
}
- CL_EXIT( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MGR);
return status;
}
@@ -293,10 +301,10 @@
{
al_ci_ca_t *p_ci_ca;
- CL_ENTER( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MGR);
- CL_TRACE( AL_DBG_MGR, g_al_dbg_lvl,
- ("Deregistering CA guid %"PRIx64".\n", ca_guid) );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_MGR ,
+ ("Deregistering CA guid %I64x.\n", ca_guid) );
/* Locate the CA. */
cl_spinlock_acquire( &gp_al_mgr->obj.lock );
@@ -305,7 +313,7 @@
if( !p_ci_ca )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("CA not
found.\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("CA not
found.\n") );
return IB_NOT_FOUND;
}
@@ -317,7 +325,7 @@
ref_al_obj( &p_ci_ca->obj );
p_ci_ca->obj.pfn_destroy( &p_ci_ca->obj, NULL );
- CL_EXIT( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MGR);
return IB_SUCCESS;
}
@@ -354,11 +362,11 @@
ib_api_status_t status;
cl_status_t cl_status;
- CL_ENTER( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MGR);
if( !ph_al )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -366,7 +374,7 @@
h_al = cl_zalloc( sizeof( ib_al_t ) );
if( !h_al )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("cl_zalloc
failed\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("cl_zalloc
failed\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -405,14 +413,14 @@
if( status != IB_SUCCESS )
{
free_al( &h_al->obj );
- CL_EXIT( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MGR);
return status;
}
status = attach_al_obj( &gp_al_mgr->obj, &h_al->obj );
if( status != IB_SUCCESS )
{
h_al->obj.pfn_destroy( &h_al->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("attach_al_obj returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -428,7 +436,7 @@
/* Release the reference taken in init_al_obj. */
deref_al_obj( &h_al->obj );
- CL_EXIT( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MGR);
return IB_SUCCESS;
}
Index: core/al/kernel/al_mr.c
===================================================================
--- core/al/kernel/al_mr.c (revision 1349)
+++ core/al/kernel/al_mr.c (working copy)
@@ -33,6 +33,12 @@
#include <iba/ib_al.h>
#include "al_debug.h"
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "al_mr.tmh"
+#endif
#include "al_mr.h"
#include "al_pd.h"
#include "al_res_mgr.h"
@@ -66,16 +72,16 @@
net32_t rkey;
ib_mr_handle_t h_mr;
- CL_ENTER( AL_DBG_MR, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MR);
if( AL_OBJ_INVALID_HANDLE( h_pd, AL_OBJ_TYPE_H_PD ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PD_HANDLE\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_PD_HANDLE\n") );
return IB_INVALID_PD_HANDLE;
}
if( !p_mr_create || !p_lkey || !p_rkey || !ph_mr )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -83,7 +89,7 @@
status = ib_reg_mem( h_pd, p_mr_create, &lkey, &rkey, &h_mr );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("unable to register memory: %s\n",
ib_get_err_str(status)) );
return status;
}
@@ -92,7 +98,7 @@
h_mr->p_shmid = __create_shmid( shmid );
if( !h_mr->p_shmid )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("unable to allocate shmid\n") );
ib_dereg_mr( h_mr );
return IB_INSUFFICIENT_MEMORY;
@@ -114,7 +120,7 @@
*p_lkey = lkey;
*p_rkey = rkey;
*ph_mr = h_mr;
- CL_EXIT( AL_DBG_MR, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MR);
return IB_SUCCESS;
}
@@ -227,16 +233,16 @@
net32_t rkey;
ib_mr_handle_t h_mr, h_reg_mr;
- CL_ENTER( AL_DBG_MR, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MR);
if( AL_OBJ_INVALID_HANDLE( h_pd, AL_OBJ_TYPE_H_PD ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PD_HANDLE\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_PD_HANDLE\n") );
return IB_INVALID_PD_HANDLE;
}
if( !p_vaddr || !p_lkey || !p_rkey || !ph_mr )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -244,7 +250,7 @@
status = acquire_shmid( h_pd->obj.p_ci_ca, shmid, &p_shmid );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("shmid not found: %s\n",
ib_get_err_str(status)) );
return IB_NOT_FOUND;
}
@@ -259,7 +265,7 @@
if( cl_is_list_empty( &p_shmid->mr_list ) )
{
/* There are no registrations left to share. */
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("shmid not
found\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("shmid not
found\n") );
cl_spinlock_release( &p_shmid->obj.lock );
release_shmid( p_shmid );
return IB_NOT_FOUND;
@@ -277,8 +283,8 @@
&lkey, &rkey, &h_mr );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
- ("unable to register shared memory: 0x%0"PRIx64"
%s\n",
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
+ ("unable to register shared memory: 0x%0I64x
%s\n",
vaddr, ib_get_err_str(status)) );
release_shmid( p_shmid );
return status;
@@ -290,7 +296,7 @@
cl_status = cl_list_insert_head( &p_shmid->mr_list, h_mr );
if( cl_status != CL_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("insertion into shmid list failed\n") );
cl_spinlock_release( &p_shmid->obj.lock );
release_shmid( p_shmid );
@@ -305,7 +311,7 @@
*p_lkey = lkey;
*p_rkey = rkey;
*ph_mr = h_mr;
- CL_EXIT( AL_DBG_MR, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MR);
return IB_SUCCESS;
#endif
}
Index: core/al/kernel/al_pnp.c
===================================================================
--- core/al/kernel/al_pnp.c (revision 1349)
+++ core/al/kernel/al_pnp.c (working copy)
@@ -34,6 +34,12 @@
#include "al.h"
#include "al_debug.h"
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "al_pnp.tmh"
+#endif
#include "al_mgr.h"
#include "al_pnp.h"
#include "ib_common.h"
@@ -147,14 +153,14 @@
ib_api_status_t status;
cl_status_t cl_status;
- CL_ENTER( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_PNP);
CL_ASSERT( gp_pnp == NULL );
gp_pnp = (al_pnp_mgr_t*)cl_zalloc( sizeof(al_pnp_mgr_t) );
if( !gp_pnp )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Failed to allocate PnP manager.\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -169,7 +175,7 @@
if( cl_status != CL_SUCCESS )
{
__pnp_free( &gp_pnp->obj );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("cl_ptr_vector_init failed with status %s.\n",
CL_STATUS_MSG( cl_status )) );
return IB_ERROR;
@@ -181,7 +187,7 @@
if( status != IB_SUCCESS )
{
__pnp_free( &gp_pnp->obj );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("init_al_obj() failed with status %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -189,7 +195,7 @@
if( status != IB_SUCCESS )
{
gp_pnp->obj.pfn_destroy( &gp_pnp->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("attach_al_obj returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -197,7 +203,7 @@
/* Release the reference taken in init_al_obj. */
deref_al_obj( &gp_pnp->obj );
- CL_EXIT( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_PNP);
return( IB_SUCCESS );
}
@@ -206,7 +212,7 @@
__pnp_free(
IN al_obj_t
*p_obj )
{
- CL_ENTER( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_PNP);
CL_ASSERT( PARENT_STRUCT( p_obj, al_pnp_mgr_t, obj ) == gp_pnp
);
CL_ASSERT( cl_is_qlist_empty( &gp_pnp->ca_reg_list ) );
@@ -221,7 +227,7 @@
cl_free( gp_pnp );
gp_pnp = NULL;
- CL_EXIT( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_PNP);
}
@@ -251,7 +257,7 @@
{
al_pnp_t* p_reg;
- CL_ENTER( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_PNP);
p_reg = PARENT_STRUCT( p_item, al_pnp_t, dereg_item );
@@ -269,14 +275,14 @@
default:
CL_ASSERT( pnp_get_class( p_reg->pnp_class ) ==
IB_PNP_CA ||
pnp_get_class( p_reg->pnp_class ) == IB_PNP_PORT
);
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Invalid PnP registartion type.\n") );
}
/* Release the reference we took for processing the
deregistration. */
deref_al_obj( &p_reg->obj );
- CL_EXIT( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_PNP);
}
@@ -288,7 +294,7 @@
cl_map_item_t *p_item;
IRP *p_irp;
- CL_ENTER( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_PNP);
p_reg = PARENT_STRUCT( p_obj, al_pnp_t, obj );
@@ -323,7 +329,7 @@
/* Dereference the PnP manager. */
deref_al_obj( &gp_pnp->obj );
- CL_EXIT( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_PNP);
}
@@ -334,7 +340,7 @@
al_pnp_t *p_reg;
cl_map_item_t *p_item;
- CL_ENTER( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_PNP);
p_reg = PARENT_STRUCT( p_obj, al_pnp_t, obj );
@@ -350,7 +356,7 @@
destroy_al_obj( &p_reg->obj );
cl_free( p_reg );
- CL_EXIT( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_PNP);
}
@@ -440,7 +446,7 @@
ib_pnp_port_rec_t port_rec;
} u;
- CL_ENTER( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_PNP);
CL_ASSERT( p_reg );
CL_ASSERT( p_context );
@@ -496,7 +502,7 @@
default:
/* Invalid event type. */
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Invalid event type (%d).\n",
p_event_rec->pnp_event) );
CL_ASSERT( p_event_rec->pnp_event == IB_PNP_CA_ADD ||
p_event_rec->pnp_event == IB_PNP_PORT_ADD ||
@@ -527,7 +533,7 @@
cl_free( p_context );
}
- CL_EXIT( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_PNP);
return status;
}
@@ -544,7 +550,7 @@
al_pnp_context_t *p_context;
cl_map_item_t *p_item;
- CL_ENTER( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_PNP);
CL_ASSERT( p_reg );
@@ -552,8 +558,8 @@
p_context = (al_pnp_context_t*)cl_pzalloc(
sizeof(al_pnp_context_t) );
if( !p_context )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
- ("Failed to cl_zalloc al_pnp_context_t
(%"PRIdSIZE_T" bytes).\n",
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
+ ("Failed to cl_zalloc al_pnp_context_t (%I64d
bytes).\n",
sizeof(al_pnp_context_t)) );
return NULL;
}
@@ -565,7 +571,7 @@
p_item = cl_qmap_insert( &p_reg->context_map, p_context->guid,
&p_context->map_item );
- CL_EXIT( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_PNP);
return p_context;
}
@@ -585,7 +591,7 @@
ib_port_attr_t *p_port_attr;
al_pnp_ca_event_t event_rec;
- CL_ENTER( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_PNP);
event_rec.p_ci_ca = p_ci_ca;
@@ -639,7 +645,7 @@
}
}
}
- CL_EXIT( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_PNP);
}
@@ -654,7 +660,7 @@
size_t i;
al_pnp_context_t *p_context;
- CL_ENTER( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_PNP);
for( i = 0; i < cl_ptr_vector_get_size( &gp_pnp->ca_vector );
i++ )
{
@@ -689,7 +695,7 @@
/* Notify the user that the registration is complete. */
pnp_reg_complete( p_reg );
- CL_EXIT( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_PNP);
}
@@ -699,7 +705,7 @@
{
al_pnp_t* p_reg;
- CL_ENTER( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_PNP);
p_reg = PARENT_STRUCT( p_item, al_pnp_t, async_item );
@@ -725,7 +731,7 @@
/* Release the reference taken in init_al_obj. */
deref_al_obj( &p_reg->obj );
- CL_EXIT( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_PNP);
}
@@ -738,16 +744,16 @@
ib_api_status_t status;
KEVENT event;
- CL_ENTER( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_PNP);
if( AL_OBJ_INVALID_HANDLE( h_al, AL_OBJ_TYPE_H_AL ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_AL_HANDLE\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_AL_HANDLE\n") );
return IB_INVALID_AL_HANDLE;
}
if( !p_pnp_req || !ph_pnp )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -783,14 +789,14 @@
ib_api_status_t status;
al_pnp_t* p_reg;
- CL_ENTER( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_PNP);
/* Allocate a new registration info structure. */
p_reg = (al_pnp_t*)cl_zalloc( sizeof(al_pnp_t) );
if( !p_reg )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
- ("Failed to cl_zalloc al_pnp_t (%"PRIdSIZE_T"
bytes).\n",
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
+ ("Failed to cl_zalloc al_pnp_t (%I64d
bytes).\n",
sizeof(al_pnp_t)) );
return( IB_INSUFFICIENT_MEMORY );
}
@@ -803,7 +809,7 @@
if( status != IB_SUCCESS )
{
__pnp_reg_free( &p_reg->obj );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("init_al_obj() failed with status %s.\n",
ib_get_err_str(status)) );
return( status );
}
@@ -811,7 +817,7 @@
if( status != IB_SUCCESS )
{
p_reg->obj.pfn_destroy( &p_reg->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("attach_al_obj returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -845,7 +851,7 @@
/* Set the user handle. */
*ph_pnp = p_reg;
- CL_EXIT( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_PNP);
return( IB_SUCCESS );
}
@@ -855,18 +861,18 @@
IN const ib_pnp_handle_t
h_pnp,
IN const ib_pfn_destroy_cb_t
pfn_destroy_cb OPTIONAL )
{
- CL_ENTER( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_PNP);
if( AL_OBJ_INVALID_HANDLE( h_pnp, AL_OBJ_TYPE_H_PNP ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_HANDLE\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_HANDLE\n") );
return IB_INVALID_HANDLE;
}
ref_al_obj( &h_pnp->obj );
h_pnp->obj.pfn_destroy( &h_pnp->obj, pfn_destroy_cb );
- CL_EXIT( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_PNP);
return( IB_SUCCESS );
}
@@ -885,7 +891,7 @@
cl_status_t cl_status;
size_t i;
- CL_ENTER( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_PNP);
p_event_rec = PARENT_STRUCT( p_item, al_pnp_ca_event_t,
async_item );
@@ -940,7 +946,7 @@
deref_al_obj( &gp_pnp->obj );
cl_free( p_event_rec );
- CL_EXIT( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_PNP);
}
@@ -956,7 +962,7 @@
al_pnp_ca_event_t event_rec;
ib_port_attr_t *p_port_attr;
- CL_ENTER( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_PNP);
CL_ASSERT( p_event_rec->p_ci_ca->p_pnp_attr );
CL_ASSERT( p_event_rec->p_ci_ca->p_pnp_attr->p_port_attr );
@@ -1016,7 +1022,7 @@
}
}
- CL_EXIT( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_PNP);
}
@@ -1030,7 +1036,7 @@
al_pnp_context_t *p_context = NULL;
size_t i;
- CL_ENTER( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_PNP);
p_event_rec = PARENT_STRUCT( p_item, al_pnp_ca_event_t,
async_item );
@@ -1083,7 +1089,7 @@
deref_al_obj( &gp_pnp->obj );
cl_free( p_event_rec );
- CL_EXIT( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_PNP);
}
@@ -1097,14 +1103,14 @@
al_pnp_ca_event_t *p_event_rec;
ib_ca_attr_t *p_old_ca_attr;
- CL_ENTER( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_PNP);
/* Allocate an event record. */
p_event_rec = (al_pnp_ca_event_t*)cl_zalloc(
sizeof(al_pnp_ca_event_t) );
if( !p_event_rec )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
- ("Failed to cl_zalloc al_pnp_ca_event_t
(%"PRIdSIZE_T" bytes).\n",
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
+ ("Failed to cl_zalloc al_pnp_ca_event_t (%I64d
bytes).\n",
sizeof(al_pnp_ca_event_t)) );
return IB_INSUFFICIENT_MEMORY;
}
@@ -1128,7 +1134,7 @@
if( cl_status != CL_SUCCESS )
{
cl_free( p_event_rec );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("cl_ptr_vector_set_size failed with
status %s.\n",
CL_STATUS_MSG( cl_status )) );
return ib_convert_cl_status( cl_status );
@@ -1144,7 +1150,7 @@
CL_ASSERT( cl_status == CL_SUCCESS );
cl_spinlock_release( &gp_pnp->obj.lock );
cl_free( p_event_rec );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("ci_ca_update_attr failed.\n") );
return status;
}
@@ -1158,7 +1164,7 @@
{
/* The CA was never added by the PNP manager. */
cl_free( p_event_rec );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Ignoring removal request for unknown
CA.\n") );
return IB_NOT_FOUND;
}
@@ -1170,7 +1176,7 @@
/* Invalid event for this function. */
CL_ASSERT( event == IB_PNP_CA_ADD || event ==
IB_PNP_CA_REMOVE );
cl_free( p_event_rec );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Invalid event type.\n") );
return IB_ERROR;
}
@@ -1179,7 +1185,7 @@
ref_al_obj( &gp_pnp->obj );
cl_async_proc_queue( gp_async_pnp_mgr, &p_event_rec->async_item
);
- CL_EXIT( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_PNP);
return IB_SUCCESS;
}
@@ -1201,7 +1207,7 @@
al_pnp_context_t *p_context;
ib_port_attr_t *p_port_attr;
- CL_ENTER( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_PNP);
/* Walk the list of registrants for notification. */
for( p_reg_item = cl_qlist_head( &gp_pnp->port_reg_list );
@@ -1223,7 +1229,7 @@
__pnp_notify_user( p_reg, p_context, p_event_rec );
}
- CL_EXIT( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_PNP);
}
@@ -1240,7 +1246,7 @@
al_pnp_context_t *p_context;
ib_port_attr_t *p_port_attr;
- CL_ENTER( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_PNP);
/* Walk the list of registrants for notification. */
for( p_reg_item = cl_qlist_tail( &gp_pnp->port_reg_list );
@@ -1262,7 +1268,7 @@
__pnp_notify_user( p_reg, p_context, p_event_rec );
}
- CL_EXIT( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_PNP);
}
@@ -1279,7 +1285,7 @@
al_pnp_ca_event_t event_rec;
ib_port_attr_t *p_old_port_attr,
*p_new_port_attr;
- CL_ENTER( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_PNP);
/* Store the event information. */
event_rec.p_ci_ca = p_ci_ca;
@@ -1473,7 +1479,7 @@
ib_ca_attr_t *p_old_ca_attr;
ib_api_status_t status;
- CL_ENTER( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_PNP);
UNUSED_PARAM( p_item );
CL_ASSERT( gp_pnp );
@@ -1518,7 +1524,7 @@
deref_al_obj( &gp_pnp->obj );
gp_pnp->async_item_is_busy = FALSE;
- CL_EXIT( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_PNP);
}
@@ -1530,7 +1536,7 @@
pnp_poll(
void )
{
- CL_ENTER( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_PNP);
CL_ASSERT( gp_pnp );
@@ -1553,7 +1559,7 @@
/* Queue the request to check for PnP events. */
cl_async_proc_queue( gp_async_pnp_mgr, &gp_pnp->async_item );
- CL_EXIT( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_PNP);
}
@@ -1566,7 +1572,7 @@
ib_ca_attr_t *p_old_ca_attr;
al_ci_ca_t *p_ci_ca;
- CL_ENTER( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_PNP);
CL_ASSERT( p_item );
CL_ASSERT( gp_pnp );
@@ -1597,7 +1603,7 @@
/* Dereference the PnP Manager. */
deref_al_obj( &gp_pnp->obj );
- CL_EXIT( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_PNP);
}
@@ -1614,7 +1620,7 @@
al_pnp_ca_change_t* p_pnp_ca_change;
size_t size;
- CL_ENTER( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_PNP);
CL_ASSERT( p_ci_ca );
CL_ASSERT( p_ca_attr );
@@ -1628,7 +1634,7 @@
p_new_ca_attr = (ib_ca_attr_t*)cl_zalloc( size );
if( !p_new_ca_attr )
{
- CL_TRACE_EXIT( AL_DBG_PNP, g_al_dbg_lvl,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR,AL_DBG_PNP ,
("Unable to allocate buffer for changed CA
attributes\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -1651,7 +1657,7 @@
/* Queue the CA change event. */
cl_async_proc_queue( gp_async_pnp_mgr,
&p_pnp_ca_change->async_item );
- CL_EXIT( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_PNP);
return IB_SUCCESS;
}
@@ -1662,19 +1668,19 @@
IN const ib_al_handle_t
h_al,
IN const ib_pnp_handle_t
h_event )
{
- CL_ENTER( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_PNP);
if( AL_OBJ_INVALID_HANDLE( h_al, AL_OBJ_TYPE_H_AL ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_AL_HANDLE\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_AL_HANDLE\n") );
return IB_INVALID_AL_HANDLE;
}
if( !h_event )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_HANDLE\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_HANDLE\n") );
return IB_INVALID_HANDLE;
}
- CL_EXIT( AL_DBG_PNP, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_PNP);
return IB_UNSUPPORTED;
}
Index: core/al/kernel/al_proxy.c
===================================================================
--- core/al/kernel/al_proxy.c (revision 1349)
+++ core/al/kernel/al_proxy.c (working copy)
@@ -37,6 +37,12 @@
#include "al.h"
#include "al_mr.h"
#include "al_debug.h"
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "al_proxy.tmh"
+#endif
#include "al_dev.h"
#include "al_ci_ca.h"
#include "al_mgr.h"
@@ -113,13 +119,13 @@
uint64_t vaddr;
net32_t lkey, rkey;
- CL_ENTER( AL_DBG_DEV, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_DEV);
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) <
sizeof(ual_reg_shmid_ioctl_t) ||
cl_ioctl_out_size( h_ioctl ) <
sizeof(ual_reg_shmid_ioctl_t) )
{
- CL_EXIT( AL_DBG_DEV, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_DEV);
return CL_INVALID_PARAMETER;
}
@@ -171,7 +177,7 @@
done:
*p_ret_bytes = sizeof(p_ioctl->out);
- CL_EXIT( AL_DBG_DEV, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_DEV);
return CL_SUCCESS;
}
@@ -195,7 +201,7 @@
cl_ioctl_handle_t *ph_ioctl;
uintn_t ioctl_size;
- CL_ENTER( AL_DBG_DEV, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_DEV);
/* Set up the appropriate callback list. */
switch( cb_type )
@@ -222,7 +228,7 @@
break;
default:
- CL_EXIT( AL_DBG_DEV, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_DEV);
return CL_INVALID_PARAMETER;
}
@@ -243,7 +249,7 @@
cl_ioctl_out_buf( h_ioctl ),
&p_cb_info->cb_type, ioctl_size );
cl_ioctl_complete( h_ioctl, CL_SUCCESS,
ioctl_size );
cl_spinlock_release( &p_context->cb_lock );
- CL_EXIT( AL_DBG_DEV, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_DEV);
return CL_COMPLETED;
}
if( p_cb_info->p_al_obj )
@@ -276,7 +282,7 @@
proxy_context_ref( p_context );
cl_spinlock_release( &p_context->cb_lock );
- CL_EXIT( AL_DBG_DEV, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_DEV);
return CL_PENDING;
}
@@ -300,8 +306,8 @@
p_context =
(al_dev_open_context_t*)p_io_stack->FileObject->FsContext;
if( (uintn_t)p_io_stack->FileObject->FsContext2 !=
AL_OBJ_TYPE_CM )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
- ("Invalid file object type for request: %d\n",
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
+ ("Invalid file object type for request: %p\n",
p_io_stack->FileObject->FsContext2) );
return CL_INVALID_PARAMETER;
}
@@ -310,7 +316,7 @@
if( !p_context || !cl_ioctl_out_buf( h_ioctl ) ||
cl_ioctl_out_size( h_ioctl ) !=
sizeof(cm_cb_ioctl_info_t) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("No output buffer, or buffer too small.\n") );
return CL_INVALID_PARAMETER;
}
@@ -342,8 +348,8 @@
p_context =
(al_dev_open_context_t*)p_io_stack->FileObject->FsContext;
if( (uintn_t)p_io_stack->FileObject->FsContext2 !=
AL_OBJ_TYPE_H_CQ )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
- ("Invalid file object type for request: %d\n",
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
+ ("Invalid file object type for request: %p\n",
p_io_stack->FileObject->FsContext2) );
return CL_INVALID_PARAMETER;
}
@@ -352,7 +358,7 @@
if( !p_context || !cl_ioctl_out_buf( h_ioctl ) ||
cl_ioctl_out_size( h_ioctl ) !=
sizeof(comp_cb_ioctl_info_t) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("No output buffer, or buffer too small.\n") );
return CL_INVALID_PARAMETER;
}
@@ -384,8 +390,8 @@
p_context =
(al_dev_open_context_t*)p_io_stack->FileObject->FsContext;
if( (uintn_t)p_io_stack->FileObject->FsContext2 !=
AL_OBJ_TYPE_AL_MGR )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
- ("Invalid file object type for request: %d\n",
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
+ ("Invalid file object type for request: %p\n",
p_io_stack->FileObject->FsContext2) );
return CL_INVALID_PARAMETER;
}
@@ -394,7 +400,7 @@
if( !p_context || !cl_ioctl_out_buf( h_ioctl ) ||
cl_ioctl_out_size( h_ioctl ) !=
sizeof(misc_cb_ioctl_info_t) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("No output buffer, or buffer too small.\n") );
return CL_INVALID_PARAMETER;
}
@@ -419,7 +425,7 @@
misc_cb_ioctl_rec_t *p_misc_rec =
&misc_cb_info.ioctl_rec;
al_dev_open_context_t *p_context;
- CL_ENTER( AL_DBG_PROXY_CB, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_PROXY_CB);
p_context = p_pnp_rec->pnp_context;
@@ -454,7 +460,7 @@
}
proxy_context_deref( p_context );
- CL_EXIT( AL_DBG_PROXY_CB, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_PROXY_CB);
return IB_SUCCESS;
}
@@ -474,7 +480,7 @@
ib_ca_attr_t *p_ca_attr;
uint64_t hdl;
- CL_ENTER( AL_DBG_PROXY_CB, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_PROXY_CB);
p_context = p_pnp_rec->pnp_context;
@@ -517,7 +523,7 @@
p_ca_attr = cl_zalloc( p_port_rec->p_ca_attr->size );
if( !p_ca_attr )
{
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("cl_malloc( %d ) failed.\n",
p_port_rec->p_ca_attr->size) );
break;
}
@@ -545,7 +551,7 @@
}
proxy_context_deref( p_context );
- CL_EXIT( AL_DBG_PROXY_CB, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_PROXY_CB);
return IB_SUCCESS;
}
@@ -561,14 +567,14 @@
ual_ca_attr_info_ioctl_t *p_ioctl;
ib_ca_attr_t *p_src;
- CL_ENTER( AL_DBG_DEV, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_DEV);
/* Check the size of the ioctl */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) < sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) < sizeof(p_ioctl->out) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("invalid
buffer size\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("invalid
buffer size\n") );
return CL_INVALID_PARAMETER;
}
p_context = (al_dev_open_context_t*)p_open_context;
@@ -578,7 +584,7 @@
p_context->h_al, p_ioctl->in.h_ca_attr,
AL_OBJ_TYPE_H_CA_ATTR );
if( !p_src )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("invalid
attr handle\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("invalid
attr handle\n") );
return CL_INVALID_PARAMETER;
}
@@ -597,7 +603,7 @@
*p_ret_bytes = sizeof(p_ioctl->out);
- CL_EXIT( AL_DBG_DEV, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_DEV);
return CL_SUCCESS;
}
@@ -627,7 +633,7 @@
!cl_ioctl_in_buf( h_ioctl ) || cl_ioctl_out_size(
h_ioctl ) ||
cl_ioctl_in_size( h_ioctl ) !=
sizeof(ual_bind_file_ioctl_t) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("No input buffer, or buffer too small.\n") );
return CL_INVALID_PARAMETER;
}
@@ -639,7 +645,7 @@
&p_file_obj, NULL );
if( !NT_SUCCESS(status) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("ObReferenceObjectByHandle returned 0x%08X\n",
status) );
return CL_INVALID_PARAMETER;
}
@@ -721,7 +727,7 @@
cl_status_t cl_status;
ib_api_status_t ret_status;
- AL_ENTER( AL_DBG_DEV | AL_DBG_PNP );
+ AL_ENTER(AL_DBG_PNP);
p_rec = (proxy_pnp_recs_t*)p_pnp_rec;
@@ -744,7 +750,7 @@
p_irp = InterlockedExchangePointer(
&p_pnp_rec->h_pnp->p_rearm_irp, NULL );
if( !p_irp )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("No rearm IRP queued for PnP event.\n") );
return ret_status;
}
@@ -860,7 +866,7 @@
if( hdl == AL_INVALID_HANDLE )
{
cl_free( p_evt );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("Failed to insert PnP event in handle map.\n")
);
return ret_status;
}
@@ -891,7 +897,7 @@
cl_event_destroy( &p_evt->event );
cl_free( p_evt );
- AL_EXIT( AL_DBG_DEV | AL_DBG_PNP );
+ AL_EXIT(AL_DBG_PNP);
return ret_status;
}
@@ -962,15 +968,15 @@
KEVENT *p_sync_event;
NTSTATUS nt_status;
- AL_ENTER( AL_DBG_DEV | AL_DBG_PNP );
+ AL_ENTER( AL_DBG_PNP );
p_context = p_open_context;
p_io_stack = IoGetCurrentIrpStackLocation( h_ioctl );
if( (uintn_t)p_io_stack->FileObject->FsContext2 !=
AL_OBJ_TYPE_PNP_MGR )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
- ("Invalid file object type for request: %d\n",
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
+ ("Invalid file object type for request: %p\n",
p_io_stack->FileObject->FsContext2) );
return CL_INVALID_PARAMETER;
}
@@ -978,7 +984,7 @@
if( cl_ioctl_in_size( h_ioctl ) < sizeof(ual_reg_pnp_ioctl_in_t)
||
cl_ioctl_out_size( h_ioctl ) <
sizeof(ual_rearm_pnp_ioctl_out_t) )
{
- AL_EXIT( AL_DBG_DEV | AL_DBG_PNP );
+ AL_EXIT(AL_DBG_PNP);
return CL_INVALID_PARAMETER;
}
@@ -998,7 +1004,7 @@
(PVOID*)&p_sync_event, NULL );
if( !NT_SUCCESS( nt_status ) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("Invalid sync
event handle\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("Invalid sync event handle\n") );
return CL_INVALID_PARAMETER;
}
}
@@ -1037,7 +1043,7 @@
cl_copy_to_user( p_user_status, &status, sizeof(ib_api_status_t)
);
cl_mutex_release( &p_context->pnp_mutex );
- AL_EXIT( AL_DBG_DEV | AL_DBG_PNP );
+ AL_EXIT(AL_DBG_PNP);
return cl_status;
}
@@ -1055,14 +1061,14 @@
al_dev_open_context_t *p_context;
proxy_pnp_evt_t *p_evt;
- AL_ENTER( AL_DBG_DEV | AL_DBG_PNP );
+ AL_ENTER( AL_DBG_PNP );
p_context = p_open_context;
if( cl_ioctl_in_size( h_ioctl ) < sizeof(uint64_t) ||
cl_ioctl_out_size( h_ioctl ) < sizeof(ib_pnp_rec_t) )
{
- AL_EXIT( AL_DBG_DEV | AL_DBG_PNP );
+ AL_EXIT(AL_DBG_PNP);
return CL_INVALID_PARAMETER;
}
@@ -1077,7 +1083,7 @@
if( cl_ioctl_out_size( h_ioctl ) < p_evt->rec_size )
{
cl_spinlock_release( &p_context->h_al->obj.lock
);
- AL_TRACE_EXIT( AL_DBG_ERROR, ("Buffer too
small!\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("Buffer too small!\n") );
return CL_INVALID_PARAMETER;
}
@@ -1086,7 +1092,7 @@
}
cl_spinlock_release( &p_context->h_al->obj.lock );
- AL_EXIT( AL_DBG_DEV | AL_DBG_PNP );
+ AL_EXIT(AL_DBG_PNP);
return CL_SUCCESS;
}
@@ -1106,15 +1112,15 @@
ib_pnp_handle_t h_pnp;
IRP
*p_old_irp;
- AL_ENTER( AL_DBG_DEV | AL_DBG_PNP );
+ AL_ENTER( AL_DBG_PNP );
p_context = p_open_context;
p_io_stack = IoGetCurrentIrpStackLocation( h_ioctl );
if( (uintn_t)p_io_stack->FileObject->FsContext2 !=
AL_OBJ_TYPE_PNP_MGR )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
- ("Invalid file object type for request: %d\n",
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
+ ("Invalid file object type for request: %p\n",
p_io_stack->FileObject->FsContext2) );
return CL_INVALID_PARAMETER;
}
@@ -1122,7 +1128,7 @@
if( cl_ioctl_in_size( h_ioctl ) !=
sizeof(ual_rearm_pnp_ioctl_in_t) ||
cl_ioctl_out_size( h_ioctl ) !=
sizeof(ual_rearm_pnp_ioctl_out_t) )
{
- AL_EXIT( AL_DBG_DEV | AL_DBG_PNP );
+ AL_EXIT(AL_DBG_PNP);
return CL_INVALID_PARAMETER;
}
@@ -1132,7 +1138,7 @@
al_hdl_ref( p_context->h_al, p_ioctl->pnp_hdl,
AL_OBJ_TYPE_H_PNP );
if( !h_pnp )
{
- AL_TRACE_EXIT( AL_DBG_WARN | AL_DBG_DEV | AL_DBG_PNP,
+ AL_PRINT_EXIT(TRACE_LEVEL_WARNING ,AL_DBG_PNP,
("Invalid PNP handle.\n") );
return CL_INVALID_PARAMETER;
}
@@ -1171,7 +1177,7 @@
deref_al_obj( &h_pnp->obj );
- AL_EXIT( AL_DBG_DEV | AL_DBG_PNP );
+ AL_EXIT(AL_DBG_PNP);
return CL_PENDING;
}
@@ -1189,14 +1195,14 @@
IO_STACK_LOCATION *p_io_stack;
ib_pnp_handle_t h_pnp;
- AL_ENTER( AL_DBG_DEV | AL_DBG_PNP );
+ AL_ENTER( AL_DBG_PNP );
p_context = p_open_context;
p_io_stack = IoGetCurrentIrpStackLocation( h_ioctl );
if( (uintn_t)p_io_stack->FileObject->FsContext2 !=
AL_OBJ_TYPE_PNP_MGR )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
- ("Invalid file object type for request: %d\n",
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
+ ("Invalid file object type for request: %p\n",
p_io_stack->FileObject->FsContext2) );
return CL_INVALID_PARAMETER;
}
@@ -1224,7 +1230,7 @@
h_pnp->obj.pfn_destroy( &h_pnp->obj, NULL );
- AL_EXIT( AL_DBG_DEV | AL_DBG_PNP );
+ AL_EXIT(AL_DBG_PNP);
return CL_PENDING;
}
Index: core/al/kernel/al_proxy_cep.c
===================================================================
--- core/al/kernel/al_proxy_cep.c (revision 1349)
+++ core/al/kernel/al_proxy_cep.c (working copy)
@@ -31,6 +31,12 @@
#include "al_debug.h"
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "al_proxy_cep.tmh"
+#endif
#include "al_cm_cep.h"
#include "al_dev.h"
#include <iba/ib_al_ioctl.h>
@@ -824,8 +830,8 @@
p_io_stack = IoGetCurrentIrpStackLocation( h_ioctl );
if( (uintn_t)p_io_stack->FileObject->FsContext2 !=
AL_OBJ_TYPE_CM )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
- ("Invalid file object type for request: %d\n",
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
+ ("Invalid file object type for request: %p\n",
p_io_stack->FileObject->FsContext2) );
return CL_INVALID_PARAMETER;
}
@@ -833,7 +839,7 @@
/* Check the size of the ioctl */
if( cl_ioctl_in_size( h_ioctl ) != sizeof(net32_t) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("Invalid IOCTL input
buffer.\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("Invalid
IOCTL input buffer.\n") );
return CL_INVALID_PARAMETER;
}
Index: core/al/kernel/al_proxy_cm.c
===================================================================
--- core/al/kernel/al_proxy_cm.c (revision 1349)
+++ core/al/kernel/al_proxy_cm.c (working copy)
@@ -55,7 +55,7 @@
uint8_t *dest;
uint64_t hdl;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
cl_memclr(&cb_info, sizeof(cb_info));
@@ -128,7 +128,7 @@
proxy_queue_cb_buf( UAL_GET_CM_CB_INFO, p_context,
&cb_info, NULL );
}
proxy_context_deref( p_context );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -141,7 +141,7 @@
al_dev_open_context_t *p_context;
uint64_t hdl;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
cl_memclr(&cb_info, sizeof(cb_info));
cb_info.rec_type = CM_DREQ_REC;
@@ -191,7 +191,7 @@
}
proxy_context_deref( p_context );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -204,7 +204,7 @@
struct _cm_rtu_cb_ioctl_rec *p_ioctl_rec;
al_dev_open_context_t *p_context;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
cl_memclr(&cb_info, sizeof(cb_info));
cb_info.rec_type = CM_RTU_REC;
@@ -230,7 +230,7 @@
}
proxy_context_deref( p_context );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -245,7 +245,7 @@
uint64_t hdl;
al_obj_t *p_al_obj;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
cl_memclr(&cb_info, sizeof(cb_info));
cb_info.rec_type = CM_REP_REC;
@@ -327,7 +327,7 @@
proxy_queue_cb_buf( UAL_GET_CM_CB_INFO, p_context, &cb_info,
p_al_obj );
proxy_context_deref( p_context );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -340,7 +340,7 @@
&cb_info.ioctl_rec.cm_drep_cb_ioctl_rec;
al_dev_open_context_t *p_context;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
cl_memclr(&cb_info, sizeof(cb_info));
cb_info.rec_type = CM_DREP_REC;
p_ioctl_rec->drep_rec = *p_cm_drep_rec;
@@ -367,7 +367,7 @@
}
proxy_context_deref( p_context );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -380,7 +380,7 @@
&cb_info.ioctl_rec.cm_mra_cb_ioctl_rec;
al_dev_open_context_t *p_context;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
cl_memclr( &cb_info, sizeof(cb_info) );
cb_info.rec_type = CM_MRA_REC;
@@ -405,7 +405,7 @@
}
proxy_context_deref( p_context );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -418,7 +418,7 @@
&cb_info.ioctl_rec.cm_rej_cb_ioctl_rec;
al_dev_open_context_t *p_context;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
cl_memclr(&cb_info, sizeof(cb_info));
cb_info.rec_type = CM_REJ_REC;
@@ -457,7 +457,7 @@
}
proxy_context_deref( p_context );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -472,7 +472,7 @@
al_dev_open_context_t *p_context;
uint64_t hdl;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
cl_memclr(&cb_info, sizeof(cb_info));
cb_info.rec_type = CM_LAP_REC;
p_ioctl_rec->lap_rec = *p_cm_lap_rec;
@@ -523,7 +523,7 @@
}
proxy_context_deref( p_context );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -537,7 +537,7 @@
&cb_info.ioctl_rec.cm_apr_cb_ioctl_rec;
al_dev_open_context_t *p_context;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
cl_memclr( &cb_info, sizeof(cb_info) );
cb_info.rec_type = CM_APR_REC;
p_ioctl_rec->apr_rec = *p_cm_apr_rec;
@@ -568,7 +568,7 @@
}
proxy_context_deref( p_context );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -580,7 +580,7 @@
al_dev_open_context_t *p_context;
misc_cb_ioctl_info_t cb_info;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/*
* If we're already closing the device - do not queue a
callback, since
@@ -590,7 +590,7 @@
if( !proxy_context_ref( p_context ) )
{
proxy_context_deref( p_context );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return;
}
@@ -608,7 +608,7 @@
&p_err_rec->h_cm_listen->obj );
proxy_context_deref( p_context );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -626,14 +626,14 @@
size_t in_buf_sz;
uint8_t *p_buf;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) < sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_INVALID_PARAMETER;
}
@@ -648,7 +648,7 @@
if( cl_ioctl_in_size( h_ioctl ) != in_buf_sz )
{
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_INVALID_PARAMETER;
}
@@ -666,7 +666,7 @@
if( !h_qp )
{
p_ioctl->out.status = IB_INVALID_QP_HANDLE;
- AL_TRACE_EXIT( AL_DBG_ERROR,
("IB_INVALID_QP_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_INVALID_QP_HANDLE\n") );
return CL_SUCCESS;
}
p_ioctl->in.cm_req.h_qp = h_qp;
@@ -709,7 +709,7 @@
if( h_qp )
deref_al_obj( &h_qp->obj );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_SUCCESS;
}
@@ -728,14 +728,14 @@
ib_qp_handle_t h_qp;
size_t in_buf_sz;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) < sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_INVALID_PARAMETER;
}
@@ -745,7 +745,7 @@
if( cl_ioctl_in_size( h_ioctl ) != in_buf_sz )
{
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_INVALID_PARAMETER;
}
@@ -758,7 +758,7 @@
if( !h_qp )
{
p_ioctl->out.status = IB_INVALID_QP_HANDLE;
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_SUCCESS;
}
p_ioctl->in.cm_rep.h_qp = h_qp;
@@ -770,7 +770,7 @@
{
deref_al_obj( &h_qp->obj );
p_ioctl->out.status = IB_INVALID_HANDLE;
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_SUCCESS;
}
@@ -789,7 +789,7 @@
__deref_conn( h_cm_req );
deref_al_obj( &h_qp->obj );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_SUCCESS;
}
@@ -807,14 +807,14 @@
ib_qp_handle_t h_qp;
size_t in_buf_sz;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) < sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_INVALID_PARAMETER;
}
@@ -824,7 +824,7 @@
if( cl_ioctl_in_size( h_ioctl ) != in_buf_sz )
{
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_INVALID_PARAMETER;
}
@@ -840,7 +840,7 @@
if( !h_qp )
{
p_ioctl->out.status = IB_INVALID_QP_HANDLE;
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_SUCCESS;
}
p_ioctl->in.cm_dreq.h_qp = h_qp;
@@ -860,7 +860,7 @@
if( h_qp )
deref_al_obj( &h_qp->obj );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_SUCCESS;
}
@@ -878,14 +878,14 @@
ib_cm_handle_t h_cm_dreq;
size_t in_buf_sz;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) < sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_INVALID_PARAMETER;
}
@@ -895,7 +895,7 @@
if( cl_ioctl_in_size( h_ioctl ) != in_buf_sz )
{
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_INVALID_PARAMETER;
}
@@ -921,7 +921,7 @@
__deref_conn( h_cm_dreq );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_SUCCESS;
}
@@ -939,14 +939,14 @@
(al_dev_open_context_t *)p_open_context;
size_t in_buf_sz;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) < sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_INVALID_PARAMETER;
}
@@ -956,7 +956,7 @@
if( cl_ioctl_in_size( h_ioctl ) != in_buf_sz )
{
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_INVALID_PARAMETER;
}
@@ -991,7 +991,7 @@
p_ioctl->out.h_cm_listen = AL_INVALID_HANDLE;
}
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_SUCCESS;
}
@@ -1008,14 +1008,14 @@
al_dev_open_context_t *p_context =
(al_dev_open_context_t *)p_open_context;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_INVALID_PARAMETER;
}
@@ -1034,7 +1034,7 @@
h_cm_listen->obj.pfn_destroy( &h_cm_listen->obj, ib_sync_destroy
);
p_ioctl->out.status = IB_SUCCESS;
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_SUCCESS;
}
@@ -1052,13 +1052,13 @@
ib_cm_handle_t h_cm_rep;
size_t in_buf_sz;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) < sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_INVALID_PARAMETER;
}
@@ -1068,7 +1068,7 @@
if( cl_ioctl_in_size( h_ioctl ) != in_buf_sz )
{
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_INVALID_PARAMETER;
}
@@ -1081,7 +1081,7 @@
if( !h_cm_rep )
{
p_ioctl->out.status = IB_INVALID_HANDLE;
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_SUCCESS;
}
@@ -1095,7 +1095,7 @@
__deref_conn( h_cm_rep );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_SUCCESS;
}
@@ -1114,14 +1114,14 @@
size_t in_buf_sz;
uint8_t *p_buf;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) < sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_INVALID_PARAMETER;
}
@@ -1133,7 +1133,7 @@
if( cl_ioctl_in_size( h_ioctl ) != in_buf_sz )
{
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_INVALID_PARAMETER;
}
@@ -1146,7 +1146,7 @@
if( !h_cm )
{
p_ioctl->out.status = IB_INVALID_HANDLE;
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_SUCCESS;
}
@@ -1163,7 +1163,7 @@
__deref_conn( h_cm );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_SUCCESS;
}
@@ -1181,14 +1181,14 @@
ib_cm_handle_t h_cm;
size_t in_buf_sz;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) < sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_INVALID_PARAMETER;
}
@@ -1198,7 +1198,7 @@
if( cl_ioctl_in_size( h_ioctl ) != in_buf_sz )
{
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_INVALID_PARAMETER;
}
@@ -1211,7 +1211,7 @@
if( !h_cm )
{
p_ioctl->out.status = IB_INVALID_HANDLE;
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_SUCCESS;
}
@@ -1222,7 +1222,7 @@
__deref_conn( h_cm );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_SUCCESS;
}
@@ -1240,14 +1240,14 @@
ib_qp_handle_t h_qp;
size_t in_buf_sz;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) < sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_INVALID_PARAMETER;
}
@@ -1257,7 +1257,7 @@
if( cl_ioctl_in_size( h_ioctl ) != in_buf_sz )
{
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_INVALID_PARAMETER;
}
@@ -1270,7 +1270,7 @@
if( !h_qp )
{
p_ioctl->out.status = IB_INVALID_QP_HANDLE;
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_SUCCESS;
}
p_ioctl->in.cm_lap.h_qp = h_qp;
@@ -1288,7 +1288,7 @@
deref_al_obj( &h_qp->obj );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_SUCCESS;
}
@@ -1308,14 +1308,14 @@
size_t in_buf_sz;
uint8_t *p_buf;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) < sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_INVALID_PARAMETER;
}
@@ -1325,7 +1325,7 @@
if( cl_ioctl_in_size( h_ioctl ) != in_buf_sz )
{
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_INVALID_PARAMETER;
}
@@ -1337,7 +1337,7 @@
if( !h_cm_lap )
{
p_ioctl->out.status = IB_INVALID_HANDLE;
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_SUCCESS;
}
@@ -1348,7 +1348,7 @@
{
__deref_conn( h_cm_lap );
p_ioctl->out.status = IB_INVALID_QP_HANDLE;
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_SUCCESS;
}
p_ioctl->in.cm_apr.h_qp = h_qp;
@@ -1367,7 +1367,7 @@
__deref_conn( h_cm_lap );
deref_al_obj( &h_qp->obj );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return CL_SUCCESS;
}
@@ -1454,6 +1454,6 @@
break;
}
- CL_EXIT( AL_DBG_DEV, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_DEV);
return cl_status;
}
Index: core/al/kernel/al_proxy_subnet.c
===================================================================
--- core/al/kernel/al_proxy_subnet.c (revision 1349)
+++ core/al/kernel/al_proxy_subnet.c (working copy)
@@ -40,6 +40,12 @@
#include "al_ca.h"
#include "al_cq.h"
#include "al_debug.h"
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "al_proxy_subnet.tmh"
+#endif
#include "al_dev.h"
#include "al_mad_pool.h"
#include "al_mr.h"
@@ -91,7 +97,7 @@
al_dev_open_context_t *p_context;
uint64_t hdl;
- AL_ENTER( AL_DBG_DEV | AL_DBG_QUERY );
+ AL_ENTER( AL_DBG_QUERY );
p_irp = (IRP*)p_sa_req->user_context;
CL_ASSERT( p_irp );
@@ -222,8 +228,8 @@
if( p_io_stack->FileObject->FsContext2 &&
(uintn_t)p_io_stack->FileObject->FsContext2 !=
AL_OBJ_TYPE_SA_REQ_SVC )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
- ("Invalid file object type for request: %d\n",
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
+ ("Invalid file object type for request: %p\n",
p_io_stack->FileObject->FsContext2) );
return CL_INVALID_PARAMETER;
}
@@ -232,7 +238,7 @@
if( cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("Invalid IOCTL
buffers.\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("Invalid
IOCTL buffers.\n") );
return CL_INVALID_PARAMETER;
}
@@ -246,7 +252,7 @@
if( p_ioctl->in.sa_req.attr_size > IB_SA_DATA_SIZE )
{
ib_status = IB_INVALID_SETTING;
- AL_TRACE_EXIT( AL_DBG_ERROR, ("Invalid SA data size:
%d\n",
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("Invalid
SA data size: %d\n",
p_ioctl->in.sa_req.attr_size) );
goto proxy_send_sa_req_err1;
}
@@ -255,7 +261,7 @@
if( !p_sa_req )
{
ib_status = IB_INSUFFICIENT_MEMORY;
- AL_TRACE_EXIT( AL_DBG_ERROR, ("Failed to allocate SA
req.\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("Failed
to allocate SA req.\n") );
goto proxy_send_sa_req_err1;
}
@@ -267,7 +273,7 @@
if( hdl == AL_INVALID_HANDLE )
{
ib_status = IB_INSUFFICIENT_MEMORY;
- AL_TRACE_EXIT( AL_DBG_ERROR, ("Failed to create
handle.\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("Failed
to create handle.\n") );
goto proxy_send_sa_req_err2;
}
@@ -345,7 +351,7 @@
if( cl_ioctl_in_size( h_ioctl ) !=
sizeof(ual_cancel_sa_req_ioctl_t) ||
cl_ioctl_out_size( h_ioctl ) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("Invalid input buffer.\n")
);
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("Invalid
input buffer.\n") );
return CL_INVALID_PARAMETER;
}
@@ -383,13 +389,13 @@
ib_grh_t *p_grh, *p_usr_grh;
ib_api_status_t status;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_MAD ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_MAD ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD);
return CL_INVALID_PARAMETER;
}
@@ -509,7 +515,7 @@
p_ioctl->out.status = status;
*p_ret_bytes = sizeof(p_ioctl->out);
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_MAD ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD);
return CL_SUCCESS;
}
@@ -529,14 +535,14 @@
ib_mad_element_t *p_mad;
ib_api_status_t status;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_MAD ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_MAD ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD);
return CL_INVALID_PARAMETER;
}
@@ -559,7 +565,7 @@
p_ioctl->in.p_user_mad, p_mad, sizeof(ib_mad_element_t)
) );
if( status != IB_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("Unable to copy element to user's MAD\n") );
goto proxy_mad_comp_err2;
}
@@ -569,7 +575,7 @@
p_ioctl->in.p_mad_buf, p_mad->p_mad_buf, p_mad->size )
);
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Unable to copy buffer to user's MAD\n") );
goto proxy_mad_comp_err2;
}
@@ -581,7 +587,7 @@
p_ioctl->in.p_grh, p_mad->p_grh,
sizeof(ib_grh_t) ) );
if( status != IB_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("Unable to copy GRH to user's MAD\n")
);
goto proxy_mad_comp_err2;
}
@@ -602,7 +608,7 @@
p_ioctl->out.status = status;
*p_ret_bytes = sizeof(p_ioctl->out);
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_MAD ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD);
return CL_SUCCESS;
}
@@ -632,7 +638,7 @@
al_dev_open_context_t *p_context;
al_mad_element_t *p_al_el;
- CL_ENTER( ( AL_DBG_PROXY_CB | AL_DBG_MAD ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD);
CL_ASSERT( p_mad_element );
CL_ASSERT( !p_mad_element->p_next );
@@ -663,7 +669,7 @@
ib_put_mad( p_mad_element );
proxy_context_deref( p_context );
- CL_EXIT( ( AL_DBG_PROXY_CB | AL_DBG_MAD ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD);
}
@@ -679,7 +685,7 @@
al_mad_element_t *p_al_mad;
uint64_t hdl;
- CL_ENTER( ( AL_DBG_PROXY_CB | AL_DBG_MAD ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD);
p_context = h_mad_svc->obj.h_al->p_context;
@@ -699,7 +705,7 @@
if( !proxy_context_ref( p_context ) )
{
proxy_put_mad( p_mad_element );
- CL_EXIT( ( AL_DBG_PROXY_CB | AL_DBG_MAD ), g_al_dbg_lvl
);
+ AL_EXIT(AL_DBG_MAD);
return;
}
@@ -723,7 +729,7 @@
proxy_context_deref( p_context );
- CL_EXIT( ( AL_DBG_PROXY_CB | AL_DBG_MAD ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD);
}
@@ -741,14 +747,14 @@
ib_qp_handle_t h_qp;
ib_mad_svc_handle_t h_mad_svc;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_MAD ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_MAD ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD);
return CL_INVALID_PARAMETER;
}
@@ -762,7 +768,7 @@
{
p_ioctl->out.status = IB_INVALID_QP_HANDLE;
p_ioctl->out.h_mad_svc = AL_INVALID_HANDLE;
- AL_TRACE_EXIT( AL_DBG_ERROR, ("IB_INVALID_QP_HANDLE\n")
);
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_INVALID_QP_HANDLE\n") );
return CL_SUCCESS;
}
@@ -785,7 +791,7 @@
deref_al_obj( &h_qp->obj );
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_MAD ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD);
return CL_SUCCESS;
}
@@ -804,13 +810,13 @@
al_dev_open_context_t *p_context;
ib_mad_svc_handle_t h_mad_svc;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_MAD ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD);
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IOCTL buffer is invalid\n") );
return CL_INVALID_PARAMETER;
}
@@ -827,7 +833,7 @@
if( !h_mad_svc )
{
p_ioctl->out.status = IB_INVALID_HANDLE;
- AL_TRACE_EXIT( AL_DBG_ERROR, ("IB_INVALID_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_INVALID_HANDLE\n") );
return CL_SUCCESS;
}
@@ -835,7 +841,7 @@
h_mad_svc->obj.pfn_destroy( &h_mad_svc->obj, ib_sync_destroy );
p_ioctl->out.status = IB_SUCCESS;
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_MAD ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD);
return CL_SUCCESS;
}
@@ -859,14 +865,14 @@
ib_pd_handle_t h_pd;
ib_pool_key_t pool_key;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_MAD ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_MAD ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD);
return CL_INVALID_PARAMETER;
}
@@ -880,7 +886,7 @@
{
p_ioctl->out.status = IB_INVALID_PD_HANDLE;
p_ioctl->out.pool_key = AL_INVALID_HANDLE;
- AL_TRACE_EXIT( AL_DBG_ERROR, ("IB_INVALID_PD_HANDLE\n")
);
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_INVALID_PD_HANDLE\n") );
return CL_SUCCESS;
}
@@ -901,13 +907,13 @@
else
{
p_ioctl->out.pool_key = AL_INVALID_HANDLE;
- AL_TRACE( AL_DBG_ERROR, ("reg_mad_pool returned %s.\n",
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("reg_mad_pool returned %s.\n",
ib_get_err_str(p_ioctl->out.status)) );
}
deref_al_obj( &h_pd->obj );
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_MAD ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD);
return CL_SUCCESS;
}
@@ -930,14 +936,14 @@
(al_dev_open_context_t *)p_open_context;
ib_pool_key_t pool_key;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_MAD ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IOCTL buffer is invalid\n") );
return CL_INVALID_PARAMETER;
}
@@ -951,7 +957,7 @@
if( !pool_key )
{
p_ioctl->out.status = IB_INVALID_HANDLE;
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("User-mode provided pool key is invalid\n") );
return CL_SUCCESS;
}
@@ -961,11 +967,11 @@
if( p_ioctl->out.status != IB_SUCCESS )
{
deref_al_obj( &pool_key->obj );
- AL_TRACE( AL_DBG_ERROR, ("dereg_mad_pool failed: %s\n",
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("dereg_mad_pool failed: %s\n",
ib_get_err_str( p_ioctl->out.status )) );
}
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_MAD ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD);
return CL_SUCCESS;
}
@@ -981,14 +987,14 @@
al_dev_open_context_t *p_context;
ib_mad_svc_handle_t h_mad_svc;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_MAD ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_MAD ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD);
return CL_INVALID_PARAMETER;
}
@@ -1004,7 +1010,7 @@
if( !h_mad_svc )
{
p_ioctl->out.status = IB_INVALID_HANDLE;
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_MAD ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD);
return CL_SUCCESS;
}
@@ -1015,7 +1021,7 @@
* The clean up of resources allocated for the sent mad will
* be handled in the send completion callback
*/
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_MAD ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD);
return CL_SUCCESS;
}
@@ -1036,20 +1042,20 @@
ib_ca_handle_t h_ca;
ib_api_status_t status;
- CL_ENTER(AL_DBG_MAD , g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD );
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( AL_DBG_MAD , g_al_dbg_lvl );
+ AL_EXIT( AL_DBG_MAD);
return CL_INVALID_PARAMETER;
}
if( ((ib_mad_t*)p_ioctl->in.mad_in)->method != IB_MAD_METHOD_GET
)
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR,
("invalid method %d\n",
((ib_mad_t*)p_ioctl->in.mad_in)->method) );
status = IB_UNSUPPORTED;
goto proxy_local_mad_err;
@@ -1075,7 +1081,7 @@
proxy_local_mad_err:
p_ioctl->out.status = status;
- CL_EXIT(AL_DBG_MAD ,g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD);
return CL_SUCCESS;
}
Index: core/al/kernel/al_proxy_verbs.c
===================================================================
--- core/al/kernel/al_proxy_verbs.c (revision 1349)
+++ core/al/kernel/al_proxy_verbs.c (working copy)
@@ -36,6 +36,14 @@
#include <iba/ib_al_ioctl.h>
#include "al.h"
#include "al_debug.h"
+
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "al_proxy_verbs.tmh"
+#endif
+
#include "al_dev.h"
/* Get the internal definitions of apis for the proxy */
#include "al_ca.h"
@@ -187,7 +195,7 @@
(ual_get_uvp_name_ioctl_t*)cl_ioctl_in_buf(
h_ioctl );
al_ci_ca_t *p_ci_ca;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_CA ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CA);
UNUSED_PARAM( p_open_context );
@@ -196,13 +204,13 @@
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_CA ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CA);
return CL_INVALID_PARAMETER;
}
/* Find the CAguid */
- CL_TRACE( ( AL_DBG_DEV | AL_DBG_CA ), g_al_dbg_lvl,
- ("CA guid %"PRIx64".\n", p_ioctl->in.ca_guid) );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CA ,
+ ("CA guid %I64x.\n", p_ioctl->in.ca_guid) );
cl_spinlock_acquire( &gp_al_mgr->obj.lock );
p_ci_ca = find_ci_ca( p_ioctl->in.ca_guid );
@@ -215,8 +223,8 @@
else
{
/* found the ca guid, copy the user-mode verbs provider
libname */
- CL_TRACE( ( AL_DBG_DEV | AL_DBG_CA ), g_al_dbg_lvl,
- ("CA guid %"PRIx64". libname (%s)\n",
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CA ,
+ ("CA guid %I64x. libname (%s)\n",
p_ioctl->in.ca_guid,
p_ci_ca->verbs.libname) );
cl_memcpy( p_ioctl->out.uvp_lib_name,
p_ci_ca->verbs.libname,
sizeof(p_ci_ca->verbs.libname));
@@ -224,7 +232,7 @@
p_ioctl->out.status = IB_SUCCESS;
}
*p_ret_bytes = sizeof(p_ioctl->out);
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_CA ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CA);
return CL_SUCCESS;
}
@@ -377,14 +385,14 @@
ci_umv_buf_t *p_umv_buf = NULL;
ib_api_status_t status;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_CA ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CA);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_CA ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CA);
return CL_INVALID_PARAMETER;
}
@@ -420,7 +428,7 @@
p_ioctl->out.status = status;
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_CA ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CA);
return CL_SUCCESS;
}
@@ -445,14 +453,14 @@
ib_api_status_t status;
uint32_t byte_cnt = 0;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_CA ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CA);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_CA ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CA);
return CL_INVALID_PARAMETER;
}
@@ -502,7 +510,7 @@
}
__except(EXCEPTION_EXECUTE_HANDLER)
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Failed to copy CA attributes to user
buffer %p\n",
p_ioctl->in.p_ca_attr) );
status = IB_INVALID_PERMISSION;
@@ -526,7 +534,7 @@
p_ioctl->out.status = status;
p_ioctl->out.byte_cnt = byte_cnt;
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_CA ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CA);
return CL_SUCCESS;
}
@@ -547,14 +555,14 @@
(al_dev_open_context_t *)p_open_context;
ib_ca_handle_t h_ca;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_CA ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CA);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_CA ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CA);
return CL_INVALID_PARAMETER;
}
@@ -567,7 +575,7 @@
if( !h_ca )
{
p_ioctl->out.status = IB_INVALID_CA_HANDLE;
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_CA ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CA);
return CL_SUCCESS;
}
@@ -576,7 +584,7 @@
deref_al_obj( &h_ca->obj );
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_CA ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CA);
return CL_SUCCESS;
}
@@ -597,14 +605,14 @@
(al_dev_open_context_t *)p_open_context;
ib_ca_handle_t h_ca;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_CA ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CA);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_CA ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CA);
return CL_INVALID_PARAMETER;
}
@@ -617,7 +625,7 @@
if( !h_ca )
{
p_ioctl->out.status = IB_INVALID_CA_HANDLE;
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_CA ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CA);
return CL_SUCCESS;
}
@@ -629,7 +637,7 @@
h_ca->obj.pfn_destroy( &h_ca->obj, ib_sync_destroy );
p_ioctl->out.status = IB_SUCCESS;
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_CA ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CA);
return CL_SUCCESS;
}
@@ -687,14 +695,14 @@
ib_api_status_t status;
uint32_t num_handles;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_PD ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CA);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) < sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_CA ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CA);
return CL_INVALID_PARAMETER;
}
@@ -702,7 +710,7 @@
if( num_handles > 1 &&
cl_ioctl_in_size( h_ioctl ) != (sizeof(uint64_t) *
(num_handles - 1)) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_CA ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CA);
return CL_INVALID_PARAMETER;
}
@@ -717,7 +725,7 @@
if( !h_ca )
{
p_ioctl->out.status = IB_INVALID_CA_HANDLE;
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_CA ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CA);
return CL_SUCCESS;
}
@@ -732,7 +740,7 @@
{
p_ioctl->out.status = IB_INSUFFICIENT_MEMORY;
deref_al_obj( &h_ca->obj );
- AL_TRACE_EXIT( AL_DBG_ERROR, ("Failed to
allocate handle array.\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("Failed to allocate handle array.\n") );
return CL_SUCCESS;
}
@@ -748,7 +756,7 @@
cl_free( p_handle_array );
p_ioctl->out.status = status;
deref_al_obj( &h_ca->obj );
- AL_TRACE_EXIT( AL_DBG_ERROR, ("Failed to convert
handles.\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("Failed to convert handles.\n") );
return CL_SUCCESS;
}
}
@@ -822,7 +830,7 @@
deref_al_obj( &h_ca->obj );
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_CA ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CA);
return CL_SUCCESS;
}
@@ -848,14 +856,14 @@
ci_umv_buf_t *p_umv_buf = NULL;
ib_api_status_t status;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_PD ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_PD);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_PD ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_PD);
return CL_INVALID_PARAMETER;
}
@@ -901,7 +909,7 @@
p_ioctl->out.status = status;
*p_ret_bytes = sizeof(p_ioctl->out);
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_PD ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_PD);
return CL_SUCCESS;
}
@@ -921,14 +929,14 @@
(al_dev_open_context_t *)p_open_context;
ib_pd_handle_t h_pd;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_PD ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_PD);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_PD ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_PD);
return CL_INVALID_PARAMETER;
}
@@ -941,14 +949,14 @@
if( !h_pd )
{
p_ioctl->out.status = IB_INVALID_PD_HANDLE;
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_PD ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_PD);
return CL_SUCCESS;
}
h_pd->obj.pfn_destroy( &h_pd->obj, ib_sync_destroy );
p_ioctl->out.status = IB_SUCCESS;
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_PD ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_PD);
return CL_SUCCESS;
}
@@ -965,7 +973,7 @@
al_dev_open_context_t *p_context = h_qp->obj.h_al->p_context;
misc_cb_ioctl_info_t cb_info;
- AL_ENTER( AL_DBG_DEV | AL_DBG_QP );
+ AL_ENTER( AL_DBG_QP );
/*
* If we're already closing the device - do not queue a
callback, since
@@ -992,7 +1000,7 @@
proxy_context_deref( p_context );
- AL_EXIT( AL_DBG_DEV | AL_DBG_QP );
+ AL_EXIT( AL_DBG_QP );
}
@@ -1018,14 +1026,14 @@
ib_api_status_t status;
ib_pfn_event_cb_t pfn_ev;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_QP ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_QP);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_QP ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_QP);
return CL_INVALID_PARAMETER;
}
@@ -1109,7 +1117,7 @@
if( h_sq_cq )
deref_al_obj( &h_sq_cq->obj );
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_QP ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_QP);
return CL_SUCCESS;
}
@@ -1132,14 +1140,14 @@
ci_umv_buf_t *p_umv_buf = NULL;
ib_api_status_t status;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_QP ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_QP);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_QP ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_QP);
return CL_INVALID_PARAMETER;
}
@@ -1205,7 +1213,7 @@
p_ioctl->out.status = status;
*p_ret_bytes = sizeof(p_ioctl->out);
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_QP ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_QP);
return CL_SUCCESS;
}
@@ -1229,14 +1237,14 @@
ci_umv_buf_t *p_umv_buf = NULL;
ib_api_status_t status;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_QP ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_QP);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_QP ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_QP);
return CL_INVALID_PARAMETER;
}
@@ -1272,7 +1280,7 @@
p_ioctl->out.status = status;
*p_ret_bytes = sizeof(p_ioctl->out);
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_QP ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_QP);
return CL_SUCCESS;
}
@@ -1292,14 +1300,14 @@
(al_dev_open_context_t *)p_open_context;
ib_qp_handle_t h_qp;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_QP ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_QP);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_QP ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_QP);
return CL_INVALID_PARAMETER;
}
@@ -1311,7 +1319,7 @@
al_hdl_ref( p_context->h_al, p_ioctl->in.h_qp,
AL_OBJ_TYPE_H_QP );
if( !h_qp )
{
- AL_TRACE( AL_DBG_ERROR, ("IB_INVALID_QP_HANDLE\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_QP_HANDLE\n") );
p_ioctl->out.status = IB_INVALID_QP_HANDLE;
}
else
@@ -1320,7 +1328,7 @@
p_ioctl->out.status = IB_SUCCESS;
}
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_QP ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_QP);
return CL_SUCCESS;
}
@@ -1345,14 +1353,14 @@
ci_umv_buf_t *p_umv_buf = NULL;
ib_api_status_t status;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_AV ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_AV);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_AV ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_AV);
return CL_INVALID_PARAMETER;
}
@@ -1398,7 +1406,7 @@
p_ioctl->out.status = status;
*p_ret_bytes = sizeof(p_ioctl->out);
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_AV ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_AV);
return CL_SUCCESS;
}
@@ -1423,14 +1431,14 @@
ci_umv_buf_t *p_umv_buf = NULL;
ib_api_status_t status;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_AV ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_AV);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_AV ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_AV);
return CL_INVALID_PARAMETER;
}
@@ -1473,7 +1481,7 @@
p_ioctl->out.status = status;
*p_ret_bytes = sizeof(p_ioctl->out);
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_AV ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_AV);
return CL_SUCCESS;
}
@@ -1497,14 +1505,14 @@
ci_umv_buf_t *p_umv_buf = NULL;
ib_api_status_t status;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_AV ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_AV);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_AV ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_AV);
return CL_INVALID_PARAMETER;
}
@@ -1540,7 +1548,7 @@
p_ioctl->out.status = status;
*p_ret_bytes = sizeof(p_ioctl->out);
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_AV ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_AV);
return CL_SUCCESS;
}
@@ -1562,14 +1570,14 @@
(al_dev_open_context_t *)p_open_context;
ib_av_handle_t h_av;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_AV ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_AV);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_AV ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_AV);
return CL_INVALID_PARAMETER;
}
@@ -1582,14 +1590,14 @@
if( !h_av )
{
p_ioctl->out.status = IB_INVALID_AV_HANDLE;
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_AV ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_AV);
return CL_SUCCESS;
}
h_av->obj.pfn_destroy( &h_av->obj, NULL );
p_ioctl->out.status = IB_SUCCESS;
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_AV ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_AV);
return CL_SUCCESS;
}
@@ -1614,14 +1622,14 @@
ib_api_status_t status;
uint32_t size;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_CQ ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CQ);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_CQ ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CQ);
return CL_INVALID_PARAMETER;
}
@@ -1662,7 +1670,7 @@
p_ioctl->out.status = status;
*p_ret_bytes = sizeof(p_ioctl->out);
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_CQ ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CQ);
return CL_SUCCESS;
}
@@ -1762,14 +1770,14 @@
ib_api_status_t status;
ib_pfn_event_cb_t pfn_ev;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_CQ ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CQ);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_CQ ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CQ);
return CL_INVALID_PARAMETER;
}
@@ -1845,7 +1853,7 @@
p_ioctl->out.status = status;
*p_ret_bytes = sizeof(p_ioctl->out);
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_CQ ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CQ);
return CL_SUCCESS;
}
@@ -1868,14 +1876,14 @@
ci_umv_buf_t *p_umv_buf = NULL;
ib_api_status_t status;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_CQ ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CQ);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_CQ ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CQ);
return CL_INVALID_PARAMETER;
}
@@ -1912,7 +1920,7 @@
p_ioctl->out.status = status;
*p_ret_bytes = sizeof(p_ioctl->out);
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_CQ ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CQ);
return CL_SUCCESS;
}
@@ -1934,14 +1942,14 @@
ib_cq_handle_t h_cq;
cl_waitobj_handle_t h_wait_obj;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_CQ ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CQ);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_CQ ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CQ);
return CL_INVALID_PARAMETER;
}
@@ -1954,7 +1962,7 @@
if( !h_cq )
{
p_ioctl->out.status = IB_INVALID_CQ_HANDLE;
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_CQ ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CQ);
return CL_SUCCESS;
}
@@ -1968,7 +1976,7 @@
p_ioctl->out.status = IB_SUCCESS;
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_CQ ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CQ);
return CL_SUCCESS;
}
@@ -1997,13 +2005,13 @@
ib_api_status_t status;
size_t in_buf_sz;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_QP ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_QP);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) < sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_QP ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_QP);
return CL_INVALID_PARAMETER;
}
@@ -2017,7 +2025,7 @@
in_buf_sz += sizeof(ib_local_ds_t) * p_ioctl->in.num_ds;
if( cl_ioctl_in_size( h_ioctl ) != in_buf_sz )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_QP ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_QP);
return CL_INVALID_PARAMETER;
}
@@ -2112,7 +2120,7 @@
p_ioctl->out.status = status;
*p_ret_bytes = sizeof(p_ioctl->out);
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_QP ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_QP);
return CL_SUCCESS;
}
@@ -2141,14 +2149,14 @@
ib_api_status_t status;
size_t in_buf_sz;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_QP ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_QP);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) < sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_QP ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_QP);
return CL_INVALID_PARAMETER;
}
@@ -2162,7 +2170,7 @@
in_buf_sz += sizeof(ib_local_ds_t) * p_ioctl->in.num_ds;
if( cl_ioctl_in_size( h_ioctl ) != in_buf_sz )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_QP ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_QP);
return CL_INVALID_PARAMETER;
}
@@ -2234,7 +2242,7 @@
p_ioctl->out.status = status;
*p_ret_bytes = sizeof(p_ioctl->out);
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_QP ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_QP);
return CL_SUCCESS;
}
@@ -2255,14 +2263,14 @@
(al_dev_open_context_t *)p_open_context;
ib_cq_handle_t h_cq;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_CQ ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CQ);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_CQ ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CQ);
return CL_INVALID_PARAMETER;
}
@@ -2276,7 +2284,7 @@
{
p_ioctl->out.status = IB_INVALID_CQ_HANDLE;
p_ioctl->out.n_cqes = 0;
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_CQ ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CQ);
return CL_SUCCESS;
}
@@ -2284,7 +2292,7 @@
deref_al_obj( &h_cq->obj );
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_CQ ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CQ);
return CL_SUCCESS;
}
@@ -2308,7 +2316,7 @@
size_t out_buf_sz;
ib_api_status_t status;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_CQ ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CQ);
p_ioctl = (ual_poll_cq_ioctl_t*)cl_ioctl_in_buf( h_ioctl );
p_context = (al_dev_open_context_t*)p_open_context;
@@ -2318,7 +2326,7 @@
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) < sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_CQ ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CQ);
return CL_INVALID_PARAMETER;
}
@@ -2331,7 +2339,7 @@
out_buf_sz += sizeof(ib_wc_t) * (p_ioctl->in.num_wc - 1);
if( cl_ioctl_out_size( h_ioctl ) != out_buf_sz )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_CQ ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CQ);
return CL_INVALID_PARAMETER;
}
@@ -2385,7 +2393,7 @@
if( p_ioctl->out.num_wc )
*p_ret_bytes += (sizeof(ib_wc_t) *
(p_ioctl->out.num_wc));
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_CQ ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CQ);
return CL_SUCCESS;
}
@@ -2406,14 +2414,14 @@
(al_dev_open_context_t *)p_open_context;
ib_cq_handle_t h_cq;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_CQ ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CQ);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_CQ ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CQ);
return CL_INVALID_PARAMETER;
}
@@ -2426,7 +2434,7 @@
if( !h_cq )
{
p_ioctl->out.status = IB_INVALID_CQ_HANDLE;
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_CQ ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CQ);
return CL_SUCCESS;
}
@@ -2434,7 +2442,7 @@
deref_al_obj( &h_cq->obj );
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_CQ ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CQ);
return CL_SUCCESS;
}
@@ -2456,14 +2464,14 @@
(al_dev_open_context_t *)p_open_context;
ib_cq_handle_t h_cq;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_CQ ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CQ);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_CQ ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CQ);
return CL_INVALID_PARAMETER;
}
@@ -2476,7 +2484,7 @@
if( !h_cq )
{
p_ioctl->out.status = IB_INVALID_CQ_HANDLE;
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_CQ ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CQ);
return CL_SUCCESS;
}
@@ -2484,7 +2492,7 @@
deref_al_obj( &h_cq->obj );
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_CQ ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CQ);
return CL_SUCCESS;
}
@@ -2507,14 +2515,14 @@
ib_mr_handle_t h_mr;
ib_api_status_t status;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_MR ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MR);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_MR ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MR);
return CL_INVALID_PARAMETER;
}
@@ -2557,7 +2565,7 @@
p_ioctl->out.status = status;
*p_ret_bytes = sizeof(p_ioctl->out);
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_MR ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MR);
return CL_SUCCESS;
}
@@ -2570,7 +2578,7 @@
proxy_query_mr(
IN void
*p_open_context,
IN cl_ioctl_handle_t h_ioctl,
- OUT size_t
*p_ret_bytes )
+ OUT size_t
*p_ret_bytes )
{
ual_query_mr_ioctl_t *p_ioctl =
(ual_query_mr_ioctl_t *)cl_ioctl_in_buf( h_ioctl );
@@ -2579,14 +2587,14 @@
ib_mr_handle_t h_mr;
ib_api_status_t status;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_MR ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MR);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_MR ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MR);
return CL_INVALID_PARAMETER;
}
@@ -2619,7 +2627,7 @@
p_ioctl->out.status = status;
*p_ret_bytes = sizeof(p_ioctl->out);
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_MR ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MR);
return CL_SUCCESS;
}
@@ -2643,14 +2651,14 @@
ib_mr_create_t *p_mr_create;
ib_api_status_t status;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_MR ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MR);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_MR ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MR);
return CL_INVALID_PARAMETER;
}
@@ -2715,7 +2723,7 @@
p_ioctl->out.status = status;
*p_ret_bytes = sizeof(p_ioctl->out);
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_MR ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MR);
return CL_SUCCESS;
}
@@ -2739,14 +2747,14 @@
ib_api_status_t status;
uint64_t vaddr;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_MR ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MR);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_MR ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MR);
return CL_INVALID_PARAMETER;
}
@@ -2800,7 +2808,7 @@
p_ioctl->out.status = status;
*p_ret_bytes = sizeof(p_ioctl->out);
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_MR ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MR);
return CL_SUCCESS;
}
@@ -2821,14 +2829,14 @@
(al_dev_open_context_t *)p_open_context;
ib_mr_handle_t h_mr;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_MR ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MR);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_MR ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MR);
return CL_INVALID_PARAMETER;
}
@@ -2841,7 +2849,7 @@
if( !h_mr )
{
p_ioctl->out.status = IB_INVALID_MR_HANDLE;
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_MR ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MR);
return CL_SUCCESS;
}
@@ -2850,7 +2858,7 @@
if( p_ioctl->out.status != IB_SUCCESS )
deref_al_obj( &h_mr->obj );
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_MR ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MR);
return CL_SUCCESS;
}
@@ -2874,14 +2882,14 @@
ci_umv_buf_t *p_umv_buf = NULL;
ib_api_status_t status;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_MW ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MW);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_MW ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MW);
return CL_INVALID_PARAMETER;
}
@@ -2926,7 +2934,7 @@
p_ioctl->out.status = status;
*p_ret_bytes = sizeof(p_ioctl->out);
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_MW ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MW);
return CL_SUCCESS;
}
@@ -2950,14 +2958,14 @@
ib_api_status_t status;
ib_pd_handle_t h_pd;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_MW ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MW);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_MW ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MW);
return CL_INVALID_PARAMETER;
}
@@ -3002,7 +3010,7 @@
p_ioctl->out.status = status;
*p_ret_bytes = sizeof(p_ioctl->out);
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_MW ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MW);
return CL_SUCCESS;
}
@@ -3026,14 +3034,14 @@
ib_mr_handle_t h_mr;
ib_api_status_t status;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_MW ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MW);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_MW ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MW);
return CL_INVALID_PARAMETER;
}
@@ -3083,7 +3091,7 @@
p_ioctl->out.status = status;
*p_ret_bytes = sizeof(p_ioctl->out);
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_MW ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MW);
return CL_SUCCESS;
}
@@ -3104,14 +3112,14 @@
(al_dev_open_context_t *)p_open_context;
ib_mw_handle_t h_mw;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_MW ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MW);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_MW ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MW);
return CL_INVALID_PARAMETER;
}
@@ -3124,7 +3132,7 @@
if( !h_mw )
{
p_ioctl->out.status = IB_INVALID_MW_HANDLE;
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_MW ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MW);
return CL_SUCCESS;
}
p_ioctl->out.status = destroy_mw( h_mw );
@@ -3132,7 +3140,7 @@
if( p_ioctl->out.status != IB_SUCCESS )
deref_al_obj( &h_mw->obj );
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_MW ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MW);
return CL_SUCCESS;
}
@@ -3152,14 +3160,14 @@
ci_umv_buf_t *p_umv_buf = NULL;
ib_api_status_t status;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_QP ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_QP);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_QP ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_QP);
return CL_INVALID_PARAMETER;
}
@@ -3205,7 +3213,7 @@
p_ioctl->out.status = status;
*p_ret_bytes = sizeof(p_ioctl->out);
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_QP ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_QP);
return CL_SUCCESS;
}
@@ -3226,14 +3234,14 @@
ci_umv_buf_t *p_umv_buf = NULL;
ib_api_status_t status;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_MCAST ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MCAST);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_MCAST ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MCAST);
return CL_INVALID_PARAMETER;
}
@@ -3278,7 +3286,7 @@
p_ioctl->out.status = status;
*p_ret_bytes = sizeof(p_ioctl->out);
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_MCAST ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MCAST);
return CL_SUCCESS;
}
@@ -3296,14 +3304,14 @@
(al_dev_open_context_t *)p_open_context;
al_attach_handle_t h_attach;
- CL_ENTER( ( AL_DBG_DEV | AL_DBG_MCAST ), g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MCAST);
/* Validate input buffers. */
if( !cl_ioctl_in_buf( h_ioctl ) || !cl_ioctl_out_buf( h_ioctl )
||
cl_ioctl_in_size( h_ioctl ) != sizeof(p_ioctl->in) ||
cl_ioctl_out_size( h_ioctl ) != sizeof(p_ioctl->out) )
{
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_MCAST ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MCAST);
return CL_INVALID_PARAMETER;
}
@@ -3316,14 +3324,14 @@
if( !h_attach )
{
p_ioctl->out.status = IB_INVALID_MCAST_HANDLE;
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_MCAST ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MCAST);
return CL_SUCCESS;
}
h_attach->obj.pfn_destroy( &h_attach->obj, ib_sync_destroy );
p_ioctl->out.status = IB_SUCCESS;
- CL_EXIT( ( AL_DBG_DEV | AL_DBG_MCAST ), g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MCAST);
return CL_SUCCESS;
}
Index: core/al/kernel/al_sa_req.c
===================================================================
--- core/al/kernel/al_sa_req.c (revision 1349)
+++ core/al/kernel/al_sa_req.c (working copy)
@@ -37,6 +37,12 @@
#include "al_ca.h"
#include "al_common.h"
#include "al_debug.h"
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "al_sa_req.tmh"
+#endif
#include "al_mgr.h"
#include "al_query.h"
#include "ib_common.h"
@@ -114,14 +120,14 @@
ib_pnp_req_t pnp_req;
ib_api_status_t status;
- CL_ENTER( AL_DBG_SA_REQ, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SA_REQ);
CL_ASSERT( p_parent_obj );
CL_ASSERT( gp_sa_req_mgr == NULL );
gp_sa_req_mgr = cl_zalloc( sizeof( sa_req_mgr_t ) );
if( gp_sa_req_mgr == NULL )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("cl_zalloc failed\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -135,7 +141,7 @@
if( status != IB_SUCCESS )
{
free_sa_req_mgr( &gp_sa_req_mgr->obj );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("cl_spinlock_init failed\n") );
return status;
}
@@ -143,7 +149,7 @@
if( status != IB_SUCCESS )
{
gp_sa_req_mgr->obj.pfn_destroy( &gp_sa_req_mgr->obj,
NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("attach_al_obj returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -158,7 +164,7 @@
if (status != IB_SUCCESS)
{
gp_sa_req_mgr->obj.pfn_destroy( &gp_sa_req_mgr->obj,
NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("ib_reg_pnp failed: %s\n", ib_get_err_str(
status ) ) );
return status;
}
@@ -169,7 +175,7 @@
* a call to ref_al_obj and deref_al_obj.
*/
- CL_EXIT( AL_DBG_SA_REQ, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SA_REQ);
return IB_SUCCESS;
}
@@ -229,7 +235,7 @@
ib_pd_handle_t h_pd;
ib_api_status_t status;
- CL_ENTER( AL_DBG_SA_REQ, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SA_REQ);
CL_ASSERT( p_pnp_rec );
CL_ASSERT( p_pnp_rec->pnp_context == &gp_sa_req_mgr->obj );
@@ -240,7 +246,7 @@
status = create_sa_req_svc(
(ib_pnp_port_rec_t*)p_pnp_rec );
if( status != IB_SUCCESS )
{
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("create_sa_req_svc failed: %s\n",
ib_get_err_str(status)) );
}
break;
@@ -257,7 +263,7 @@
case IB_PNP_PORT_ACTIVE:
case IB_PNP_SM_CHANGE:
CL_ASSERT( p_pnp_rec->context );
- CL_TRACE( AL_DBG_SA_REQ, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_SA_REQ ,
("updating SM information\n") );
p_sa_req_svc = p_pnp_rec->context;
@@ -270,7 +276,7 @@
status = ib_query_av( p_sa_req_svc->h_av, &av_attr,
&h_pd );
if( status != IB_SUCCESS )
{
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("AV query failed: %s\n",
ib_get_err_str(status)) );
status = IB_SUCCESS;
break;
@@ -281,7 +287,7 @@
status = ib_modify_av( p_sa_req_svc->h_av, &av_attr );
if( status != IB_SUCCESS )
{
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("modify AV failed: %s\n",
ib_get_err_str(status) ) );
status = IB_SUCCESS;
break;
@@ -300,7 +306,7 @@
status = IB_SUCCESS;
break;
}
- CL_EXIT( AL_DBG_SA_REQ, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SA_REQ);
return status;
}
@@ -316,7 +322,7 @@
sa_req_svc_t* p_sa_req_svc;
ib_api_status_t status;
- CL_ENTER( AL_DBG_SA_REQ, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SA_REQ);
CL_ASSERT( p_pnp_rec );
CL_ASSERT( p_pnp_rec->p_ca_attr );
CL_ASSERT( p_pnp_rec->p_port_attr );
@@ -342,7 +348,7 @@
if( status != IB_SUCCESS )
{
p_sa_req_svc->obj.pfn_destroy( &p_sa_req_svc->obj, NULL
);
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("attach_al_obj returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -352,7 +358,7 @@
if( status != IB_SUCCESS )
{
p_sa_req_svc->obj.pfn_destroy( &p_sa_req_svc->obj, NULL
);
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("init_sa_req_svc failed: %s\n",
ib_get_err_str(status) ) );
return status;
}
@@ -363,7 +369,7 @@
/* Release the reference taken in init_al_obj. */
deref_al_obj( &p_sa_req_svc->obj );
- CL_EXIT( AL_DBG_SA_REQ, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SA_REQ);
return IB_SUCCESS;
}
@@ -429,14 +435,14 @@
ib_ca_handle_t h_ca;
ib_av_attr_t av_attr;
- CL_ENTER( AL_DBG_SA_REQ, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SA_REQ);
CL_ASSERT( p_sa_req_svc && p_pnp_rec );
/* Acquire the correct CI CA for this port. */
h_ca = acquire_ca( p_pnp_rec->p_ca_attr->ca_guid );
if( !h_ca )
{
- AL_TRACE_EXIT( AL_DBG_SA_REQ, ("Failed to acquire CA\n")
);
+ AL_PRINT_EXIT(TRACE_LEVEL_INFORMATION ,AL_DBG_SA_REQ,
("Failed to acquire CA\n") );
return IB_INVALID_GUID;
}
p_sa_req_svc->obj.p_ci_ca = h_ca->obj.p_ci_ca;
@@ -446,7 +452,7 @@
p_sa_req_svc->port_num = p_pnp_rec->p_port_attr->port_num;
p_sa_req_svc->sm_lid = p_pnp_rec->p_port_attr->sm_lid;
p_sa_req_svc->sm_sl = p_pnp_rec->p_port_attr->sm_sl;
- CL_TRACE( AL_DBG_SA_REQ, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_SA_REQ ,
("using port: 0x%x\tsm lid: 0x%x\tsm sl: 0x%x\n",
p_sa_req_svc->port_num, p_sa_req_svc->sm_lid,
p_sa_req_svc->sm_sl) );
@@ -474,7 +480,7 @@
/* Check for failure allocating the QP. */
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("failed to create QP1 alias: %s\n",
ib_get_err_str(status) ) );
return status;
}
@@ -492,7 +498,7 @@
&p_sa_req_svc->h_mad_svc );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("failed to register MAD service: %s\n",
ib_get_err_str(status) ) );
return status;
}
@@ -509,12 +515,12 @@
&av_attr, &p_sa_req_svc->h_av );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("failed to create AV: %s\n",
ib_get_err_str(status) ) );
return status;
}
- CL_EXIT( AL_DBG_SA_REQ, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SA_REQ);
return IB_SUCCESS;
}
@@ -598,13 +604,13 @@
ib_sa_mad_t *p_sa_mad;
KEVENT event;
- CL_ENTER( AL_DBG_SA_REQ, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SA_REQ);
if( flags & IB_FLAGS_SYNC )
{
if( !cl_is_blockable() )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("Thread context not blockable\n") );
return IB_INVALID_SETTING;
}
@@ -621,7 +627,7 @@
p_sa_req->p_sa_req_svc = acquire_sa_req_svc( port_guid );
if( !p_sa_req->p_sa_req_svc )
{
- AL_TRACE_EXIT( AL_DBG_QUERY | AL_DBG_WARN, ("invalid
port GUID\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_INFORMATION ,AL_DBG_QUERY ,
("invalid port GUID\n") );
return IB_INVALID_GUID;
}
@@ -687,7 +693,7 @@
KeWaitForSingleObject( &event, Executive, KernelMode,
FALSE, NULL );
}
- CL_EXIT( AL_DBG_SA_REQ, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SA_REQ);
return status;
}
@@ -706,7 +712,7 @@
sa_req_svc_t *p_sa_req_svc;
KEVENT *p_sync_event;
- CL_ENTER( AL_DBG_SA_REQ, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SA_REQ);
UNUSED_PARAM( h_mad_svc );
UNUSED_PARAM( mad_svc_context );
@@ -718,7 +724,7 @@
if( p_request_mad->status != IB_WCS_SUCCESS )
{
/* Notify the requestor of the result. */
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("request failed - notifying user\n") );
p_sa_req = p_request_mad->send_context1;
@@ -735,7 +741,7 @@
/* Return the MAD. */
ib_put_mad( p_request_mad );
- CL_EXIT( AL_DBG_SA_REQ, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SA_REQ);
}
@@ -754,7 +760,7 @@
ib_sa_mad_t *p_sa_mad;
KEVENT *p_sync_event;
- CL_ENTER( AL_DBG_SA_REQ, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SA_REQ);
UNUSED_PARAM( h_mad_svc );
UNUSED_PARAM( mad_svc_context );
@@ -773,13 +779,13 @@
p_sa_req->status = IB_REMOTE_ERROR;
/* Notify the requestor of the result. */
- CL_TRACE( AL_DBG_SA_REQ, g_al_dbg_lvl, ("notifying user\n") );
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_SA_REQ , ("notifying
user\n") );
p_sa_req->pfn_sa_req_cb( p_sa_req, p_mad_response );
if( p_sync_event )
KeSetEvent( p_sync_event, 0, FALSE );
deref_al_obj( &p_sa_req_svc->obj );
- CL_EXIT( AL_DBG_SA_REQ, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SA_REQ);
}
Index: core/al/kernel/al_smi.c
===================================================================
--- core/al/kernel/al_smi.c (revision 1349)
+++ core/al/kernel/al_smi.c (working copy)
@@ -37,6 +37,12 @@
#include "ib_common.h"
#include "al_common.h"
#include "al_debug.h"
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "al_smi.tmh"
+#endif
#include "al_verbs.h"
#include "al_mgr.h"
#include "al_pnp.h"
@@ -246,7 +252,7 @@
ib_api_status_t status;
cl_status_t cl_status;
- CL_ENTER( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SMI);
CL_ASSERT( p_parent_obj );
CL_ASSERT( !gp_spl_qp_mgr );
@@ -254,7 +260,7 @@
gp_spl_qp_mgr = cl_zalloc( sizeof( spl_qp_mgr_t ) );
if( !gp_spl_qp_mgr )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INSUFFICIENT_MEMORY\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -273,7 +279,7 @@
if( status != IB_SUCCESS )
{
free_spl_qp_mgr( &gp_spl_qp_mgr->obj );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("init_al_obj failed, %s\n", ib_get_err_str(
status ) ) );
return status;
}
@@ -283,7 +289,7 @@
if( status != IB_SUCCESS )
{
gp_spl_qp_mgr->obj.pfn_destroy( &gp_spl_qp_mgr->obj,
NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("attach_al_obj returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -294,7 +300,7 @@
if( cl_status != CL_SUCCESS )
{
gp_spl_qp_mgr->obj.pfn_destroy( &gp_spl_qp_mgr->obj,
NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("cl_timer_init failed, status 0x%x\n",
cl_status ) );
return ib_convert_cl_status( cl_status );
}
@@ -322,7 +328,7 @@
if( status != IB_SUCCESS )
{
gp_spl_qp_mgr->obj.pfn_destroy( &gp_spl_qp_mgr->obj,
NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("ib_reg_pnp QP0 failed, %s\n", ib_get_err_str(
status ) ) );
return status;
}
@@ -341,7 +347,7 @@
if( status != IB_SUCCESS )
{
gp_spl_qp_mgr->obj.pfn_destroy( &gp_spl_qp_mgr->obj,
NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("ib_reg_pnp QP1 failed, %s\n", ib_get_err_str(
status ) ) );
return status;
}
@@ -351,7 +357,7 @@
* because we need one on behalf of the ib_reg_pnp call.
*/
- CL_EXIT( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI);
return IB_SUCCESS;
}
@@ -418,11 +424,11 @@
IN ib_pnp_rec_t*
p_pnp_rec )
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_SMI_CB, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SMI_CB);
status = spl_qp_agent_pnp( p_pnp_rec, IB_QPT_QP0 );
- CL_EXIT( AL_DBG_SMI_CB, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI_CB);
return status;
}
@@ -436,11 +442,11 @@
IN ib_pnp_rec_t*
p_pnp_rec )
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_SMI_CB, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SMI_CB);
status = spl_qp_agent_pnp( p_pnp_rec, IB_QPT_QP1 );
- CL_EXIT( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI);
return status;
}
@@ -457,7 +463,7 @@
ib_api_status_t status;
al_obj_t* p_obj;
- CL_ENTER( AL_DBG_SMI_CB, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SMI_CB);
CL_ASSERT( p_pnp_rec );
p_obj = p_pnp_rec->context;
@@ -489,7 +495,7 @@
break;
}
- CL_EXIT( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI);
return status;
}
@@ -512,13 +518,13 @@
ib_mad_svc_t mad_svc;
ib_api_status_t status;
- CL_ENTER( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SMI);
CL_ASSERT( p_pnp_rec );
if( ( qp_type != IB_QPT_QP0 ) && ( qp_type != IB_QPT_QP1 ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -529,7 +535,7 @@
p_spl_qp_svc = cl_zalloc( sizeof( spl_qp_svc_t ) );
if( !p_spl_qp_svc )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INSUFFICIENT_MEMORY\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -575,7 +581,7 @@
if( status != IB_SUCCESS )
{
p_spl_qp_svc->obj.pfn_destroy( &p_spl_qp_svc->obj, NULL
);
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("attach_al_obj returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -585,7 +591,7 @@
if( !h_ca )
{
p_spl_qp_svc->obj.pfn_destroy( &p_spl_qp_svc->obj, NULL
);
- AL_TRACE_EXIT( AL_DBG_ERROR, ("acquire_ca failed.\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("acquire_ca failed.\n") );
return IB_INVALID_GUID;
}
@@ -617,7 +623,7 @@
if( status != IB_SUCCESS )
{
p_spl_qp_svc->obj.pfn_destroy( &p_spl_qp_svc->obj, NULL
);
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("ib_create_cq send CQ failed, %s\n",
ib_get_err_str( status ) ) );
return status;
}
@@ -629,7 +635,7 @@
if( cq_create.size < p_spl_qp_svc->max_qp_depth )
{
p_spl_qp_svc->obj.pfn_destroy( &p_spl_qp_svc->obj, NULL
);
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("ib_create_cq allocated insufficient send CQ
size\n") );
return IB_INSUFFICIENT_RESOURCES;
}
@@ -645,7 +651,7 @@
if( status != IB_SUCCESS )
{
p_spl_qp_svc->obj.pfn_destroy( &p_spl_qp_svc->obj, NULL
);
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("ib_create_cq recv CQ failed, %s\n",
ib_get_err_str( status ) ) );
return status;
}
@@ -657,7 +663,7 @@
if( cq_create.size < p_spl_qp_svc->max_qp_depth )
{
p_spl_qp_svc->obj.pfn_destroy( &p_spl_qp_svc->obj, NULL
);
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("ib_create_cq allocated insufficient recv CQ
size\n") );
return IB_INSUFFICIENT_RESOURCES;
}
@@ -680,7 +686,7 @@
if( status != IB_SUCCESS )
{
p_spl_qp_svc->obj.pfn_destroy( &p_spl_qp_svc->obj, NULL
);
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("ib_get_spl_qp failed, %s\n", ib_get_err_str(
status ) ) );
return status;
}
@@ -693,7 +699,7 @@
if( status != IB_SUCCESS )
{
p_spl_qp_svc->obj.pfn_destroy( &p_spl_qp_svc->obj, NULL
);
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("ib_query_qp failed, %s\n", ib_get_err_str(
status ) ) );
return status;
}
@@ -703,7 +709,7 @@
( qp_attr.sq_sge < 3 ) || ( qp_attr.rq_sge < 1 ) )
{
p_spl_qp_svc->obj.pfn_destroy( &p_spl_qp_svc->obj, NULL
);
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("ib_get_spl_qp allocated attributes are
insufficient\n") );
return IB_INSUFFICIENT_RESOURCES;
}
@@ -713,7 +719,7 @@
if( status != IB_SUCCESS )
{
p_spl_qp_svc->obj.pfn_destroy( &p_spl_qp_svc->obj, NULL
);
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("ib_init_dgrm_svc failed, %s\n",
ib_get_err_str( status ) ) );
return status;
}
@@ -723,7 +729,7 @@
if( status != IB_SUCCESS )
{
p_spl_qp_svc->obj.pfn_destroy( &p_spl_qp_svc->obj, NULL
);
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("spl_qp_svc_post_recvs failed, %s\n",
ib_get_err_str( status ) ) );
return status;
@@ -735,7 +741,7 @@
if( status != IB_SUCCESS )
{
p_spl_qp_svc->obj.pfn_destroy( &p_spl_qp_svc->obj, NULL
);
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("create_mad_disp failed, %s\n", ib_get_err_str(
status ) ) );
return status;
}
@@ -779,7 +785,7 @@
if (status != IB_SUCCESS)
{
p_spl_qp_svc->obj.pfn_destroy(
&p_spl_qp_svc->obj, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("ib_get_spl_qp alias failed, %s\n",
ib_get_err_str( status ) ) );
return status;
@@ -800,7 +806,7 @@
if( status != IB_SUCCESS )
{
p_spl_qp_svc->obj.pfn_destroy(
&p_spl_qp_svc->obj, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("ib_reg_mad_svc failed, %s\n",
ib_get_err_str( status ) ) );
return status;
}
@@ -825,7 +831,7 @@
if( cl_status != CL_SUCCESS )
{
p_spl_qp_svc->obj.pfn_destroy(
&p_spl_qp_svc->obj, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("cl_timer_start failed, status 0x%x\n",
cl_status ) );
return ib_convert_cl_status( cl_status );
}
@@ -834,7 +840,7 @@
/* Release the reference taken in init_al_obj. */
deref_al_obj( &p_spl_qp_svc->obj );
- CL_EXIT( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI);
return IB_SUCCESS;
}
@@ -879,7 +885,7 @@
ib_api_status_t status;
- CL_ENTER( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SMI);
CL_ASSERT( p_obj );
p_spl_qp_svc = PARENT_STRUCT( p_obj, spl_qp_svc_t, obj );
@@ -950,7 +956,7 @@
CL_ASSERT( status == IB_SUCCESS );
}
- CL_EXIT( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI);
}
@@ -967,7 +973,7 @@
al_mad_element_t* p_al_mad;
ib_api_status_t status;
- CL_ENTER( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SMI);
CL_ASSERT( p_obj );
p_spl_qp_svc = PARENT_STRUCT( p_obj, spl_qp_svc_t, obj );
@@ -992,7 +998,7 @@
destroy_al_obj( &p_spl_qp_svc->obj );
cl_free( p_spl_qp_svc );
- CL_EXIT( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI);
}
@@ -1007,7 +1013,7 @@
{
spl_qp_svc_t* p_spl_qp_svc;
- CL_ENTER( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SMI);
CL_ASSERT( p_obj );
CL_ASSERT( p_pnp_rec );
@@ -1018,7 +1024,7 @@
p_spl_qp_svc->base_lid = p_pnp_rec->p_port_attr->lid;
p_spl_qp_svc->lmc = p_pnp_rec->p_port_attr->lmc;
- CL_EXIT( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI);
}
@@ -1039,7 +1045,7 @@
mad_route_t route;
boolean_t local, loopback,
discard;
- CL_ENTER( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SMI);
CL_ASSERT( p_spl_qp_svc );
CL_ASSERT( p_send_wr );
@@ -1074,19 +1080,19 @@
*/
if( ( p_smp->hop_count == 0 ) || (
p_smp->hop_ptr == 0 ) )
{
- CL_TRACE( AL_DBG_ERROR,
g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,
AL_DBG_ERROR ,
("hop cnt or hop ptr set
to 0...discarding\n") );
discard = TRUE;
}
else if( p_smp->hop_count != (
p_smp->hop_ptr - 1 ) )
{
- CL_TRACE( AL_DBG_ERROR,
g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,
AL_DBG_ERROR ,
("hop cnt != (hop ptr -
1)...discarding\n") );
discard = TRUE;
}
else if( p_smp->hop_count >=
IB_SUBNET_PATH_HOPS_MAX )
{
- CL_TRACE( AL_DBG_ERROR,
g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,
AL_DBG_ERROR ,
("hop cnt > max
hops...discarding\n") );
discard = TRUE;
}
@@ -1094,7 +1100,7 @@
( p_smp->return_path[
p_smp->hop_ptr - 1 ] !=
p_spl_qp_svc->port_num ) )
{
- CL_TRACE( AL_DBG_ERROR,
g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,
AL_DBG_ERROR ,
("return path[hop ptr -
1] != port num...discarding\n") );
discard = TRUE;
}
@@ -1172,7 +1178,7 @@
if( loopback && local ) route = ROUTE_LOOPBACK;
if( discard ) route = ROUTE_DISCARD;
- CL_EXIT( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI);
return route;
}
@@ -1191,7 +1197,7 @@
mad_route_t route;
ib_api_status_t status;
- CL_ENTER( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SMI);
CL_ASSERT( h_qp );
CL_ASSERT( p_send_wr );
@@ -1223,7 +1229,7 @@
*/
cl_spinlock_release( &p_spl_qp_svc->obj.lock );
- CL_EXIT( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI);
return IB_RESOURCE_BUSY;
}
@@ -1249,7 +1255,7 @@
cl_spinlock_release( &p_spl_qp_svc->obj.lock );
}
- CL_EXIT( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI);
return status;
}
@@ -1266,7 +1272,7 @@
ib_smp_t* p_smp;
ib_api_status_t status;
- CL_ENTER( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SMI);
CL_ASSERT( p_spl_qp_svc );
CL_ASSERT( p_mad_wr );
@@ -1329,7 +1335,7 @@
}
}
- CL_EXIT( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI);
return status;
}
@@ -1576,7 +1582,7 @@
status = complete_local_mad( p_spl_qp_svc, p_mad_wr,
p_mad_resp );
}
- CL_EXIT( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI);
return status;
}
@@ -1623,7 +1629,7 @@
status = complete_local_mad( p_spl_qp_svc, p_mad_wr,
p_mad_resp );
}
- CL_EXIT( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI);
return status;
}
@@ -1685,7 +1691,7 @@
ib_api_status_t status = IB_SUCCESS;
boolean_t smp_is_set;
- CL_ENTER( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SMI);
CL_ASSERT( p_spl_qp_svc );
CL_ASSERT( p_mad_wr );
@@ -1708,7 +1714,7 @@
status = get_resp_mad( p_spl_qp_svc, p_mad_wr,
&p_mad_response );
if( status != IB_SUCCESS )
{
- CL_EXIT( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI);
return status;
}
p_mad_response_buf = p_mad_response->p_mad_buf;
@@ -1767,7 +1773,7 @@
__complete_send_mad( p_spl_qp_svc->h_mad_disp, p_mad_wr,
IB_WCS_LOCAL_OP_ERR );
- CL_EXIT( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI);
return status;
}
@@ -1814,7 +1820,7 @@
p_spl_qp_svc->lmc =
ib_port_info_get_lmc( p_port_info );
if (p_port_info->subnet_timeout & 0x80)
{
- AL_TRACE(AL_DBG_PNP,
+ AL_PRINT(TRACE_LEVEL_INFORMATION
,AL_DBG_PNP ,
("Client reregister
event, setting sm_lid to 0.\n"));
ci_ca_lock_attr(p_spl_qp_svc->obj.p_ci_ca);
p_spl_qp_svc->obj.p_ci_ca->p_pnp_attr->
@@ -1831,7 +1837,7 @@
if( status == IB_SUCCESS && !smp_is_set )
status = IB_NOT_DONE;
- CL_EXIT( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI);
return status;
}
@@ -1847,7 +1853,7 @@
spl_qp_svc_t* p_spl_qp_svc;
ib_api_status_t status;
- CL_ENTER( AL_DBG_SMI_CB, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SMI_CB);
CL_ASSERT( p_item );
p_spl_qp_svc = PARENT_STRUCT( p_item, spl_qp_svc_t, send_async
);
@@ -1878,7 +1884,7 @@
/* No longer in use by the asynchronous processing thread. */
cl_atomic_dec( &p_spl_qp_svc->in_use_cnt );
- CL_EXIT( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI);
}
@@ -1893,7 +1899,7 @@
{
spl_qp_svc_t* p_spl_qp_svc;
- CL_ENTER( AL_DBG_SMI_CB, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SMI_CB);
CL_ASSERT( cq_context );
p_spl_qp_svc = cq_context;
@@ -1921,7 +1927,7 @@
#endif
- CL_EXIT( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI);
}
@@ -1934,7 +1940,7 @@
spl_qp_svc_t* p_spl_qp_svc;
ib_api_status_t status;
- CL_ENTER( AL_DBG_SMI_CB, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SMI_CB);
CL_ASSERT( p_item );
p_spl_qp_svc = PARENT_STRUCT( p_item, spl_qp_svc_t,
send_async_cb );
@@ -1952,7 +1958,7 @@
deref_al_obj( &p_spl_qp_svc->obj );
- CL_EXIT( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI);
}
#endif
@@ -1968,7 +1974,7 @@
{
spl_qp_svc_t* p_spl_qp_svc;
- CL_ENTER( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SMI);
CL_ASSERT( cq_context );
p_spl_qp_svc = cq_context;
@@ -1992,7 +1998,7 @@
#endif
- CL_EXIT( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI);
}
@@ -2004,7 +2010,7 @@
{
spl_qp_svc_t* p_spl_qp_svc;
- CL_ENTER( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SMI);
CL_ASSERT( p_item );
p_spl_qp_svc = PARENT_STRUCT( p_item, spl_qp_svc_t,
recv_async_cb );
@@ -2018,7 +2024,7 @@
deref_al_obj( &p_spl_qp_svc->obj );
- CL_EXIT( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI);
}
#endif
@@ -2042,7 +2048,7 @@
ib_smp_t* p_smp;
ib_api_status_t status;
- CL_ENTER( AL_DBG_SMI_CB, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SMI_CB);
CL_ASSERT( p_spl_qp_svc );
CL_ASSERT( h_cq );
@@ -2139,8 +2145,8 @@
if( wc.status != IB_WCS_SUCCESS )
{
- CL_TRACE( CL_DBG_ERROR, g_al_dbg_lvl,
- ("special QP completion error: %s!
internal syndrome 0x%x\n",
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
+ ("special QP completion error: %s!
internal syndrome 0x%I64x\n",
ib_get_wc_status_str( wc.status ),
wc.vendor_specific) );
/* Reset the special QP service and return. */
@@ -2154,7 +2160,7 @@
CL_ASSERT( status == IB_SUCCESS );
cl_atomic_dec( &p_spl_qp_svc->in_use_cnt );
- CL_EXIT( AL_DBG_SMI_CB, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI_CB);
}
@@ -2171,7 +2177,7 @@
mad_route_t route;
ib_api_status_t status;
- CL_ENTER( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SMI);
CL_ASSERT( p_spl_qp_svc );
CL_ASSERT( p_mad_element );
@@ -2287,7 +2293,7 @@
else
status = recv_local_mad( p_spl_qp_svc, p_mad_element );
- CL_EXIT( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI);
return status;
}
@@ -2302,7 +2308,7 @@
{
mad_route_t route;
- CL_ENTER( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SMI);
CL_ASSERT( p_mad_element );
@@ -2344,7 +2350,7 @@
break;
}
- CL_EXIT( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI);
return route;
}
@@ -2359,7 +2365,7 @@
{
mad_route_t route;
- CL_ENTER( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SMI);
CL_ASSERT( p_mad_element );
@@ -2383,7 +2389,7 @@
break;
}
- CL_EXIT( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI);
return route;
}
@@ -2397,7 +2403,7 @@
{
mad_route_t route;
- CL_ENTER( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SMI);
CL_ASSERT( p_mad_element );
@@ -2423,7 +2429,7 @@
break;
}
- CL_EXIT( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI);
return route;
}
@@ -2438,7 +2444,7 @@
{
mad_route_t route;
- CL_ENTER( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SMI);
CL_ASSERT( p_mad_element );
@@ -2448,7 +2454,7 @@
else
route = ROUTE_DISPATCHER;
- CL_EXIT( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI);
return route;
}
@@ -2465,7 +2471,7 @@
ib_av_attr_t av_attr;
ib_api_status_t status;
- CL_ENTER( AL_DBG_SMI_CB, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SMI_CB);
CL_ASSERT( p_spl_qp_svc );
CL_ASSERT( p_mad_element );
@@ -2478,7 +2484,7 @@
* "C14-5: Only a SM shall originate a directed route
SMP."
* Therefore all traps should be LID routed; drop this
one.
*/
- CL_EXIT( AL_DBG_SMI_CB, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI_CB);
return IB_ERROR;
}
@@ -2500,7 +2506,7 @@
if( status != IB_SUCCESS )
{
- CL_EXIT( AL_DBG_SMI_CB, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI_CB);
return status;
}
@@ -2523,7 +2529,7 @@
if( status != IB_SUCCESS )
ib_destroy_av( p_mad_element->h_av );
- CL_EXIT( AL_DBG_SMI_CB, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI_CB);
return status;
}
@@ -2539,7 +2545,7 @@
ib_mad_t* p_mad_hdr;
ib_api_status_t status;
- CL_ENTER( AL_DBG_SMI_CB, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SMI_CB);
CL_ASSERT( p_spl_qp_svc );
CL_ASSERT( p_mad_request );
@@ -2572,7 +2578,7 @@
/* Send the locally addressed MAD request to the CA for
processing. */
status = ib_send_mad( p_spl_qp_svc->h_mad_svc, p_mad_request,
NULL );
- CL_EXIT( AL_DBG_SMI_CB, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI_CB);
return status;
}
@@ -2589,7 +2595,7 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_SMI_CB, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SMI_CB);
UNUSED_PARAM( h_mad_svc );
UNUSED_PARAM( mad_svc_context );
@@ -2604,7 +2610,7 @@
status = ib_put_mad( p_mad_element );
CL_ASSERT( status == IB_SUCCESS );
- CL_EXIT( AL_DBG_SMI_CB, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI_CB);
}
@@ -2624,7 +2630,7 @@
ib_av_attr_t av_attr;
ib_api_status_t status;
- CL_ENTER( AL_DBG_SMI_CB, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SMI_CB);
CL_ASSERT( mad_svc_context );
CL_ASSERT( p_mad_response );
@@ -2672,7 +2678,7 @@
{
ib_put_mad( p_mad_response );
- CL_EXIT( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI);
return;
}
@@ -2685,7 +2691,7 @@
ib_put_mad( p_mad_response );
}
- CL_EXIT( AL_DBG_SMI_CB, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI_CB);
}
@@ -2730,7 +2736,7 @@
if( status != IB_SUCCESS )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Failed to post receive %p\n",
p_al_element) );
cl_qlist_remove_item( &p_spl_qp_svc->recv_queue,
&p_al_element->list_item );
@@ -2754,14 +2760,14 @@
{
spl_qp_svc_t* p_spl_qp_svc;
- CL_ENTER( AL_DBG_SMI_CB, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SMI_CB);
CL_ASSERT( p_event_rec );
CL_ASSERT( p_event_rec->context );
if( p_event_rec->code == IB_AE_SQ_DRAINED )
{
- CL_EXIT( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI);
return;
}
@@ -2769,7 +2775,7 @@
spl_qp_svc_reset( p_spl_qp_svc );
- CL_EXIT( AL_DBG_SMI_CB, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI_CB);
}
@@ -2820,7 +2826,7 @@
ib_qp_mod_t qp_mod;
ib_api_status_t status;
- CL_ENTER( AL_DBG_SMI_CB, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SMI_CB);
CL_ASSERT( p_item );
p_spl_qp_svc = PARENT_STRUCT( p_item, spl_qp_svc_t, reset_async
);
@@ -2901,7 +2907,7 @@
/* No longer in use by the asynchronous processing thread. */
cl_atomic_dec( &p_spl_qp_svc->in_use_cnt );
- CL_EXIT( AL_DBG_SMI_CB, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI_CB);
}
@@ -2995,7 +3001,7 @@
force_smi_poll(
void )
{
- CL_ENTER( AL_DBG_SMI_CB, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SMI_CB);
/*
* Stop the poll timer. Just invoke the timer callback directly
to
@@ -3003,7 +3009,7 @@
*/
smi_poll_timer_cb( gp_spl_qp_mgr );
- CL_EXIT( AL_DBG_SMI_CB, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI_CB);
}
@@ -3017,7 +3023,7 @@
{
cl_status_t cl_status;
- CL_ENTER( AL_DBG_SMI_CB, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SMI_CB);
CL_ASSERT( context );
CL_ASSERT( gp_spl_qp_mgr == context );
@@ -3052,7 +3058,7 @@
}
cl_spinlock_release( &gp_spl_qp_mgr->obj.lock );
- CL_EXIT( AL_DBG_SMI_CB, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI_CB);
}
@@ -3068,7 +3074,7 @@
al_obj_t* p_obj;
spl_qp_svc_t* p_spl_qp_svc;
- CL_ENTER( AL_DBG_SMI_CB, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_SMI_CB);
CL_ASSERT( p_list_item );
UNUSED_PARAM( context );
@@ -3086,5 +3092,5 @@
spl_qp_svc_post_recvs( p_spl_qp_svc );
cl_spinlock_release( &p_spl_qp_svc->obj.lock );
- CL_EXIT( AL_DBG_SMI, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_SMI);
}
Index: core/al/kernel/SOURCES
===================================================================
--- core/al/kernel/SOURCES (revision 1349)
+++ core/al/kernel/SOURCES (working copy)
@@ -2,6 +2,15 @@
TARGETPATH=..\..\..\bin\kernel\obj$(BUILD_ALT_DIR)
TARGETTYPE=DRIVER_LIBRARY
+
+
+!if $(FREEBUILD)
+ENABLE_EVENT_TRACING=1
+!else
+#ENABLE_EVENT_TRACING=1
+!endif
+
+
DLLDEF=al_exports.def
SOURCES= ibal.rc \
@@ -60,4 +69,15 @@
TARGETLIBS= $(TARGETLIBS) $(DDK_LIB_PATH)\ntstrsafe.lib
!endif
+
+!IFDEF ENABLE_EVENT_TRACING
+
+C_DEFINES = $(C_DEFINES) -DEVENT_TRACING
+
+RUN_WPP = $(SOURCES) -km -ext: .c .h .C .H \
+ -scan:..\al_debug.h \
+ -func:AL_PRINT(LEVEL,FLAGS,(MSG,...)) \
+ -func:AL_PRINT_EXIT(LEVEL,FLAGS,(MSG,...))
+!ENDIF
+
MSC_WARNING_LEVEL= /W4
Index: core/al/user/al_dll.c
===================================================================
--- core/al/user/al_dll.c (revision 1349)
+++ core/al/user/al_dll.c (working copy)
@@ -37,7 +37,16 @@
#include "ib_common.h"
#include "al_init.h"
+#include "al_debug.h"
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "al_dll.tmh"
+#endif
+
+
HANDLE g_al_device = INVALID_HANDLE_VALUE;
cl_mutex_t g_open_close_mutex;
cl_perf_t g_perf;
@@ -52,14 +61,30 @@
IN DWORD
ul_reason_for_call,
IN LPVOID
lp_reserved )
{
- TCHAR dbg_lvl_str[16];
+
+#if !defined(EVENT_TRACING)
+#if DBG
+
+#define ENV_BUFSIZE 16
+
+ TCHAR dbg_lvl_str[ENV_BUFSIZE];
DWORD i;
+#endif
+#endif
UNUSED_PARAM( lp_reserved );
switch( ul_reason_for_call )
{
case DLL_PROCESS_ATTACH:
+
+#if defined(EVENT_TRACING)
+#if DBG
+ WPP_INIT_TRACING(L"ibald.dll");
+#else
+ WPP_INIT_TRACING(L"ibal.dll");
+#endif
+#endif
cl_perf_init( &g_perf, AlMaxPerf );
DisableThreadLibraryCalls( h_module );
@@ -67,14 +92,29 @@
if( cl_mutex_init( &g_open_close_mutex ) != CL_SUCCESS )
return FALSE;
- i = GetEnvironmentVariable( "IBAL_UAL_DBG", dbg_lvl_str,
16 );
- if( i && i <= 16 )
- {
- g_al_dbg_lvl = _tcstoul( dbg_lvl_str, NULL, 16
);
- AL_TRACE( AL_DBG_DEV,
- ("Given IBAL_UAL_DBG debug
level:0x%X\n",
- g_al_dbg_lvl) );
- }
+#if !defined(EVENT_TRACING)
+#if DBG
+
+ i = GetEnvironmentVariable( "IBAL_UAL_DBG_LEVEL", dbg_lvl_str,
ENV_BUFSIZE );
+ if( i && i <= 16 )
+ {
+ g_al_dbg_level = _tcstoul( dbg_lvl_str, NULL,
ENV_BUFSIZE );
+ }
+
+ i = GetEnvironmentVariable( "IBAL_UAL_DBG_FLAGS", dbg_lvl_str,
ENV_BUFSIZE );
+ if( i && i <= 16 )
+ {
+ g_al_dbg_flags = _tcstoul( dbg_lvl_str, NULL,
ENV_BUFSIZE );
+ }
+
+
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_DEV ,
+ ("Given IBAL_UAL_DBG debug level:%d debug flags
0x%x\n",
+ g_al_dbg_level ,g_al_dbg_flags) );
+
+#endif
+#endif
+
break;
case DLL_PROCESS_DETACH:
@@ -82,6 +122,9 @@
cl_mutex_destroy( &g_open_close_mutex );
cl_perf_destroy( &g_perf, TRUE );
+#if defined(EVENT_TRACING)
+ WPP_CLEANUP();
+#endif
break;
}
return TRUE;
@@ -149,7 +192,7 @@
if( cl_status != CL_SUCCESS )
{
CL_ASSERT( cl_status != CL_PENDING );
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Error performing IOCTL 0x%08x to AL driver
(%s)\n",
command, CL_STATUS_MSG(cl_status)) );
return CL_ERROR;
Index: core/al/user/al_mad_pool.c
===================================================================
--- core/al/user/al_mad_pool.c (revision 1349)
+++ core/al/user/al_mad_pool.c (working copy)
@@ -34,6 +34,14 @@
#include "al.h"
#include "al_ci_ca.h"
#include "al_debug.h"
+
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "al_mad_pool.tmh"
+#endif
+
#include "al_mad_pool.h"
#include "al_pd.h"
#include "al_verbs.h"
@@ -147,16 +155,16 @@
ib_api_status_t status;
cl_status_t cl_status;
- CL_ENTER( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_POOL);
if( AL_OBJ_INVALID_HANDLE( h_al, AL_OBJ_TYPE_H_AL ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_AL_HANDLE\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_AL_HANDLE\n") );
return IB_INVALID_AL_HANDLE;
}
if( !ph_pool )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -181,7 +189,7 @@
if( status != IB_SUCCESS )
{
__free_pool( &h_pool->obj );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("init_al_obj failed with status %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -200,7 +208,7 @@
if( status != IB_SUCCESS )
{
h_pool->obj.pfn_destroy( &h_pool->obj, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("grow_mad_pool failed with status
%s.\n",
ib_get_err_str(status)) );
return status;
@@ -220,7 +228,7 @@
status = ib_convert_cl_status( cl_status );
h_pool->obj.pfn_destroy( &h_pool->obj, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("cl_qpool_init failed with status %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -235,7 +243,7 @@
status = ib_convert_cl_status( cl_status );
h_pool->obj.pfn_destroy( &h_pool->obj, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("cl_qpool_init failed with status %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -246,7 +254,7 @@
/* Release the reference taken in init_al_obj. */
deref_al_obj( &h_pool->obj );
- CL_EXIT( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_POOL);
return IB_SUCCESS;
}
@@ -262,7 +270,7 @@
ib_pool_handle_t h_pool;
ib_al_handle_t h_al;
- CL_ENTER( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_POOL);
CL_ASSERT( p_obj );
h_pool = PARENT_STRUCT( p_obj, al_pool_t, obj );
@@ -274,7 +282,7 @@
/* Deregister this MAD pool from all protection domains. */
al_dereg_pool( h_al, h_pool );
- CL_EXIT( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_POOL);
}
@@ -310,11 +318,11 @@
al_obj_t* p_obj;
boolean_t busy;
- CL_ENTER( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_POOL);
if( AL_OBJ_INVALID_HANDLE( h_pool, AL_OBJ_TYPE_H_MAD_POOL ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_HANDLE\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_HANDLE\n") );
return IB_INVALID_HANDLE;
}
@@ -333,7 +341,7 @@
/* Return an error if the pool is busy. */
if( busy )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("h_pool (0x%p) is busy!.\n", h_pool) );
return IB_RESOURCE_BUSY;
}
@@ -341,7 +349,7 @@
ref_al_obj( &h_pool->obj );
h_pool->obj.pfn_destroy( &h_pool->obj, NULL );
- CL_EXIT( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_POOL);
return IB_SUCCESS;
}
@@ -364,22 +372,22 @@
ib_api_status_t status;
al_key_type_t key_type;
- CL_ENTER( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_POOL);
if( AL_OBJ_INVALID_HANDLE( h_pool, AL_OBJ_TYPE_H_MAD_POOL ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_HANDLE\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_HANDLE\n") );
return IB_INVALID_HANDLE;
}
/* Alias keys require an alias PD. */
if( AL_OBJ_INVALID_HANDLE( h_pd, AL_OBJ_TYPE_H_PD ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PD_HANDLE\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_PD_HANDLE\n") );
return IB_INVALID_PD_HANDLE;
}
if( !pp_pool_key )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -407,7 +415,7 @@
{
__free_pool_key( &p_pool_key->obj );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("init_al_obj failed with status %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -416,7 +424,7 @@
if( status != IB_SUCCESS )
{
p_pool_key->obj.pfn_destroy( &p_pool_key->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("attach_al_obj returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -464,7 +472,7 @@
cl_spinlock_release( &h_pool->obj.lock
);
p_pool_key->obj.pfn_destroy(
&p_pool_key->obj, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR,
g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR
,
("reg_mad_array failed with
status %s.\n",
ib_get_err_str(status)) );
return status;
@@ -493,7 +501,7 @@
/* Release the reference taken in init_al_obj. */
deref_al_obj( &p_pool_key->obj );
- CL_EXIT( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_POOL);
return IB_SUCCESS;
}
@@ -547,7 +555,7 @@
status = ib_put_mad( p_mad_element_list );
if( status != IB_SUCCESS )
{
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,
AL_DBG_ERROR ,
("ib_put_mad failed with status
%s, continuing.\n",
ib_get_err_str(status)) );
}
@@ -714,11 +722,11 @@
{
ib_api_status_t status;
- CL_ENTER( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_POOL);
if( AL_OBJ_INVALID_HANDLE( pool_key, AL_OBJ_TYPE_H_POOL_KEY ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -728,7 +736,7 @@
if( status != IB_SUCCESS )
deref_al_obj( &pool_key->obj );
- CL_EXIT( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_POOL);
return status;
}
@@ -742,24 +750,24 @@
IN const ib_pool_key_t
pool_key ,
IN const al_key_type_t
expected_type )
{
- CL_ENTER( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_POOL);
if( pool_key->type != expected_type )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
///* Check mad_cnt to see if MADs are still outstanding. */
//if( pool_key->mad_cnt )
//{
- // CL_TRACE_EXIT( AL_DBG_MAD_POOL, g_al_dbg_lvl,
("IB_RESOURCE_BUSY\n") );
+ // AL_PRINT_EXIT( TRACE_LEVEL_ERROR, AL_DBG_MAD_POOL,
("IB_RESOURCE_BUSY\n") );
// return IB_RESOURCE_BUSY;
//}
pool_key->obj.pfn_destroy( &pool_key->obj, NULL );
- CL_EXIT( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_POOL);
return IB_SUCCESS;
}
@@ -779,7 +787,7 @@
mad_item_t* p_mad_item;
ib_api_status_t status;
- CL_ENTER( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_POOL);
CL_ASSERT( pool_key );
CL_ASSERT( pp_mad_element );
@@ -798,7 +806,7 @@
status = __grow_mad_pool( h_pool, &p_mad_item );
if( status != IB_SUCCESS )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("grow_mad_pool failed with status
%s.\n",
ib_get_err_str(status)) );
return status;
@@ -818,7 +826,7 @@
&p_mad_item->al_mad_element.list_item );
cl_spinlock_release( &h_pool->obj.lock );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("init_mad_element failed with status %s.\n",
ib_get_err_str(status)) );
return status;
@@ -831,7 +839,7 @@
/* Return the MAD element. */
*pp_mad_element = &p_mad_item->al_mad_element;
- CL_EXIT( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_POOL);
return IB_SUCCESS;
}
@@ -997,7 +1005,7 @@
al_pool_key_t* p_pool_key;
ib_api_status_t status;
- CL_ENTER( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_POOL);
CL_ASSERT( h_pool );
@@ -1016,7 +1024,7 @@
{
cl_spinlock_release( &h_pool->obj.lock );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("h_pool's (0x%p) maximum has been
reached.\n", h_pool) );
return IB_INSUFFICIENT_RESOURCES;
}
@@ -1026,7 +1034,7 @@
{
cl_spinlock_release( &h_pool->obj.lock );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("h_pool's (0x%p) will exceed maximum on
grow.\n", h_pool) );
return IB_INSUFFICIENT_RESOURCES;
}
@@ -1068,7 +1076,7 @@
cl_spinlock_release( &h_pool->obj.lock );
__free_mad_array( &p_mad_array->obj );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("init_al_obj failed with status %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -1133,7 +1141,7 @@
/* Release the reference taken in init_al_obj. */
deref_al_obj( &p_mad_array->obj );
- CL_EXIT( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_POOL);
return IB_SUCCESS;
}
@@ -1154,7 +1162,7 @@
cl_list_item_t* p_next_item;
mad_reg_t* p_reg;
- CL_ENTER( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_POOL);
CL_ASSERT( p_obj );
p_mad_array = PARENT_STRUCT( p_obj, mad_array_t, obj );
@@ -1194,7 +1202,7 @@
destroy_al_obj( &p_mad_array->obj );
cl_free( p_mad_array->p_data );
- CL_EXIT( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_POOL);
}
@@ -1344,16 +1352,16 @@
al_mad_element_t* p_mad;
ib_api_status_t status;
- CL_ENTER( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_POOL);
if( AL_OBJ_INVALID_HANDLE( pool_key, AL_OBJ_TYPE_H_POOL_KEY ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
if( !buf_size || !pp_mad_element )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -1362,7 +1370,7 @@
status = __get_mad_element( pool_key, &p_mad );
if( status != IB_SUCCESS )
{
- CL_EXIT( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_POOL);
return status;
}
@@ -1384,7 +1392,7 @@
if( !p_mad->p_al_mad_buf )
{
__put_mad_element( p_mad );
- CL_EXIT( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_POOL);
return IB_INSUFFICIENT_MEMORY;
}
p_mad->element.p_mad_buf = p_mad->p_al_mad_buf;
@@ -1400,7 +1408,7 @@
/* Return the MAD element to the client. */
*pp_mad_element = &p_mad->element;
- CL_EXIT( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_POOL);
return IB_SUCCESS;
}
@@ -1414,7 +1422,7 @@
if( !p_mad_element_list )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -1443,7 +1451,7 @@
}
else
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("MAD has already been returned to MAD
pool.\n") );
}
}
Index: core/al/user/SOURCES
===================================================================
--- core/al/user/SOURCES (revision 1349)
+++ core/al/user/SOURCES (working copy)
@@ -3,9 +3,21 @@
!else
TARGETNAME=ibald
!endif
+
TARGETPATH=..\..\..\bin\user\obj$(BUILD_ALT_DIR)
TARGETTYPE=DYNLINK
DLLENTRY=DllMain
+
+
+
+!if $(FREEBUILD)
+ENABLE_EVENT_TRACING=1
+!else
+#ENABLE_EVENT_TRACING=1
+!endif
+
+
+
DLLDEF=$O\al_exports.def
USE_NTDLL=1
@@ -61,10 +73,24 @@
TARGETLIBS= \
$(SDK_LIB_PATH)\kernel32.lib \
+ $(SDK_LIB_PATH)\user32.lib \
+ $(SDK_LIB_PATH)\Advapi32.lib
+
!if $(FREEBUILD)
$(TARGETPATH)\*\complib.lib
!else
$(TARGETPATH)\*\complibd.lib
!endif
+!IFDEF ENABLE_EVENT_TRACING
+
+C_DEFINES = $(C_DEFINES) -DEVENT_TRACING
+
+RUN_WPP = $(SOURCES) -ext: .c .h .C .H \
+ -scan:..\al_debug.h \
+ -func:AL_PRINT(LEVEL,FLAGS,(MSG,...)) \
+ -func:AL_PRINT_EXIT(LEVEL,FLAGS,(MSG,...))
+!ENDIF
+
+
MSC_WARNING_LEVEL= /W4
Index: core/al/user/ual_av.c
===================================================================
--- core/al/user/ual_av.c (revision 1349)
+++ core/al/user/ual_av.c (working copy)
@@ -35,8 +35,17 @@
#include "al_pd.h"
#include "al_av.h"
+#include "al_debug.h"
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "ual_av.tmh"
+#endif
+
+
ib_api_status_t
ual_create_av(
IN const ib_pd_handle_t
h_pd,
@@ -130,7 +139,7 @@
if( cl_status != CL_SUCCESS || bytes_ret !=
sizeof(ioctl_buf.out) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("UAL_CREATE_AV IOCTL returned %s\n",
CL_STATUS_MSG(cl_status)) );
return IB_ERROR;
}
@@ -195,14 +204,14 @@
if( cl_status != CL_SUCCESS || bytes_ret !=
sizeof(ioctl_buf.out) )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_DESTROY_AV IOCTL returned %s\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
}
else if( ioctl_buf.out.status != IB_SUCCESS )
{
CL_ASSERT( status == IB_SUCCESS );
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_DESTROY_AV IOCTL status %s\n",
ib_get_err_str(ioctl_buf.out.status)) );
status = ioctl_buf.out.status;
@@ -273,7 +282,7 @@
if( cl_status != CL_SUCCESS || bytes_ret !=
sizeof(ioctl_buf.out) )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_MODIFY_AV IOCTL returned %s\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
}
@@ -343,7 +352,7 @@
if( cl_status != CL_SUCCESS || bytes_ret !=
sizeof(ioctl_buf.out) )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_QUERY_AV IOCTL returned %s\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
}
Index: core/al/user/ual_ca.c
===================================================================
--- core/al/user/ual_ca.c (revision 1349)
+++ core/al/user/ual_ca.c (working copy)
@@ -34,6 +34,14 @@
#include "al.h"
#include "al_ca.h"
#include "al_debug.h"
+
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "ual_ca.tmh"
+#endif
+
#include "ual_ca.h"
#include "ual_ci_ca.h"
@@ -77,7 +85,7 @@
if( cl_status != CL_SUCCESS || bytes_ret != sizeof(al_ioctl.out)
)
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IOCTL returned %s\n",
CL_STATUS_MSG(cl_status)) );
return IB_ERROR;
}
@@ -85,8 +93,8 @@
if( !strlen( al_ioctl.out.uvp_lib_name ) )
{
/* Vendor does not implement user-mode library */
- AL_TRACE_EXIT( AL_DBG_WARN | AL_DBG_CA,
- ("No vendor lib for CA guid %"PRIx64".\n",
ca_guid) );
+ AL_PRINT_EXIT(TRACE_LEVEL_WARNING ,AL_DBG_CA ,
+ ("No vendor lib for CA guid %I64x.\n", ca_guid)
);
return IB_UNSUPPORTED;
}
@@ -94,13 +102,13 @@
* The vendor supports a user-mode library
* open the library and get the interfaces supported
*/
- AL_TRACE( AL_DBG_CA,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CA ,
("Loading vendor lib (%s)\n", al_ioctl.out.uvp_lib_name)
);
h_lib = al_load_uvp( al_ioctl.out.uvp_lib_name );
if (h_lib == NULL)
{
#if defined( _DEBUG_ )
- al_uvp_lib_err( AL_DBG_WARN,
+ al_uvp_lib_err( TRACE_LEVEL_WARNING,
"!vendor lib (%s) not found for CA guid
%"PRIx64".",
al_ioctl.out.uvp_lib_name, ca_guid );
#endif
@@ -112,7 +120,7 @@
if( !pfn_uvp_ifc )
{
#if defined( _DEBUG_ )
- al_uvp_lib_err( AL_DBG_ERROR,
+ al_uvp_lib_err( TRACE_LEVEL_ERROR,
"failed to get vendor lib interface (%s) "
"for CA guid %"PRIx64" returned ",
al_ioctl.out.uvp_lib_name, ca_guid );
@@ -154,7 +162,7 @@
if( status != IB_SUCCESS )
{
CL_ASSERT( status != IB_VERBS_PROCESSING_DONE );
- CL_EXIT( AL_DBG_CA, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CA);
return status;
}
}
@@ -168,7 +176,7 @@
if( cl_status != CL_SUCCESS || bytes_ret != sizeof(ca_ioctl.out)
)
{
- AL_TRACE( AL_DBG_ERROR, ("UAL_OPEN_CA IOCTL returned
%s\n",
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("UAL_OPEN_CA
IOCTL returned %s\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
}
@@ -227,7 +235,7 @@
if( cl_status != CL_SUCCESS || bytes_ret != sizeof(ca_ioctl.out)
)
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_CLOSE_CA IOCTL returned %s\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
}
@@ -287,7 +295,7 @@
if( cl_status != CL_SUCCESS || bytes_ret != sizeof(ca_ioctl.out)
)
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_QUERY_CA IOCTL returned %s\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
}
@@ -352,7 +360,7 @@
if( cl_status != CL_SUCCESS || bytes_ret != sizeof(ca_ioctl.out)
)
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_MODIFY_CA IOCTL returned %s\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
}
@@ -419,12 +427,12 @@
if( AL_OBJ_INVALID_HANDLE( h_ca, AL_OBJ_TYPE_H_CA ) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("IB_INVALID_CA_HANDLE\n")
);
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_INVALID_CA_HANDLE\n") );
return IB_INVALID_CA_HANDLE;
}
if( !p_ci_op )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("IB_INVALID_PARAMETER\n")
);
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -498,7 +506,7 @@
if( cl_status != CL_SUCCESS || bytes_ret !=
sizeof(p_ca_ioctl->out) )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_CI_CALL IOCTL returned %s\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
}
Index: core/al/user/ual_ci_ca.c
===================================================================
--- core/al/user/ual_ci_ca.c (revision 1349)
+++ core/al/user/ual_ci_ca.c (working copy)
@@ -39,6 +39,16 @@
#include "al_pd.h"
#include "ib_common.h"
+
+#include "al_debug.h"
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "ual_ci_ca.tmh"
+#endif
+
+
extern ib_pool_handle_t gh_mad_pool;
extern ib_al_handle_t gh_al;
extern cl_async_proc_t *gp_async_proc_mgr;
@@ -77,13 +87,13 @@
cl_status_t cl_status;
al_ci_ca_t *p_ci_ca;
- CL_ENTER( AL_DBG_CA, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CA);
/* Allocate a new CA structure. */
p_ci_ca = (al_ci_ca_t *)cl_zalloc( sizeof( al_ci_ca_t ) );
if( p_ci_ca == NULL )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Failed to cl_malloc al_ci_ca_t\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -98,7 +108,7 @@
if( cl_status != CL_SUCCESS )
{
free_ci_ca( &p_ci_ca->obj );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("cl_spinlock_init failed, status = 0x%x.\n",
ib_convert_cl_status(cl_status) ) );
return ib_convert_cl_status( cl_status );
@@ -111,7 +121,7 @@
if( cl_status != CL_SUCCESS )
{
free_ci_ca( &p_ci_ca->obj );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("cl_qpool_init failed, status = 0x%x.\n",
ib_convert_cl_status(cl_status) ) );
return ib_convert_cl_status( cl_status );
@@ -128,7 +138,7 @@
if( status != IB_SUCCESS )
{
free_ci_ca( &p_ci_ca->obj );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("init_al_obj failed, status = 0x%x.\n", status)
);
return status;
}
@@ -158,7 +168,7 @@
if( status != IB_SUCCESS )
{
p_ci_ca->obj.pfn_destroy( &p_ci_ca->obj, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("ib_open_ca failed, status = 0x%x.\n", status)
);
return status;
}
@@ -174,7 +184,7 @@
* and the associated destroy/cleanup in the AL's
* object model
*/
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("ual_open_ca failed, status = 0x%x.\n", status)
);
return IB_ERROR;
}
@@ -191,7 +201,7 @@
if( status != IB_SUCCESS )
{
p_ci_ca->obj.pfn_destroy( &p_ci_ca->obj, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("ib_alloc_pd failed, status = 0x%x.\n", status)
);
return status;
}
@@ -201,7 +211,7 @@
if( status != IB_SUCCESS )
{
p_ci_ca->obj.pfn_destroy( &p_ci_ca->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("ual_allocate_pd returned %s\n",
ib_get_err_str( status )) );
return status;
}
@@ -212,7 +222,7 @@
if( status != IB_SUCCESS )
{
p_ci_ca->obj.pfn_destroy( &p_ci_ca->obj, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("ib_alloc_pd failed, status = 0x%x.\n", status)
);
return status;
}
@@ -221,7 +231,7 @@
if( status != IB_SUCCESS )
{
p_ci_ca->obj.pfn_destroy( &p_ci_ca->obj, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("get_port_info failed, status = 0x%x.\n",
status) );
return status;
}
@@ -231,7 +241,7 @@
if( status != IB_SUCCESS )
{
p_ci_ca->obj.pfn_destroy( &p_ci_ca->obj, NULL );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("ib_reg_mad_pool failed, status = 0x%x.\n",
status) );
return status;
}
@@ -242,7 +252,7 @@
/* Release the reference taken in init_al_obj. */
deref_al_obj( &p_ci_ca->obj );
- CL_EXIT( AL_DBG_CA, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CA);
return IB_SUCCESS;
}
@@ -272,7 +282,7 @@
{
al_ci_ca_t *p_ci_ca;
- CL_ENTER( AL_DBG_CA, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CA);
CL_ASSERT( p_obj );
p_ci_ca = PARENT_STRUCT( p_obj, al_ci_ca_t, obj );
@@ -285,7 +295,7 @@
if( p_ci_ca->h_ca )
cl_async_proc_queue( gp_async_pnp_mgr,
&p_ci_ca->dereg_async_item );
- CL_EXIT( AL_DBG_CA, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CA);
}
@@ -303,7 +313,7 @@
ib_api_status_t status;
al_ci_ca_t *p_ci_ca;
- CL_ENTER( AL_DBG_CA, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CA);
CL_ASSERT( p_obj );
p_ci_ca = PARENT_STRUCT( p_obj, al_ci_ca_t, obj );
@@ -324,5 +334,5 @@
close_vendor_lib( &p_ci_ca->verbs );
- CL_EXIT( AL_DBG_CA, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CA);
}
Index: core/al/user/ual_cm.c
===================================================================
--- core/al/user/ual_cm.c (revision 1349)
+++ core/al/user/ual_cm.c (working copy)
@@ -34,6 +34,14 @@
#include "al.h"
#include "al_cm_shared.h"
#include "al_debug.h"
+
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "ual_cm.tmh"
+#endif
+
#include "al_dev.h"
#include "al_qp.h"
#include "ib_common.h"
@@ -266,12 +274,12 @@
/* Validate input parameters. */
if( AL_OBJ_INVALID_HANDLE( h_al, AL_OBJ_TYPE_H_AL ) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("Invalid AL handle.\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("Invalid
AL handle.\n") );
return IB_INVALID_AL_HANDLE;
}
if( !p_cm_listen || !ph_cm_listen )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("NULL parameter.\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("NULL
parameter.\n") );
return IB_INVALID_PARAMETER;
}
@@ -279,7 +287,7 @@
h_listen = __get_listen( h_al );
if( !h_listen )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Failed to allocate listen structure.\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -300,7 +308,7 @@
if( !p_cm_ioctl )
{
h_listen->obj.pfn_destroy( &h_listen->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR, ("Failed to allocate IOCTL
buffer.\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("Failed
to allocate IOCTL buffer.\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -321,7 +329,7 @@
if( cl_status != CL_SUCCESS || bytes_ret !=
sizeof(p_cm_ioctl->out) )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_CM_LISTEN IOCTL returned %s\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
}
@@ -332,7 +340,7 @@
if( status != IB_SUCCESS )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Failed to listen: %s.\n",
ib_get_err_str(status) ) );
h_listen->obj.pfn_destroy( &h_listen->obj, NULL );
}
@@ -366,7 +374,7 @@
if( AL_OBJ_INVALID_HANDLE( h_cm_listen, AL_OBJ_TYPE_H_LISTEN ) )
{
- AL_TRACE( AL_DBG_ERROR, ("Invalid listen handle.\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid
listen handle.\n") );
return IB_INVALID_HANDLE;
}
@@ -383,7 +391,7 @@
if( cl_status != CL_SUCCESS || bytes_ret != sizeof(cm_ioctl.out)
)
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_CM_CANCEL IOCTL returned %s\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
}
@@ -393,7 +401,7 @@
}
if( status != IB_SUCCESS )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Failed to cancel: %s.\n",
ib_get_err_str(status) ) );
deref_al_obj( &h_cm_listen->obj );
}
@@ -428,7 +436,7 @@
/* Validate input parameters. */
if( !p_cm_req || !p_cm_req->p_primary_path )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("NULL p_cm_req or primary path\n") );
return IB_INVALID_PARAMETER;
}
@@ -444,7 +452,7 @@
p_cm_ioctl = (ual_cm_req_ioctl_t*)cl_zalloc( ioctl_buf_sz );
if( !p_cm_ioctl )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("Failed to allocate IOCTL buf.\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -461,7 +469,7 @@
if( AL_OBJ_INVALID_HANDLE( p_cm_req->h_qp,
AL_OBJ_TYPE_H_QP ) ||
(p_cm_req->h_qp->type != p_cm_req->qp_type) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_QP_HANDLE\n") );
status = IB_INVALID_QP_HANDLE;
goto cleanup;
@@ -476,7 +484,7 @@
p_cm_req->h_qp->obj.p_parent_obj->p_parent_obj->p_parent_obj );
if( !h_conn )
{
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("Failed to allocate connection
structure.\n") );
status = IB_INSUFFICIENT_MEMORY;
goto cleanup;
@@ -498,7 +506,7 @@
if( status != IB_SUCCESS )
{
h_conn->obj.pfn_destroy( &h_conn->obj, NULL );
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("cm_init_qp returned %s\n",
ib_get_err_str(status)) );
goto cleanup;
}
@@ -507,7 +515,7 @@
case IB_QPT_UNRELIABLE_DGRM:
if( AL_OBJ_INVALID_HANDLE( p_cm_req->h_al,
AL_OBJ_TYPE_H_AL ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_AL_HANDLE\n") );
status = IB_INVALID_AL_HANDLE;
goto cleanup;
@@ -516,7 +524,7 @@
h_conn = __get_conn( p_cm_req->h_al );
if( !h_conn )
{
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("Failed to allocate connection
structure.\n") );
status = IB_INSUFFICIENT_MEMORY;
goto cleanup;
@@ -527,7 +535,7 @@
break;
default:
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid
qp_type.\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid
qp_type.\n") );
status = IB_INVALID_SETTING;
goto cleanup;
}
@@ -560,7 +568,7 @@
if( cl_status != CL_SUCCESS || bytes_ret !=
sizeof(p_cm_ioctl->out) )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_CM_REQ IOCTL returned %s\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
}
@@ -571,7 +579,7 @@
if( status != IB_SUCCESS )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Connection request ioctl failed with status
(%s)\n",
ib_get_err_str(status) ) );
h_conn->obj.pfn_destroy( &h_conn->obj, NULL );
@@ -598,7 +606,7 @@
ib_port_attr_t *p_port_attr;
ib_qp_handle_t h_qp;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
__bind_qp_and_conn( h_conn, p_cm_rep->h_qp );
h_qp = p_cm_rep->h_qp;
@@ -610,7 +618,7 @@
if( !p_port_attr )
{
ci_ca_unlock_attr( h_qp->obj.p_ci_ca );
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl, ("invalid p_gid\n"
) );
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR , ("invalid
p_gid\n" ) );
return IB_INVALID_GID;
}
@@ -619,7 +627,7 @@
&h_conn->p_conn_req->qp_mod_rts );
ci_ca_unlock_attr( h_qp->obj.p_ci_ca );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_SUCCESS;
}
@@ -637,18 +645,18 @@
ib_api_status_t status;
cl_status_t cl_status;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Validate input parameters. */
h_conn = h_cm_req;
if( AL_OBJ_INVALID_HANDLE( h_conn, AL_OBJ_TYPE_H_CONN ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid REQ
handle.\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid REQ
handle.\n") );
return IB_INVALID_HANDLE;
}
if( !p_cm_rep )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("NULL
p_cm_rep\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("NULL
p_cm_rep\n") );
return IB_INVALID_PARAMETER;
}
@@ -666,7 +674,7 @@
p_cm_ioctl = (ual_cm_rep_ioctl_t*)cl_zalloc( ioctl_buf_sz );
if( !p_cm_ioctl )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("Failed to allocate IOCTL
buffer.\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("Failed
to allocate IOCTL buffer.\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -675,7 +683,7 @@
if( AL_OBJ_INVALID_HANDLE( p_cm_rep->h_qp, AL_OBJ_TYPE_H_QP ) ||
p_cm_rep->h_qp->type != p_cm_rep->qp_type )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Invalid QP handle.\n") );
status = IB_INVALID_QP_HANDLE;
goto cleanup;
@@ -689,7 +697,7 @@
if( status != IB_SUCCESS )
{
__ual_conn_reject( h_conn, IB_REJ_INSUF_QP );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("__save_user_rep returned %s\n",
ib_get_err_str(status) ) );
goto cleanup;
}
@@ -700,7 +708,7 @@
if( status != IB_SUCCESS )
{
__ual_conn_reject( h_conn, IB_REJ_INSUF_QP );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("cm_init_qp returned %s\n",
ib_get_err_str(status) ) );
goto cleanup;
}
@@ -713,7 +721,7 @@
if( status != IB_SUCCESS )
{
__ual_conn_reject( h_conn, IB_REJ_INSUF_QP );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("ib_post_recv returned %s.\n",
ib_get_err_str(status)) );
goto cleanup;
}
@@ -726,7 +734,7 @@
if( status != IB_SUCCESS )
{
__ual_conn_reject( h_conn, IB_REJ_INSUF_QP );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("cm_rts_qp with status (%s)\n",
ib_get_err_str(status) ) );
goto cleanup;
}
@@ -746,7 +754,7 @@
if( cl_status != CL_SUCCESS || bytes_ret !=
sizeof(p_cm_ioctl->out) )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_CM_REP IOCTL returned %s\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
}
@@ -757,7 +765,7 @@
if( status != IB_SUCCESS )
{
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR ,
("Connection reply ioctl failed with status
(%s)\n",
ib_get_err_str(status) ) );
cm_reset_qp( h_conn->h_qp, 0 );
@@ -785,18 +793,18 @@
ib_api_status_t status;
cl_status_t cl_status;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Validate input parameters. */
h_conn = h_cm_rep;
if( AL_OBJ_INVALID_HANDLE( h_conn, AL_OBJ_TYPE_H_CONN ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid rep
handle.\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid rep
handle.\n") );
return IB_INVALID_HANDLE;
}
if( !p_cm_rtu )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("NULL
p_cm_rtu\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("NULL
p_cm_rtu\n") );
return IB_INVALID_PARAMETER;
}
@@ -811,7 +819,7 @@
if( status != IB_SUCCESS )
{
__ual_conn_reject( h_conn, IB_REJ_INSUF_QP );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("cm_rts_qp with status (%s)\n",
ib_get_err_str(status) ) );
return status;
}
@@ -832,7 +840,7 @@
p_cm_ioctl = (ual_cm_rtu_ioctl_t*)cl_zalloc( ioctl_buf_sz );
if( !p_cm_ioctl )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("Failed to allocate IOCTL
buffer\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("Failed
to allocate IOCTL buffer\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -851,7 +859,7 @@
if( cl_status != CL_SUCCESS || bytes_ret !=
sizeof(p_cm_ioctl->out) )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_CM_RTU IOCTL returned %s\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
}
@@ -862,7 +870,7 @@
if( IB_SUCCESS != status )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IOCTL status %s.\n", ib_get_err_str(status))
);
ref_al_obj( &h_conn->obj );
h_conn->obj.pfn_destroy( &h_conn->obj, NULL );
@@ -891,12 +899,12 @@
h_conn = h_cm_req;
if( AL_OBJ_INVALID_HANDLE( h_conn, AL_OBJ_TYPE_H_CONN ) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("Invalid REQ handle.\n")
);
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("Invalid
REQ handle.\n") );
return IB_INVALID_HANDLE;
}
if( !svc_id )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("0 svc_id\n" ) );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("0
svc_id\n" ) );
return IB_INVALID_PARAMETER;
}
@@ -912,13 +920,13 @@
if( cl_status != CL_SUCCESS || bytes_ret != sizeof(cm_ioctl.out)
)
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("UAL_CM_HANDOFF IOCTL returned %s\n",
CL_STATUS_MSG(cl_status)) );
return IB_ERROR;
}
else if( cm_ioctl.out.status != IB_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IOCTL status %s\n",
ib_get_err_str(cm_ioctl.out.status)) );
}
@@ -945,18 +953,18 @@
ib_api_status_t status;
cl_status_t cl_status;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Validate input parameters. */
h_conn = h_cm;
if( AL_OBJ_INVALID_HANDLE( h_conn, AL_OBJ_TYPE_H_CONN ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid REJ
handle.\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid REJ
handle.\n") );
return IB_INVALID_HANDLE;
}
if( !p_cm_rej )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("NULL
p_cm_rej\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("NULL
p_cm_rej\n") );
return IB_INVALID_PARAMETER;
}
@@ -969,7 +977,7 @@
p_cm_ioctl = (ual_cm_rej_ioctl_t*)cl_zalloc( ioctl_buf_sz );
if( !p_cm_ioctl )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("Failed to allocate IOCTL buffer.\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -993,7 +1001,7 @@
if( cl_status != CL_SUCCESS || bytes_ret !=
sizeof(p_cm_ioctl->out) )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_CM_REJ IOCTL returned %s\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
}
@@ -1013,7 +1021,7 @@
}
else
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IOCTL status %s.\n", ib_get_err_str(status))
);
}
@@ -1036,18 +1044,18 @@
ib_api_status_t status;
cl_status_t cl_status;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Validate input parameters. */
h_conn = h_cm;
if( AL_OBJ_INVALID_HANDLE( h_conn, AL_OBJ_TYPE_H_CONN ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid CM
handle.\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid CM
handle.\n") );
return IB_INVALID_HANDLE;
}
if( !p_cm_mra )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("NULL
p_cm_mra\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("NULL
p_cm_mra\n") );
return IB_INVALID_PARAMETER;
}
@@ -1058,7 +1066,7 @@
p_cm_ioctl = (ual_cm_mra_ioctl_t*)cl_zalloc( ioctl_buf_sz );
if( !p_cm_ioctl )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("Failed to allocate IOCTL buffer\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -1077,7 +1085,7 @@
if( cl_status != CL_SUCCESS || bytes_ret !=
sizeof(p_cm_ioctl->out) )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_CM_MRA IOCTL returned %s\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
}
@@ -1086,13 +1094,13 @@
status = p_cm_ioctl->out.status;
if( status != IB_SUCCESS )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IOCTL status %s.\n",
ib_get_err_str(status)) );
}
}
cl_free( p_cm_ioctl );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return status;
}
@@ -1109,12 +1117,12 @@
ib_api_status_t status;
cl_status_t cl_status;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Validate input parameters. */
if( !p_cm_lap || !p_cm_lap->p_alt_path )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("NULL
p_cm_lap\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("NULL
p_cm_lap\n") );
return IB_INVALID_PARAMETER;
}
@@ -1125,7 +1133,7 @@
p_cm_ioctl = (ual_cm_lap_ioctl_t*)cl_zalloc( ioctl_buf_sz );
if( !p_cm_ioctl )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("Failed to allocate IOCTL
buffer.\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("Failed
to allocate IOCTL buffer.\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -1138,7 +1146,7 @@
if( AL_OBJ_INVALID_HANDLE( p_cm_lap->h_qp,
AL_OBJ_TYPE_H_QP ) ||
(p_cm_lap->h_qp->type != p_cm_lap->qp_type) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_QP_HANDLE\n") );
status = IB_INVALID_QP_HANDLE;
goto cleanup;
@@ -1148,14 +1156,14 @@
break;
default:
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid
qp_type.\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid
qp_type.\n") );
status = IB_INVALID_SETTING;
goto cleanup;
}
if( AL_OBJ_INVALID_HANDLE( h_conn, AL_OBJ_TYPE_H_CONN ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("No connection info!\n") );
status = IB_INVALID_SETTING;
goto cleanup;
@@ -1176,7 +1184,7 @@
if( cl_status != CL_SUCCESS || bytes_ret !=
sizeof(p_cm_ioctl->out) )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_CM_LAP IOCTL returned %s\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
}
@@ -1185,14 +1193,14 @@
status = p_cm_ioctl->out.status;
if( status != IB_SUCCESS )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IOCTL status %s.\n",
ib_get_err_str(status)) );
}
}
cleanup:
cl_free( p_cm_ioctl );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return status;
}
@@ -1207,7 +1215,7 @@
ib_api_status_t status;
cl_status_t cl_status;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Clear the apm_ioctl */
cl_memclr( &cm_ioctl, sizeof( cm_ioctl ) );
@@ -1215,7 +1223,7 @@
/* Replace the handles with kernel handles appropriately */
if( AL_OBJ_INVALID_HANDLE( h_qp, AL_OBJ_TYPE_H_QP ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid QP
handle.\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid QP
handle.\n") );
return IB_INVALID_QP_HANDLE;
}
@@ -1227,7 +1235,7 @@
if( cl_status != CL_SUCCESS || bytes_ret != sizeof(cm_ioctl.out)
)
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_CM_FORCE_APM IOCTL returned %s\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
@@ -1237,12 +1245,12 @@
status = cm_ioctl.out.status;
if( status != IB_SUCCESS )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IOCTL status %s.\n",
ib_get_err_str(status)) );
}
}
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return status;
}
@@ -1261,18 +1269,18 @@
cl_status_t cl_status;
uint8_t *p_buf;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Validate input parameters. */
h_conn = h_cm_lap;
if( AL_OBJ_INVALID_HANDLE( h_conn, AL_OBJ_TYPE_H_CONN ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid lap
handle.\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid lap
handle.\n") );
return IB_INVALID_HANDLE;
}
if( !p_cm_apr )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("NULL
p_cm_apr\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("NULL
p_cm_apr\n") );
return IB_INVALID_PARAMETER;
}
@@ -1285,7 +1293,7 @@
p_cm_ioctl = (ual_cm_apr_ioctl_t*)cl_zalloc( ioctl_buf_sz );
if( !p_cm_ioctl )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("Failed to allocate IOCTL
buffer.\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("Failed
to allocate IOCTL buffer.\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -1302,7 +1310,7 @@
if( AL_OBJ_INVALID_HANDLE( p_cm_apr->h_qp,
AL_OBJ_TYPE_H_QP ) ||
(p_cm_apr->h_qp->type != p_cm_apr->qp_type) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_QP_HANDLE\n") );
status = IB_INVALID_QP_HANDLE;
goto cleanup;
@@ -1312,14 +1320,14 @@
break;
default:
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid
qp_type.\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid
qp_type.\n") );
status = IB_INVALID_SETTING;
goto cleanup;
}
if( AL_OBJ_INVALID_HANDLE( h_conn, AL_OBJ_TYPE_H_CONN ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("No connection info!\n") );
status = IB_INVALID_SETTING;
goto cleanup;
@@ -1342,7 +1350,7 @@
if( cl_status != CL_SUCCESS || bytes_ret !=
sizeof(p_cm_ioctl->out) )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_CM_APR IOCTL returned %s.\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
}
@@ -1351,7 +1359,7 @@
status = p_cm_ioctl->out.status;
if( status != IB_SUCCESS )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IOCTL status %s.\n",
ib_get_err_str(status)) );
}
}
@@ -1361,7 +1369,7 @@
cleanup:
cl_free( p_cm_ioctl );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return IB_SUCCESS;
}
@@ -1378,12 +1386,12 @@
ib_api_status_t status;
cl_status_t cl_status;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Validate input parameters. */
if( !p_cm_dreq )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("NULL
p_cm_dreq\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("NULL
p_cm_dreq\n") );
return IB_INVALID_PARAMETER;
}
@@ -1394,7 +1402,7 @@
p_cm_ioctl = (ual_cm_dreq_ioctl_t*)cl_zalloc( ioctl_buf_sz );
if( !p_cm_ioctl )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("Failed to allocate IOCTL
buffer.\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("Failed
to allocate IOCTL buffer.\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -1407,7 +1415,7 @@
if( AL_OBJ_INVALID_HANDLE( p_cm_dreq->h_qp,
AL_OBJ_TYPE_H_QP ) ||
(p_cm_dreq->h_qp->type != p_cm_dreq->qp_type) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_QP_HANDLE\n") );
status = IB_INVALID_QP_HANDLE;
goto cleanup;
@@ -1417,14 +1425,14 @@
break;
default:
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid
qp_type.\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid
qp_type.\n") );
status = IB_INVALID_SETTING;
goto cleanup;
}
if( AL_OBJ_INVALID_HANDLE( h_conn, AL_OBJ_TYPE_H_CONN ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("No connection info!\n") );
status = IB_INVALID_SETTING;
goto cleanup;
@@ -1445,7 +1453,7 @@
if( cl_status != CL_SUCCESS || bytes_ret !=
sizeof(p_cm_ioctl->out) )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_CM_DREQ IOCTL returned %s\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
}
@@ -1455,14 +1463,14 @@
if( IB_SUCCESS != status )
{
/* We can fail if we just received a DREQ, which
is not an error. */
- AL_TRACE( AL_DBG_CM,
+ AL_PRINT(TRACE_LEVEL_INFORMATION ,AL_DBG_CM ,
("IOCTL status %s\n",
ib_get_err_str(status)) );
}
}
cleanup:
cl_free( p_cm_ioctl );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return status;
}
@@ -1480,18 +1488,18 @@
ib_api_status_t status;
cl_status_t cl_status;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Validate input parameters. */
h_conn = h_cm_dreq;
if( AL_OBJ_INVALID_HANDLE( h_conn, AL_OBJ_TYPE_H_CONN ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid
DREP handle.\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid
DREP handle.\n") );
return IB_INVALID_HANDLE;
}
if( !p_cm_drep )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("NULL
p_cm_drep\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("NULL
p_cm_drep\n") );
return IB_INVALID_PARAMETER;
}
@@ -1502,7 +1510,7 @@
p_cm_ioctl = (ual_cm_drep_ioctl_t*)cl_zalloc( ioctl_buf_sz );
if( !p_cm_ioctl )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("Failed to allocate IOCTL buffer.\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -1523,7 +1531,7 @@
if( cl_status != CL_SUCCESS || bytes_ret !=
sizeof(p_cm_ioctl->out) )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_CM_DREP IOCTL returned %s\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
}
@@ -1540,7 +1548,7 @@
}
else
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IOCTL status %s\n", ib_get_err_str(status)) );
/* Release the reference taken when processing the
callback. */
@@ -1548,7 +1556,7 @@
}
cl_free( p_cm_ioctl );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
return status;
}
@@ -1560,7 +1568,7 @@
{
ib_listen_handle_t h_listen;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Get the listen object. */
h_listen = p_listen_err_rec->listen_context;
@@ -1578,7 +1586,7 @@
ref_al_obj( &h_listen->obj );
h_listen->obj.pfn_destroy( &h_listen->obj, NULL );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -1594,7 +1602,7 @@
ib_cm_handle_t h_conn;
ib_qp_handle_t h_qp;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
if( p_cm_req_rec->h_cm_listen )
{
@@ -1621,7 +1629,7 @@
h_conn = __get_conn(
(ib_al_handle_t)h_listen->obj.p_parent_obj );
if( !h_conn )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("__get_conn failed.\n") );
__rej_conn( p_cm_req_rec->h_cm_req,
IB_REJ_INSUF_RESOURCES );
return;
@@ -1668,7 +1676,7 @@
/* Invoke the user's callback. */
h_conn->p_conn_req->pfn_cm_req_cb( p_cm_req_rec );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -1682,7 +1690,7 @@
ib_cm_handle_t h_conn;
ib_qp_handle_t h_qp;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Get the user's context. */
switch( p_cm_rep_rec->qp_type )
@@ -1724,11 +1732,11 @@
break;
default:
- CL_TRACE( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid
qp_type.\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR , AL_DBG_ERROR , ("Invalid
qp_type.\n") );
break;
}
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -1741,7 +1749,7 @@
ib_qp_handle_t h_qp;
ib_pfn_cm_rtu_cb_t pfn_cm_rtu_cb;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
h_qp = (ib_qp_handle_t)p_cm_rtu_rec->qp_context;
p_cm_rtu_rec->qp_context = h_qp->obj.context;
@@ -1762,7 +1770,7 @@
/* Invoke the user's callback. */
pfn_cm_rtu_cb( p_cm_rtu_rec );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -1775,7 +1783,7 @@
ib_qp_handle_t h_qp;
ib_pfn_cm_rej_cb_t pfn_cm_rej_cb;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
h_qp = (ib_qp_handle_t)p_cm_rej_rec->qp_context;
p_cm_rej_rec->qp_context = h_qp->obj.context;
@@ -1807,7 +1815,7 @@
if( pfn_cm_rej_cb )
pfn_cm_rej_cb( p_cm_rej_rec );
}
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -1819,7 +1827,7 @@
ib_cm_handle_t h_conn;
ib_qp_handle_t h_qp;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Convert the user's handles. */
switch( p_cm_mra_rec->qp_type )
@@ -1832,14 +1840,14 @@
break;
default:
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid
qp_type.\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid
qp_type.\n") );
return;
}
/* Call the application callback */
h_conn->pfn_cm_mra_cb( p_cm_mra_rec );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -1851,7 +1859,7 @@
ib_cm_handle_t h_conn;
ib_qp_handle_t h_qp;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Convert the user's handles. */
switch( p_cm_lap_rec->qp_type )
@@ -1864,7 +1872,7 @@
break;
default:
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid
qp_type.\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid
qp_type.\n") );
return;
}
@@ -1878,7 +1886,7 @@
/* Call the application callback */
h_conn->pfn_cm_lap_cb( p_cm_lap_rec );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -1890,7 +1898,7 @@
ib_cm_handle_t h_conn;
ib_qp_handle_t h_qp;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Convert the user's handles. */
switch( p_cm_apr_rec->qp_type )
@@ -1903,14 +1911,14 @@
break;
default:
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid
qp_type.\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid
qp_type.\n") );
return;
}
/* Call the application callback */
h_conn->pfn_cm_apr_cb( p_cm_apr_rec );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -1922,7 +1930,7 @@
ib_cm_handle_t h_conn;
ib_qp_handle_t h_qp;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Convert the user's handles. */
switch( p_cm_dreq_rec->qp_type )
@@ -1935,7 +1943,7 @@
break;
default:
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid
qp_type.\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid
qp_type.\n") );
return;
}
@@ -1948,7 +1956,7 @@
/* Call the application callback */
h_conn->pfn_cm_dreq_cb( p_cm_dreq_rec );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
@@ -1961,7 +1969,7 @@
ib_qp_handle_t h_qp;
ib_pfn_cm_drep_cb_t pfn_cm_drep_cb;
- CL_ENTER( AL_DBG_CM, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_CM);
/* Convert the user's handles. */
switch( p_cm_drep_rec->qp_type )
@@ -1974,7 +1982,7 @@
break;
default:
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("Invalid
qp_type.\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Invalid
qp_type.\n") );
return;
}
@@ -1994,5 +2002,5 @@
/* Invoke the user's callback. */
pfn_cm_drep_cb( p_cm_drep_rec );
- CL_EXIT( AL_DBG_CM, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_CM);
}
Index: core/al/user/ual_cm_cep.c
===================================================================
--- core/al/user/ual_cm_cep.c (revision 1349)
+++ core/al/user/ual_cm_cep.c (working copy)
@@ -38,6 +38,14 @@
#include "al_cm_conn.h"
#include "al_cm_sidr.h"
#include "al_debug.h"
+
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "ual_cm_cep.tmh"
+#endif
+
#include "ib_common.h"
#include "al_mgr.h"
//#include "al_ca.h"
@@ -126,7 +134,7 @@
gp_cep_mgr = (ual_cep_mgr_t*)cl_zalloc( sizeof(ual_cep_mgr_t) );
if( !gp_cep_mgr )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("Failed allocation of global CEP manager.\n")
);
return IB_INSUFFICIENT_MEMORY;
}
@@ -140,7 +148,7 @@
if( status != IB_SUCCESS )
{
__free_cep_mgr( &gp_cep_mgr->obj );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("init_al_obj failed with status %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -149,7 +157,7 @@
if( status != IB_SUCCESS )
{
gp_cep_mgr->obj.pfn_destroy( &gp_cep_mgr->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("attach_al_obj returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -159,7 +167,7 @@
if( cl_status != CL_SUCCESS )
{
gp_cep_mgr->obj.pfn_destroy( &gp_cep_mgr->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("cl_vector_init failed with status %s.\n",
CL_STATUS_MSG(cl_status)) );
return ib_convert_cl_status( cl_status );
@@ -170,7 +178,7 @@
if( gp_cep_mgr->h_file == INVALID_HANDLE_VALUE )
{
gp_cep_mgr->obj.pfn_destroy( &gp_cep_mgr->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("ual_create_async_file for UAL_BIND_CM returned
%d.\n",
GetLastError()) );
return IB_ERROR;
@@ -248,7 +256,7 @@
p_cep = cl_zalloc( sizeof(ucep_t) );
if( !p_cep )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("Failed to allocate
ucep_t\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("Failed
to allocate ucep_t\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -267,7 +275,7 @@
bytes_ret != sizeof(ioctl) )
{
__destroy_ucep( p_cep );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("UAL_CREATE_CEP IOCTL failed with
%d.\n", GetLastError()) );
return IB_ERROR;
}
@@ -275,7 +283,7 @@
if( ioctl.status != IB_SUCCESS )
{
__destroy_ucep( p_cep );
- AL_TRACE_EXIT( AL_DBG_ERROR, ("UAL_CREATE_CEP
IOCTL returned %s\n",
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("UAL_CREATE_CEP IOCTL returned %s\n",
ib_get_err_str( ioctl.status )) );
return ioctl.status;
}
@@ -300,7 +308,7 @@
NULL, 0, NULL, &p_cep->ov ) ||
GetLastError() != ERROR_IO_PENDING )
{
- AL_TRACE( AL_DBG_ERROR, ("Failed to issue CEP poll
IOCTL.\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("Failed to
issue CEP poll IOCTL.\n") );
cl_spinlock_acquire( &gp_cep_mgr->obj.lock );
cl_ptr_vector_set( &gp_cep_mgr->cep_vector, p_cep->cid,
NULL );
cl_spinlock_release( &gp_cep_mgr->obj.lock );
@@ -441,7 +449,7 @@
{
if( p_listen_info->cmp_len > IB_REQ_PDATA_SIZE )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("Listen compare data larger than REQ
private data.\n") );
return IB_INVALID_SETTING;
}
@@ -454,7 +462,7 @@
sizeof(ioctl), &status, sizeof(status), &bytes_ret, NULL
) ||
bytes_ret != sizeof(status) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("ual_cep_listen IOCTL failed with %d.\n",
GetLastError()) );
return IB_ERROR;
}
@@ -505,7 +513,7 @@
{
if( p_cm_req->req_length > IB_REQ_PDATA_SIZE )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("private data larger than REQ private
data.\n") );
return IB_INVALID_SETTING;
}
@@ -519,7 +527,7 @@
{
if( p_cm_req->compare_length > IB_REQ_PDATA_SIZE )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("REQ compare data larger than REQ
private data.\n") );
return IB_INVALID_SETTING;
}
@@ -532,7 +540,7 @@
sizeof(ioctl.in), &ioctl, sizeof(ioctl.out), &bytes_ret,
NULL ) ||
bytes_ret != sizeof(ioctl.out) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("UAL_CEP_PRE_REQ IOCTL failed with %d.\n",
GetLastError()) );
return IB_ERROR;
}
@@ -565,7 +573,7 @@
sizeof(cid), &status, sizeof(status), &bytes_ret, NULL )
||
bytes_ret != sizeof(status) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("UAL_CEP_SEND_REQ IOCTL failed with %d.\n",
GetLastError()) );
return IB_ERROR;
}
@@ -628,7 +636,7 @@
{
if( p_cm_rep->rep_length > IB_REP_PDATA_SIZE )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("private data larger than REP private
data.\n") );
return IB_INVALID_SETTING;
}
@@ -641,7 +649,7 @@
sizeof(ioctl.in), &ioctl, sizeof(ioctl.out), &bytes_ret,
NULL ) ||
bytes_ret != sizeof(ioctl.out) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("UAL_CEP_PRE_REQ IOCTL failed with %d.\n",
GetLastError()) );
return IB_ERROR;
}
@@ -674,7 +682,7 @@
sizeof(cid), &status, sizeof(status), &bytes_ret, NULL )
||
bytes_ret != sizeof(status) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("UAL_CEP_SEND_REP IOCTL failed with %d.\n",
GetLastError()) );
return IB_ERROR;
}
@@ -711,7 +719,7 @@
sizeof(cid), &ioctl, sizeof(ioctl), &bytes_ret, NULL )
||
bytes_ret != sizeof(ioctl) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("UAL_CEP_GET_RTR IOCTL failed with %d.\n",
GetLastError()) );
return IB_ERROR;
}
@@ -751,7 +759,7 @@
sizeof(cid), &ioctl, sizeof(ioctl), &bytes_ret, NULL )
||
bytes_ret != sizeof(ioctl) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("UAL_CEP_GET_RTS IOCTL failed with %d.\n",
GetLastError()) );
return IB_ERROR;
}
@@ -789,7 +797,7 @@
{
if( pdata_len > IB_RTU_PDATA_SIZE )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("private data larger than RTU private
data.\n") );
return IB_INVALID_SETTING;
}
@@ -802,7 +810,7 @@
sizeof(ioctl), &status, sizeof(status), &bytes_ret, NULL
) ||
bytes_ret != sizeof(status) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("UAL_CEP_RTU IOCTL failed with %d.\n",
GetLastError()) );
return IB_ERROR;
}
@@ -840,7 +848,7 @@
{
if( ari_len > IB_ARI_SIZE )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("private data larger than REJ ARI
data.\n") );
return IB_INVALID_SETTING;
}
@@ -857,7 +865,7 @@
{
if( pdata_len > IB_REJ_PDATA_SIZE )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("private data larger than REJ private
data.\n") );
return IB_INVALID_SETTING;
}
@@ -874,7 +882,7 @@
sizeof(ioctl), &status, sizeof(status), &bytes_ret, NULL
) ||
bytes_ret != sizeof(status) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("UAL_CEP_PRE_REQ IOCTL failed with %d.\n",
GetLastError()) );
return IB_ERROR;
}
@@ -915,7 +923,7 @@
{
if( p_cm_mra->mra_length > IB_MRA_PDATA_SIZE )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("private data larger than MRA private
data.\n") );
return IB_INVALID_SETTING;
}
@@ -928,7 +936,7 @@
sizeof(ioctl), &status, sizeof(status), &bytes_ret, NULL
) ||
bytes_ret != sizeof(status) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("UAL_CEP_MRA IOCTL failed with %d.\n",
GetLastError()) );
return IB_ERROR;
}
@@ -977,7 +985,7 @@
{
if( p_cm_lap->lap_length > IB_LAP_PDATA_SIZE )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("private data larger than LAP private
data.\n") );
return IB_INVALID_SETTING;
}
@@ -990,7 +998,7 @@
sizeof(ioctl), &status, sizeof(status), &bytes_ret, NULL
) ||
bytes_ret != sizeof(status) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("UAL_CEP_LAP IOCTL failed with %d.\n",
GetLastError()) );
return IB_ERROR;
}
@@ -1031,7 +1039,7 @@
{
if( p_cm_apr->info_length > IB_APR_INFO_SIZE )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("private data larger than APR info
data.\n") );
return IB_INVALID_SETTING;
}
@@ -1044,7 +1052,7 @@
{
if( p_cm_apr->apr_length > IB_REJ_PDATA_SIZE )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("private data larger than APR private
data.\n") );
return IB_INVALID_SETTING;
}
@@ -1057,7 +1065,7 @@
sizeof(ioctl.in), &ioctl.out, sizeof(ioctl.out),
&bytes_ret, NULL ) ||
bytes_ret != sizeof(ioctl.out) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("UAL_CEP_PRE_REQ IOCTL failed with %d.\n",
GetLastError()) );
return IB_ERROR;
}
@@ -1090,7 +1098,7 @@
sizeof(cid), &status, sizeof(status), &bytes_ret, NULL )
||
bytes_ret != sizeof(status) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("UAL_CEP_SEND_APR IOCTL failed with %d.\n",
GetLastError()) );
return IB_ERROR;
}
@@ -1125,7 +1133,7 @@
{
if( pdata_len > IB_DREQ_PDATA_SIZE )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("private data larger than DREQ private
data.\n") );
return IB_INVALID_SETTING;
}
@@ -1142,7 +1150,7 @@
sizeof(ioctl), &status, sizeof(status), &bytes_ret, NULL
) ||
bytes_ret != sizeof(status) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("UAL_CEP_DREQ IOCTL failed with %d.\n",
GetLastError()) );
return IB_ERROR;
}
@@ -1183,7 +1191,7 @@
{
if( p_cm_drep->drep_length > IB_DREP_PDATA_SIZE )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("private data larger than DREP private
data.\n") );
return IB_INVALID_SETTING;
}
@@ -1196,7 +1204,7 @@
sizeof(ioctl), &status, sizeof(status), &bytes_ret, NULL
) ||
bytes_ret != sizeof(status) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("UAL_CEP_DREP IOCTL failed with %d.\n",
GetLastError()) );
return IB_ERROR;
}
@@ -1233,7 +1241,7 @@
&ioctl, sizeof(ioctl), &bytes_ret, NULL ) ||
bytes_ret != sizeof(ioctl) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("UAL_CEP_DREP IOCTL failed with %d.\n",
GetLastError()) );
return IB_ERROR;
}
@@ -1303,7 +1311,7 @@
status = ib_get_mad( g_pool_key, MAD_BLOCK_SIZE, &p_mad );
if( status != IB_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("ib_get_mad returned %s.\n", ib_get_err_str(
status )) );
return status;
}
@@ -1316,7 +1324,7 @@
bytes_ret != sizeof(ioctl) )
{
ib_put_mad( p_mad );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("UAL_CEP_GET_RTS IOCTL failed with %d.\n",
GetLastError()) );
return IB_ERROR;
}
@@ -1396,14 +1404,14 @@
else if( GetLastError() != ERROR_INVALID_PARAMETER )
{
/* We can get ERROR_INVALID_PARAMETER if the CEP
was destroyed. */
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("DeviceIoControl for CEP callback
request returned %d.\n",
GetLastError()) );
}
}
else
{
- AL_TRACE( AL_DBG_WARN,
+ AL_PRINT(TRACE_LEVEL_WARNING ,AL_DBG_CM ,
("UAL_CEP_GET_EVENT IOCTL returned %d.\n",
error_code) );
}
Index: core/al/user/ual_cq.c
===================================================================
--- core/al/user/ual_cq.c (revision 1349)
+++ core/al/user/ual_cq.c (working copy)
@@ -37,6 +37,13 @@
#include "al_ci_ca.h"
#include "al_cq.h"
+#include "al_debug.h"
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "ual_cq.tmh"
+#endif
ib_api_status_t
@@ -79,7 +86,7 @@
if( cl_status != CL_SUCCESS || bytes_ret != sizeof(cq_ioctl.out)
)
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_CREATE_CQ IOCTL returned %s.\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
}
@@ -205,7 +212,7 @@
if( cl_status != CL_SUCCESS || bytes_ret != sizeof(cq_ioctl.out
) )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_DESTROY_CQ IOCTL returned %s.\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
@@ -261,7 +268,7 @@
if( cl_status != CL_SUCCESS || bytes_ret != sizeof(cq_ioctl.out)
)
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_MODIFY_CQ IOCTL returned %s.\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
@@ -327,7 +334,7 @@
if( cl_status != CL_SUCCESS || bytes_ret != sizeof(cq_ioctl.out)
)
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_QUERY_CQ IOCTL returned %s.\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
@@ -373,7 +380,7 @@
if( cl_status != CL_SUCCESS || bytes_ret != sizeof(cq_ioctl.out)
)
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("UAL_PEEK_CQ IOCTL returned %s.\n",
CL_STATUS_MSG(cl_status)) );
return IB_ERROR;
@@ -447,7 +454,7 @@
sizeof(ib_wc_t) + (sizeof(ib_wc_t) *
p_cq_ioctl->out.num_wc))) )
{
cl_free( p_cq_ioctl );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("UAL_POLL_CQ IOCTL returned %s.\n",
CL_STATUS_MSG(cl_status)) );
return IB_ERROR;
@@ -509,7 +516,7 @@
if( cl_status != CL_SUCCESS || bytes_ret != sizeof(cq_ioctl.out)
)
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("UAL_REARM_CQ IOCTL returned %s.\n",
CL_STATUS_MSG(cl_status)) );
return IB_ERROR;
@@ -543,7 +550,7 @@
if( cl_status != CL_SUCCESS || bytes_ret != sizeof(cq_ioctl.out)
)
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("UAL_REARM_N_CQ IOCTL returned %s.\n",
CL_STATUS_MSG(cl_status)) );
return IB_ERROR;
Index: core/al/user/ual_mad.c
===================================================================
--- core/al/user/ual_mad.c (revision 1349)
+++ core/al/user/ual_mad.c (working copy)
@@ -35,6 +35,14 @@
#include "al_av.h"
#include "al_common.h"
#include "al_debug.h"
+
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "ual_mad.tmh"
+#endif
+
#include "al_dev.h"
#include "al_qp.h"
#include "al_pd.h"
@@ -48,14 +56,14 @@
{
ib_mad_svc_handle_t h_mad_svc;
- CL_ENTER( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_SVC);
CL_ASSERT( p_obj );
h_mad_svc = PARENT_STRUCT( p_obj, al_mad_svc_t, obj );
/* Deregister the MAD service. */
ual_dereg_mad_svc( h_mad_svc );
- CL_EXIT( AL_DBG_MAD_SVC, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_SVC);
}
@@ -117,7 +125,7 @@
if( cl_status != CL_SUCCESS || bytes_ret !=
sizeof(ioctl_buf.out) )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_REG_MAD_SVC IOCTL returned %s.\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
@@ -152,7 +160,7 @@
cl_status_t cl_status;
ib_api_status_t status;
- CL_ENTER( AL_DBG_MAD, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD);
cl_memclr( &ioctl_buf, sizeof(ioctl_buf) );
@@ -167,11 +175,11 @@
if( status != IB_SUCCESS )
{
- CL_PRINT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Error deregistering MAD svc: %s\n",
ib_get_err_str( status ) ) );
}
- CL_EXIT( AL_DBG_MAD, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD);
return status;
}
@@ -223,7 +231,7 @@
if( cl_status != CL_SUCCESS || bytes_ret !=
sizeof(ioctl_buf.out) )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_MAD_SEND IOCTL returned %s.\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
@@ -300,7 +308,7 @@
if( cl_status != CL_SUCCESS || bytes_ret !=
sizeof(ioctl_buf.out) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("UAL_CANCEL_MAD IOCTL returned %s.\n",
CL_STATUS_MSG(cl_status)) );
return IB_ERROR;
@@ -337,7 +345,7 @@
if( cl_status != CL_SUCCESS || bytes_ret !=
sizeof(ioctl_buf.out) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("UAL_REG_MAD_POOL IOCTL returned %s.\n",
CL_STATUS_MSG(cl_status)) );
return IB_ERROR;
@@ -372,12 +380,13 @@
if( cl_status != CL_SUCCESS || bytes_ret !=
sizeof(ioctl_buf.out) )
{
- AL_TRACE( AL_DBG_ERROR,
- ("UAL_DEREG_MAD_POOL IOCTL returned %s.\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
+ ("UAL_DEREG_MAD_POOL IOCTL returned %s.\n",
+ CL_STATUS_MSG(cl_status)));
}
else if( ioctl_buf.out.status != IB_SUCCESS )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Error deregistering MAD pool: %s\n",
ib_get_err_str( ioctl_buf.out.status )) );
}
@@ -439,7 +448,7 @@
&bytes_ret );
if( cl_status != CL_SUCCESS || bytes_ret !=
sizeof(ioctl_buf.out) )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_MAD_RECV_COMP IOCTL returned %s.\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
@@ -494,7 +503,7 @@
if( cl_status != CL_SUCCESS || bytes_ret !=
sizeof(local_mad_ioctl.out) )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("UAL_LOCAL_MAD IOCTL returned %s\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
}
Index: core/al/user/ual_mad_pool.c
===================================================================
--- core/al/user/ual_mad_pool.c (revision 1349)
+++ core/al/user/ual_mad_pool.c (working copy)
@@ -33,8 +33,16 @@
#include "al_mad_pool.h"
#include "al_debug.h"
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "ual_mad_pool.tmh"
+#endif
+
+
/*
* Function prototypes.
*/
@@ -54,16 +62,16 @@
al_pool_key_t* p_pool_key;
ib_api_status_t status;
- CL_ENTER( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MAD_POOL);
if( AL_OBJ_INVALID_HANDLE( h_pool, AL_OBJ_TYPE_H_MAD_POOL ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_HANDLE\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_HANDLE\n") );
return IB_INVALID_HANDLE;
}
if( !pp_pool_key )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -85,7 +93,7 @@
{
__ual_free_pool_key( &p_pool_key->obj );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("init_al_obj failed with status %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -94,7 +102,7 @@
if( status != IB_SUCCESS )
{
p_pool_key->obj.pfn_destroy( &p_pool_key->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("attach_al_obj returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -106,7 +114,7 @@
/* Release the reference taken in init_al_obj. */
deref_al_obj( &p_pool_key->obj );
- CL_EXIT( AL_DBG_MAD_POOL, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MAD_POOL);
return IB_SUCCESS;
}
Index: core/al/user/ual_mcast.c
===================================================================
--- core/al/user/ual_mcast.c (revision 1349)
+++ core/al/user/ual_mcast.c (working copy)
@@ -36,6 +36,13 @@
#include "ual_support.h"
#include "ual_mcast.h"
+#include "al_debug.h"
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "ual_mcast.tmh"
+#endif
ib_api_status_t
ual_attach_mcast(
@@ -81,7 +88,7 @@
if( cl_status != CL_SUCCESS || bytes_ret !=
sizeof(ioctl_buf.out) )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_ATTACH_MCAST IOCTL returned %s.\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
@@ -145,7 +152,7 @@
if( cl_status != CL_SUCCESS || bytes_ret !=
sizeof(ioctl_buf.out) )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_DETACH_MCAST IOCTL returned %s.\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
Index: core/al/user/ual_mgr.c
===================================================================
--- core/al/user/ual_mgr.c (revision 1349)
+++ core/al/user/ual_mgr.c (working copy)
@@ -33,6 +33,14 @@
#include "ual_support.h"
#include "al_debug.h"
+
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "ual_mgr.tmh"
+#endif
+
#include "al_mgr.h"
#include "al_init.h"
#include "al_res_mgr.h"
@@ -79,7 +87,7 @@
__cleanup_ual_mgr(
IN al_obj_t
*p_obj )
{
- CL_ENTER( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MGR);
UNUSED_PARAM( p_obj );
@@ -123,7 +131,7 @@
if( !PostQueuedCompletionStatus(
gp_al_mgr->ual_mgr.h_cb_port,
0, 0, NULL ) )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR
,
("PostQueuedCompletionStatus
returned %d\n",
GetLastError()) );
}
@@ -164,7 +172,7 @@
NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL );
if( ioctl.h_file == INVALID_HANDLE_VALUE )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("CreateFile returned %d.\n", GetLastError()) );
return INVALID_HANDLE_VALUE;
}
@@ -174,7 +182,7 @@
ioctl.h_file, gp_al_mgr->ual_mgr.h_cb_port, type, 0 ) )
{
CloseHandle( ioctl.h_file );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("CreateIoCompletionPort for file of type %d
returned %d.\n",
type, GetLastError()) );
return INVALID_HANDLE_VALUE;
@@ -189,9 +197,9 @@
if( cl_status != CL_SUCCESS )
{
CloseHandle( ioctl.h_file );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("Bind IOCTL for type %d returned %s.\n",
- CL_STATUS_MSG(cl_status)) );
+ type,CL_STATUS_MSG(cl_status)) );
return INVALID_HANDLE_VALUE;
}
@@ -213,7 +221,7 @@
&gp_al_mgr->ual_mgr.cb_threads, cl_proc_count(), 0 );
if( cl_status != CL_SUCCESS )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("cl_ptr_vector_init returned %s.\n",
CL_STATUS_MSG( cl_status )) );
return IB_ERROR;
}
@@ -223,7 +231,7 @@
h_thread = CreateThread( NULL, 0, __cb_thread_routine,
NULL, 0, NULL );
if( !h_thread )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("CreateThread returned %d.\n",
GetLastError()) );
return IB_ERROR;
}
@@ -250,7 +258,7 @@
uintn_t bytes_ret;
ULONG ver;
- CL_ENTER( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MGR);
CL_ASSERT( !gp_al_mgr );
@@ -272,7 +280,7 @@
gp_al_mgr = cl_zalloc( sizeof( al_mgr_t ) );
if( !gp_al_mgr )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("Failed to cl_zalloc ual_mgr_t.\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -292,7 +300,7 @@
if( ib_status != IB_SUCCESS )
{
__free_ual_mgr( &gp_al_mgr->obj );
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("init_al_obj failed, status = 0x%x.\n",
ib_status) );
return ib_status;
}
@@ -303,7 +311,7 @@
if( !gp_al_mgr->ual_mgr.h_cb_port )
{
gp_al_mgr->obj.pfn_destroy( &gp_al_mgr->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("Failed to create I/O completion port.\n") );
return IB_ERROR;
}
@@ -313,7 +321,7 @@
if( ib_status != IB_SUCCESS )
{
gp_al_mgr->obj.pfn_destroy( &gp_al_mgr->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR, ("ual_create_cb_threads
failed.\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("ual_create_cb_threads failed.\n") );
return ib_status;
}
@@ -322,7 +330,7 @@
//if( gp_al_mgr->ual_mgr.h_cq_file == INVALID_HANDLE_VALUE )
//{
// gp_al_mgr->obj.pfn_destroy( &gp_al_mgr->obj, NULL );
- // AL_TRACE_EXIT( AL_DBG_ERROR,
+ // AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
// ("ual_create_async_file for UAL_BIND_CM returned
%d.\n",
// GetLastError()) );
// return IB_ERROR;
@@ -333,7 +341,7 @@
if( gp_al_mgr->ual_mgr.h_cq_file == INVALID_HANDLE_VALUE )
{
gp_al_mgr->obj.pfn_destroy( &gp_al_mgr->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("ual_create_async_file for UAL_BIND_CQ returned
%d.\n",
GetLastError()) );
return IB_ERROR;
@@ -344,7 +352,7 @@
if( gp_al_mgr->ual_mgr.h_misc_file == INVALID_HANDLE_VALUE )
{
gp_al_mgr->obj.pfn_destroy( &gp_al_mgr->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("ual_create_async_file for UAL_BIND_CQ returned
%d.\n",
GetLastError()) );
return IB_ERROR;
@@ -368,7 +376,7 @@
if ((ib_status = do_open_al(&gp_al_mgr->ual_mgr.h_al)) !=
IB_SUCCESS)
{
gp_al_mgr->obj.pfn_destroy(&gp_al_mgr->obj, NULL);
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("do_open_al() failed, status = 0x%x.\n",
ib_status) );
return ( ib_status );
}
@@ -378,7 +386,7 @@
if( ib_status != IB_SUCCESS )
{
gp_al_mgr->obj.pfn_destroy(&gp_al_mgr->obj, NULL);
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("ib_create_mad_pool failed with %s.\n",
ib_get_err_str(ib_status)) );
return ib_status;
}
@@ -391,7 +399,7 @@
if( ib_status != IB_SUCCESS )
{
gp_al_mgr->obj.pfn_destroy(&gp_al_mgr->obj, NULL);
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("ual_reg_global_mad_pool failed with %s.\n",
ib_get_err_str(ib_status)) );
return ib_status;
}
@@ -404,7 +412,7 @@
if( ib_status != IB_SUCCESS )
{
gp_al_mgr->obj.pfn_destroy(&gp_al_mgr->obj, NULL);
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("al_pnp_create failed with %s.\n",
ib_get_err_str(ib_status)) );
return ib_status;
}
@@ -414,7 +422,7 @@
if( ib_status != IB_SUCCESS )
{
gp_al_mgr->obj.pfn_destroy(&gp_al_mgr->obj, NULL);
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("create_res_mgr failed with %s.\n",
ib_get_err_str(ib_status)) );
return ib_status;
}
@@ -424,7 +432,7 @@
if( ib_status != IB_SUCCESS )
{
gp_al_mgr->obj.pfn_destroy(&gp_al_mgr->obj, NULL);
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("create_sa_req_mgr failed with %s.\n",
ib_get_err_str(ib_status)) );
return ib_status;
}
@@ -434,7 +442,7 @@
if( ib_status != IB_SUCCESS )
{
gp_al_mgr->obj.pfn_destroy( &gp_al_mgr->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("create_cm_mgr failed, status = 0x%x.\n",
ib_status) );
return ib_status;
}
@@ -454,7 +462,7 @@
{
if( GetLastError() != ERROR_IO_PENDING )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("DeviceIoControl for misc callback
request returned %d.\n",
GetLastError()) );
gp_al_mgr->obj.pfn_destroy(&gp_al_mgr->obj,
NULL);
@@ -469,7 +477,7 @@
//{
// if( GetLastError() != ERROR_IO_PENDING )
// {
- // AL_TRACE_EXIT( AL_DBG_ERROR,
+ // AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
// ("DeviceIoControl for CM callback
request returned %d.\n",
// GetLastError()) );
// gp_al_mgr->obj.pfn_destroy(&gp_al_mgr->obj,
NULL);
@@ -484,7 +492,7 @@
{
if( GetLastError() != ERROR_IO_PENDING )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("DeviceIoControl for CM callback
request returned %d.\n",
GetLastError()) );
gp_al_mgr->obj.pfn_destroy(&gp_al_mgr->obj,
NULL);
@@ -514,7 +522,7 @@
/* Release the reference taken in init_al_obj. */
deref_al_obj( &gp_al_mgr->obj );
- CL_EXIT( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MGR);
return IB_SUCCESS;
}
@@ -552,7 +560,7 @@
// {
// if( GetLastError() != ERROR_IO_PENDING )
// {
-// AL_TRACE_EXIT( AL_DBG_ERROR,
+// AL_PRINT_EXIT(TRACE_LEVEL_ERROR
,AL_DBG_ERROR,
// ("DeviceIoControl for CM
callback request returned %d.\n",
// GetLastError()) );
// }
@@ -734,7 +742,7 @@
{
if( GetLastError() != ERROR_IO_PENDING )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR
,AL_DBG_ERROR,
("DeviceIoControl for CM
callback request returned %d.\n",
GetLastError()) );
}
@@ -774,7 +782,7 @@
{
if( GetLastError() != ERROR_IO_PENDING )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR
,AL_DBG_ERROR,
("DeviceIoControl for misc
callback request returned %d.\n",
GetLastError()) );
}
@@ -897,7 +905,7 @@
&bytes_ret );
if( cl_status != CL_SUCCESS || bytes_ret !=
sizeof(ioctl_buf.out) )
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_MAD_RECV_COMP IOCTL returned
%s.\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
@@ -1107,11 +1115,11 @@
ib_al_handle_t h_al;
ib_api_status_t status;
- CL_ENTER( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_ENTER(AL_DBG_MGR);
if( !ph_al )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -1125,7 +1133,7 @@
if( status != IB_SUCCESS )
{
al_cleanup();
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("ual_init failed, status = %s\n",
ib_get_err_str(status) ) );
return status;
}
@@ -1140,7 +1148,7 @@
h_al = (ib_al_handle_t)cl_zalloc( sizeof( ib_al_t ) );
if( !h_al )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl, ("cl_malloc
failed\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("cl_malloc
failed\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -1165,7 +1173,7 @@
if( status != IB_SUCCESS )
{
free_al( &h_al->obj );
- CL_EXIT( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MGR);
return status;
}
attach_al_obj( &gp_al_mgr->obj, &h_al->obj );
@@ -1192,7 +1200,7 @@
/* Release the reference taken in init_al_obj. */
deref_al_obj( &h_al->obj );
- CL_EXIT( AL_DBG_MGR, g_al_dbg_lvl );
+ AL_EXIT(AL_DBG_MGR);
return IB_SUCCESS;
}
Index: core/al/user/ual_mr.c
===================================================================
--- core/al/user/ual_mr.c (revision 1349)
+++ core/al/user/ual_mr.c (working copy)
@@ -36,6 +36,14 @@
#include "al.h"
#include "ual_support.h"
#include "al_debug.h"
+
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "ual_mr.tmh"
+#endif
+
#include "al_mr.h"
#include "al_pd.h"
#include "al_res_mgr.h"
@@ -67,7 +75,7 @@
if( cl_status != CL_SUCCESS || bytes_ret != sizeof(mr_ioctl.out)
)
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("UAL_REG_MR IOCTL returned %s.\n",
CL_STATUS_MSG(cl_status)) );
return IB_ERROR;
@@ -106,7 +114,7 @@
if( cl_status != CL_SUCCESS || bytes_ret != sizeof(mr_ioctl.out)
)
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("UAL_DEREG_MR IOCTL returned %s.\n",
CL_STATUS_MSG(cl_status)) );
return IB_ERROR;
@@ -152,7 +160,7 @@
if( cl_status != CL_SUCCESS || bytes_ret != sizeof(mr_ioctl.out)
)
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("UAL_MODIFY_MR IOCTL returned %s.\n",
CL_STATUS_MSG(cl_status)) );
return IB_ERROR;
@@ -190,7 +198,7 @@
if( cl_status != CL_SUCCESS || bytes_ret != sizeof(mr_ioctl.out)
)
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("UAL_QUERY_MR IOCTL returned %s.\n",
CL_STATUS_MSG(cl_status)) );
return IB_ERROR;
@@ -235,7 +243,7 @@
if( cl_status != CL_SUCCESS || bytes_ret != sizeof(mr_ioctl.out)
)
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("UAL_REG_SHARED IOCTL returned %s.\n",
CL_STATUS_MSG(cl_status)) );
return IB_ERROR;
@@ -273,12 +281,12 @@
if( AL_OBJ_INVALID_HANDLE( h_pd, AL_OBJ_TYPE_H_PD ) )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PD_HANDLE\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_PD_HANDLE\n") );
return IB_INVALID_PD_HANDLE;
}
if( !p_mr_create || !p_vaddr || !p_lkey || !p_rkey || !ph_mr )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
("IB_INVALID_PARAMETER\n") );
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -286,7 +294,7 @@
h_mr = alloc_mr();
if( !h_mr )
{
- CL_TRACE_EXIT( AL_DBG_ERROR, g_al_dbg_lvl,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("unable to allocate memory handle\n")
);
return IB_INSUFFICIENT_MEMORY;
}
@@ -307,7 +315,7 @@
if( cl_status != CL_SUCCESS || bytes_ret != sizeof(mr_ioctl.out)
)
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_REG_SHMID IOCTL returned %s.\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
Index: core/al/user/ual_mw.c
===================================================================
--- core/al/user/ual_mw.c (revision 1349)
+++ core/al/user/ual_mw.c (working copy)
@@ -40,6 +40,14 @@
#include "al_mr.h"
+#include "al_debug.h"
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "ual_mw.tmh"
+#endif
+
ib_api_status_t
ual_create_mw(
IN const ib_pd_handle_t
h_pd,
@@ -77,7 +85,7 @@
if( cl_status != CL_SUCCESS || bytes_ret != sizeof(mw_ioctl.out)
)
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_CREATE_MW IOCTL returned %s.\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
@@ -141,7 +149,7 @@
if( cl_status != CL_SUCCESS || bytes_ret != sizeof(mw_ioctl.out)
)
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_DESTROY_MW IOCTL returned %s.\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
@@ -202,7 +210,7 @@
if( cl_status != CL_SUCCESS || bytes_ret != sizeof(mw_ioctl.out)
)
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_QUERY_MW IOCTL returned %s.\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
@@ -277,7 +285,7 @@
if( cl_status != CL_SUCCESS || bytes_ret != sizeof(mw_ioctl.out)
)
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_BIND_MW IOCTL returned %s.\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
Index: core/al/user/ual_pd.c
===================================================================
--- core/al/user/ual_pd.c (revision 1349)
+++ core/al/user/ual_pd.c (working copy)
@@ -37,6 +37,14 @@
#include "al_pd.h"
+#include "al_debug.h"
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "ual_pd.tmh"
+#endif
+
ib_api_status_t
ual_allocate_pd(
IN ib_ca_handle_t
h_ca,
@@ -79,7 +87,7 @@
if( cl_status != CL_SUCCESS || bytes_ret != sizeof(pd_ioctl.out)
)
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_ALLOC_PD IOCTL returned %s.\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
@@ -138,7 +146,7 @@
if( cl_status != CL_SUCCESS || bytes_ret != sizeof(pd_ioctl.out)
)
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_DEALLOC_PD IOCTL returned %s.\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
Index: core/al/user/ual_pnp.c
===================================================================
--- core/al/user/ual_pnp.c (revision 1349)
+++ core/al/user/ual_pnp.c (working copy)
@@ -37,6 +37,14 @@
#include "al.h"
#include "al_debug.h"
+
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "ual_pnp.tmh"
+#endif
+
#include "al_mgr.h"
#include "al_pnp.h"
#include "ib_common.h"
@@ -117,7 +125,7 @@
gp_pnp = (ual_pnp_mgr_t*)cl_zalloc( sizeof(ual_pnp_mgr_t) );
if( !gp_pnp )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("Failed to allocate PnP manager.\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -130,7 +138,7 @@
if( status != IB_SUCCESS )
{
__pnp_free( &gp_pnp->obj );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("init_al_obj() failed with status %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -138,7 +146,7 @@
if( status != IB_SUCCESS )
{
gp_pnp->obj.pfn_destroy( &gp_pnp->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("attach_al_obj returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -148,7 +156,7 @@
if( gp_pnp->h_file == INVALID_HANDLE_VALUE )
{
gp_pnp->obj.pfn_destroy( &gp_pnp->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("ual_create_async_file for UAL_BIND_PNP
returned %d.\n",
GetLastError()) );
return IB_ERROR;
@@ -159,7 +167,7 @@
if( gp_pnp->h_destroy_file == INVALID_HANDLE_VALUE )
{
gp_pnp->obj.pfn_destroy( &gp_pnp->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("ual_create_async_file for UAL_BIND_DESTROY
returned %d.\n",
GetLastError()) );
return IB_ERROR;
@@ -266,12 +274,12 @@
if( AL_OBJ_INVALID_HANDLE( h_al, AL_OBJ_TYPE_H_AL ) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("IB_INVALID_AL_HANDLE\n")
);
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_INVALID_AL_HANDLE\n") );
return IB_INVALID_AL_HANDLE;
}
if( !p_pnp_req || !ph_pnp )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("IB_INVALID_PARAMETER\n")
);
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_INVALID_PARAMETER\n") );
return IB_INVALID_PARAMETER;
}
@@ -279,8 +287,8 @@
p_reg = (al_pnp_t*)cl_zalloc( sizeof(al_pnp_t) );
if( !p_reg )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
- ("Failed to cl_zalloc al_pnp_t (%"PRIdSIZE_T"
bytes).\n",
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
+ ("Failed to cl_zalloc al_pnp_t (%I64d
bytes).\n",
sizeof(al_pnp_t)) );
return( IB_INSUFFICIENT_MEMORY );
}
@@ -294,7 +302,7 @@
if( status != IB_SUCCESS )
{
__pnp_reg_free( &p_reg->obj );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("init_al_obj() failed with status %s.\n",
ib_get_err_str(status)) );
return( status );
}
@@ -302,7 +310,7 @@
if( status != IB_SUCCESS )
{
p_reg->obj.pfn_destroy( &p_reg->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("attach_al_obj returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -323,7 +331,7 @@
if( !in.sync_event )
{
p_reg->obj.pfn_destroy( &p_reg->obj, NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("CreateEvent returned %d\n",
GetLastError()) );
return IB_ERROR;
}
@@ -371,7 +379,7 @@
if( AL_OBJ_INVALID_HANDLE( h_pnp, AL_OBJ_TYPE_H_PNP ) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("IB_INVALID_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_INVALID_HANDLE\n") );
return IB_INVALID_HANDLE;
}
@@ -392,12 +400,12 @@
if( AL_OBJ_INVALID_HANDLE( h_al, AL_OBJ_TYPE_H_AL ) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("IB_INVALID_AL_HANDLE\n")
);
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_INVALID_AL_HANDLE\n") );
return IB_INVALID_AL_HANDLE;
}
if( !h_event )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("IB_INVALID_HANDLE\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("IB_INVALID_HANDLE\n") );
return IB_INVALID_HANDLE;
}
@@ -548,7 +556,7 @@
return;
}
- AL_TRACE( AL_DBG_ERROR, ("IOCTL failed with error code
%d\n",
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR , ("IOCTL
failed with error code %d\n",
error_code) );
p_reg->rearm.evt_hdl = AL_INVALID_HANDLE;
p_reg->rearm.evt_size = 0;
Index: core/al/user/ual_qp.c
===================================================================
--- core/al/user/ual_qp.c (revision 1349)
+++ core/al/user/ual_qp.c (working copy)
@@ -41,6 +41,13 @@
#include "ual_support.h"
+#include "al_debug.h"
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "ual_qp.tmh"
+#endif
ib_api_status_t
ual_post_send(
IN const ib_qp_handle_t
h_qp,
@@ -93,7 +100,7 @@
p_qp_ioctl = (ual_post_send_ioctl_t*)cl_zalloc( ioctl_buf_sz );
if( !p_qp_ioctl )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("Failed to allocate IOCTL buffer.\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -121,7 +128,7 @@
{
if( pp_send_failure )
*pp_send_failure = p_send_wr;
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_POST_SEND IOCTL returned %s.\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
@@ -200,7 +207,7 @@
p_qp_ioctl = (ual_post_recv_ioctl_t*)cl_zalloc( ioctl_buf_sz );
if( !p_qp_ioctl )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("Failed to allocate IOCTL buffer.\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -229,7 +236,7 @@
if( pp_recv_failure )
*pp_recv_failure = p_recv_wr;
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_POST_RECV IOCTL returned %s.\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
@@ -314,7 +321,7 @@
if( cl_status != CL_SUCCESS || bytes_ret != sizeof(qp_ioctl.out)
)
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_CREATE_QP IOCTL returned %s.\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
@@ -403,7 +410,7 @@
if( cl_status != CL_SUCCESS || bytes_ret != sizeof(qp_ioctl.out)
)
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_DESTROY_QP IOCTL returned %s.\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
@@ -461,7 +468,7 @@
if( cl_status != CL_SUCCESS || bytes_ret != sizeof(qp_ioctl.out)
)
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_MODIFY_QP IOCTL returned %s.\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
@@ -527,7 +534,7 @@
if( cl_status != CL_SUCCESS || bytes_ret != sizeof(qp_ioctl.out)
)
{
- AL_TRACE( AL_DBG_ERROR,
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_QUERY_QP IOCTL returned %s.\n",
CL_STATUS_MSG(cl_status)) );
status = IB_ERROR;
@@ -609,7 +616,7 @@
if( cl_status != CL_SUCCESS || bytes_ret !=
sizeof(qp_ioctl.out) )
{
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("UAL_GET_SPL_QP_ALIAS IOCTL returned
%s.\n",
CL_STATUS_MSG(cl_status)) );
return IB_ERROR;
Index: core/al/user/ual_sa_req.c
===================================================================
--- core/al/user/ual_sa_req.c (revision 1349)
+++ core/al/user/ual_sa_req.c (working copy)
@@ -44,6 +44,14 @@
#include "al_ca.h"
#include "al_common.h"
#include "al_debug.h"
+
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "ual_sa_req.tmh"
+#endif
+
#include "al_mgr.h"
#include "al_query.h"
#include "ib_common.h"
@@ -97,7 +105,7 @@
gp_sa_req_mgr = cl_zalloc( sizeof( sa_req_mgr_t ) );
if( gp_sa_req_mgr == NULL )
{
- AL_TRACE_EXIT( AL_DBG_ERROR, ("cl_zalloc failed\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("cl_zalloc failed\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -111,14 +119,14 @@
if( status != IB_SUCCESS )
{
free_sa_req_mgr( &gp_sa_req_mgr->obj );
- AL_TRACE_EXIT( AL_DBG_ERROR, ("cl_spinlock_init
failed\n") );
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("cl_spinlock_init failed\n") );
return status;
}
status = attach_al_obj( p_parent_obj, &gp_sa_req_mgr->obj );
if( status != IB_SUCCESS )
{
gp_sa_req_mgr->obj.pfn_destroy( &gp_sa_req_mgr->obj,
NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("attach_al_obj returned %s.\n",
ib_get_err_str(status)) );
return status;
}
@@ -128,7 +136,7 @@
if( gp_sa_req_mgr->h_sa_dev == INVALID_HANDLE_VALUE )
{
gp_sa_req_mgr->obj.pfn_destroy( &gp_sa_req_mgr->obj,
NULL );
- AL_TRACE_EXIT( AL_DBG_ERROR,
+ AL_PRINT_EXIT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR,
("ual_create_async_file returned %d.\n",
GetLastError()) );
return IB_ERROR;
}
@@ -205,7 +213,7 @@
if( GetLastError() != ERROR_IO_PENDING )
{
status = p_sa_req->status;
- AL_TRACE( AL_DBG_ERROR, ("UAL_SEND_SA_REQ IOCTL
returned %s\n",
+ AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR ,
("UAL_SEND_SA_REQ IOCTL returned %s\n",
ib_get_err_str(status)) );
}
else
Index: core/al/user/ual_support.h
===================================================================
--- core/al/user/ual_support.h (revision 1349)
+++ core/al/user/ual_support.h (working copy)
@@ -44,6 +44,9 @@
#include <iba/ib_al_ioctl.h>
#include "al_dev.h"
#include "al_debug.h"
+
+
+
#include <strsafe.h>
@@ -116,11 +119,11 @@
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPSTR)&error, 0, NULL ) )
{
- AL_TRACE( dbg_lvl, ("%s (%d)\n", buffer, GetLastError())
);
+ //AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("%s
(%d)\n", buffer, GetLastError()) );
}
else
{
- AL_TRACE( dbg_lvl, ("%s (%s)\n", buffer, error) );
+ //AL_PRINT(TRACE_LEVEL_ERROR ,AL_DBG_ERROR, ("%s
(%s)\n", buffer, error) );
LocalFree( error );
}
}
Index: core/bus/kernel/bus_driver.c
===================================================================
--- core/bus/kernel/bus_driver.c (revision 1349)
+++ core/bus/kernel/bus_driver.c (working copy)
@@ -43,6 +43,14 @@
#include <complib/cl_init.h>
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "bus_driver.tmh"
+#endif
+
+
#define DEFAULT_NODE_DESC "OpenIB Windows(r) Host"
@@ -129,7 +137,7 @@
UNICODE_STRING hostNameW;
ANSI_STRING hostName;
- AL_ENTER( AL_DBG_DEV );
+ BUS_ENTER( BUS_DBG_DRV );
/* Get the host name. */
RtlInitUnicodeString( &hostNamePath,
L"ComputerName\\ComputerName" );
@@ -164,13 +172,13 @@
}
else
{
- AL_TRACE( AL_DBG_ERROR, ("Failed to get host name.\n")
);
+ BUS_TRACE(BUS_DBG_ERROR , ("Failed to get host name.\n")
);
/* Use the default name... */
RtlStringCbCopyNA( node_desc, sizeof(node_desc),
DEFAULT_NODE_DESC, sizeof(DEFAULT_NODE_DESC) );
}
- AL_EXIT( AL_DBG_DEV );
+ BUS_ENTER( BUS_DBG_DRV );
}
@@ -180,7 +188,7 @@
{
NTSTATUS status;
/* Remember the terminating entry in the table below. */
- RTL_QUERY_REGISTRY_TABLE table[8];
+ RTL_QUERY_REGISTRY_TABLE table[9];
UNICODE_STRING param_path;
BUS_ENTER( BUS_DBG_DRV );
@@ -223,40 +231,48 @@
table[1].DefaultLength = sizeof(ULONG);
table[2].Flags = RTL_QUERY_REGISTRY_DIRECT;
- table[2].Name = L"IbalDebugFlags";
- table[2].EntryContext = &g_al_dbg_lvl;
+ table[2].Name = L"IbalDebugLevel";
+ table[2].EntryContext = &g_al_dbg_level;
table[2].DefaultType = REG_DWORD;
- table[2].DefaultData = &g_al_dbg_lvl;
+ table[2].DefaultData = &g_al_dbg_level;
table[2].DefaultLength = sizeof(ULONG);
table[3].Flags = RTL_QUERY_REGISTRY_DIRECT;
- table[3].Name = L"SmiPollInterval";
- table[3].EntryContext = &g_smi_poll_interval;
+ table[3].Name = L"IbalDebugFlags";
+ table[3].EntryContext = &g_al_dbg_flags;
table[3].DefaultType = REG_DWORD;
- table[3].DefaultData = &g_smi_poll_interval;
+ table[3].DefaultData = &g_al_dbg_flags;
table[3].DefaultLength = sizeof(ULONG);
+
table[4].Flags = RTL_QUERY_REGISTRY_DIRECT;
- table[4].Name = L"IocQueryTimeout";
- table[4].EntryContext = &g_ioc_query_timeout;
+ table[4].Name = L"SmiPollInterval";
+ table[4].EntryContext = &g_smi_poll_interval;
table[4].DefaultType = REG_DWORD;
- table[4].DefaultData = &g_ioc_query_timeout;
+ table[4].DefaultData = &g_smi_poll_interval;
table[4].DefaultLength = sizeof(ULONG);
table[5].Flags = RTL_QUERY_REGISTRY_DIRECT;
- table[5].Name = L"IocQueryRetries";
- table[5].EntryContext = &g_ioc_query_retries;
+ table[5].Name = L"IocQueryTimeout";
+ table[5].EntryContext = &g_ioc_query_timeout;
table[5].DefaultType = REG_DWORD;
- table[5].DefaultData = &g_ioc_query_retries;
+ table[5].DefaultData = &g_ioc_query_timeout;
table[5].DefaultLength = sizeof(ULONG);
table[6].Flags = RTL_QUERY_REGISTRY_DIRECT;
- table[6].Name = L"IocPollInterval";
- table[6].EntryContext = &g_ioc_poll_interval;
+ table[6].Name = L"IocQueryRetries";
+ table[6].EntryContext = &g_ioc_query_retries;
table[6].DefaultType = REG_DWORD;
- table[6].DefaultData = &g_ioc_poll_interval;
+ table[6].DefaultData = &g_ioc_query_retries;
table[6].DefaultLength = sizeof(ULONG);
+ table[7].Flags = RTL_QUERY_REGISTRY_DIRECT;
+ table[7].Name = L"IocPollInterval";
+ table[7].EntryContext = &g_ioc_poll_interval;
+ table[7].DefaultType = REG_DWORD;
+ table[7].DefaultData = &g_ioc_poll_interval;
+ table[7].DefaultLength = sizeof(ULONG);
+
/* Have at it! */
status = RtlQueryRegistryValues( RTL_REGISTRY_ABSOLUTE,
param_path.Buffer, table, NULL, NULL );
@@ -431,7 +447,12 @@
CL_DEINIT;
+#if defined(EVENT_TRACING)
+ WPP_CLEANUP(p_driver_obj);
+#endif
+
BUS_EXIT( BUS_DBG_DRV );
+
}
@@ -444,6 +465,10 @@
BUS_ENTER( BUS_DBG_DRV );
+#if defined(EVENT_TRACING)
+ WPP_INIT_TRACING(p_driver_obj ,p_registry_path);
+#endif
+
status = CL_INIT;
if( !NT_SUCCESS(status) )
{
Index: core/bus/kernel/bus_driver.h
===================================================================
--- core/bus/kernel/bus_driver.h (revision 1349)
+++ core/bus/kernel/bus_driver.h (working copy)
@@ -56,6 +56,7 @@
#include <ntstrsafe.h>
+
/*
* Main header for IB Bus driver.
*/
@@ -82,6 +83,9 @@
#define BUS_DBG_PORT (1 << 3)
#define BUS_DBG_IOU (1 << 4)
+
+
+
/*
* ALLOC_PRAGMA sections:
* PAGE
Index: core/bus/kernel/ib_bus.inf
===================================================================
--- core/bus/kernel/ib_bus.inf (revision 1349)
+++ core/bus/kernel/ib_bus.inf (working copy)
@@ -164,6 +164,7 @@
[Ibbus.ParamsReg]
HKR,"Parameters","DebugFlags",%REG_DWORD%,0x80000000
HKR,"Parameters","ReportPortNIC",%REG_DWORD%,1
+HKR,"Parameters","IbalDebugLevel",%REG_DWORD%,0x80000000
HKR,"Parameters","IbalDebugFlags",%REG_DWORD%,0x80000000
HKR,"Parameters","SmiPollInterval",%REG_DWORD_NO_CLOBBER%,20000
HKR,"Parameters","IocQueryTimeout",%REG_DWORD_NO_CLOBBER%,250
Index: core/bus/kernel/SOURCES
===================================================================
--- core/bus/kernel/SOURCES (revision 1349)
+++ core/bus/kernel/SOURCES (working copy)
@@ -2,6 +2,14 @@
TARGETPATH=..\..\..\bin\kernel\obj$(BUILD_ALT_DIR)
TARGETTYPE=DRIVER
+
+!if $(FREEBUILD)
+ENABLE_EVENT_TRACING=1
+!else
+#ENABLE_EVENT_TRACING=1
+!endif
+
+
SOURCES= ibbus.rc \
bus_driver.c \
bus_pnp.c \
@@ -24,4 +32,13 @@
TARGETLIBS= $(TARGETLIBS) $(DDK_LIB_PATH)\ntstrsafe.lib
!endif
+!IFDEF ENABLE_EVENT_TRACING
+
+C_DEFINES = $(C_DEFINES) -DEVENT_TRACING
+
+RUN_WPP = $(SOURCES) -km -ext: .c .h .C .H
+
+!ENDIF
+
+
MSC_WARNING_LEVEL= /W4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: al_wpp.patch
Type: application/octet-stream
Size: 571379 bytes
Desc: al_wpp.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20060521/79219f36/attachment.obj>
More information about the ofw
mailing list