[Openib-windows] [PATCH] WPP support for IPoIB
Yossi Leybovich
sleybo at mellanox.co.il
Tue May 2 00:22:13 PDT 2006
Fab
This patch add WPP support to IPoIB
To activate WPP all you need is to define ENABLE_EVENT_TRACING in the
SOURCE file ( this flag is set in fre version )
In chk version we are back to the regular debug prints.
few changes:
1. WPP (and also the new debug prints) use level and flags
Level defines in <evntrace.h>
Flags are the same as we use before.( INIT,SEND,RECV)
I add the entries to the inf file so chk version and fre version
have the same semantic of level flags.
2.I kept all the flags (fix few that were misplaced)
I add flag for error prints (DBG_ALL) which is set when the former
code did not use any bit.
so
IPOIB_TRACE_EXIT(IPOIB_DBG_ERROR......
move to
IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR,IPOIB_DBG_ALL,.....)
3. IPOIB_ENTER/EXIT define in different macros.
In case of performance problem they can be eliminate. I test it
little bit and did not see any performance hit.
I tested the patch both in fre and chk version and its work well.
pls try and and apply
I hope it will help us to dig out the next races in IPoIB
10x
Yossi
Singed-off-by: Yossi Leybovich (sleybo at mellanox.co.il)
Index: ulp/ipoib/kernel/ipoib_adapter.c
===================================================================
--- ulp/ipoib/kernel/ipoib_adapter.c (revision 1307)
+++ ulp/ipoib/kernel/ipoib_adapter.c (working copy)
@@ -35,8 +35,13 @@
#include "ipoib_port.h"
#include "ipoib_driver.h"
#include "ipoib_debug.h"
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "ipoib_adapter.tmh"
+#endif
-
#define ITEM_POOL_START 16
#define ITEM_POOL_GROW 16
@@ -131,7 +136,7 @@
p_adapter = cl_zalloc( sizeof(ipoib_adapter_t) );
if( !p_adapter )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Failed to allocate ipoib_adapter_t (%d bytes)",
sizeof(ipoib_adapter_t)) );
return IB_INSUFFICIENT_MEMORY;
@@ -145,8 +150,8 @@
if( !p_adapter->p_ifc )
{
__adapter_free( &p_adapter->obj );
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
- ("ipoib_create_adapter failed to alloc ipoib_ifc_t % bytes\n",
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
+ ("ipoib_create_adapter failed to alloc ipoib_ifc_t %d bytes\n",
sizeof(ib_al_ifc_t)) );
return IB_INSUFFICIENT_MEMORY;
}
@@ -156,12 +161,12 @@
if( status != NDIS_STATUS_SUCCESS )
{
__adapter_free( &p_adapter->obj );
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("ipoib_get_adapter_guids returned 0x%.8X.\n", status) );
return status;
}
- IPOIB_TRACE( IPOIB_DBG_INIT | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION , IPOIB_DBG_INIT ,
("Port %016I64x (CA %016I64x port %d) initializing\n",
p_adapter->guids.port_guid, p_adapter->guids.ca_guid,
p_adapter->guids.port_num) );
@@ -172,7 +177,7 @@
if( status != NDIS_STATUS_SUCCESS )
{
__adapter_free( &p_adapter->obj );
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("ipoib_get_adapter_params returned 0x%.8x.\n", status) );
return status;
}
@@ -182,7 +187,7 @@
if( cl_status != CL_SUCCESS )
{
__adapter_free( &p_adapter->obj );
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("cl_obj_init returned %s\n", cl_status_text[cl_status]) );
return IB_ERROR;
}
@@ -191,7 +196,7 @@
if( status != IB_SUCCESS )
{
cl_obj_destroy( &p_adapter->obj );
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("adapter_init returned %s.\n",
p_adapter->p_ifc->get_err_str( status )) );
return status;
@@ -287,7 +292,7 @@
cl_status = cl_perf_init( &p_adapter->perf, MaxPerf );
if( cl_status != CL_SUCCESS )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("cl_perf_init returned %s\n", cl_status_text[cl_status]) );
return IB_ERROR;
}
@@ -295,7 +300,7 @@
cl_status = cl_spinlock_init( &p_adapter->send_stat_lock );
if( cl_status != CL_SUCCESS )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("cl_spinlock_init returned %s\n", cl_status_text[cl_status]) );
return IB_ERROR;
}
@@ -303,7 +308,7 @@
cl_status = cl_spinlock_init( &p_adapter->recv_stat_lock );
if( cl_status != CL_SUCCESS )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("cl_spinlock_init returned %s\n", cl_status_text[cl_status]) );
return IB_ERROR;
}
@@ -312,7 +317,7 @@
ITEM_POOL_GROW, sizeof(cl_pool_obj_t), NULL, NULL, NULL );
if( cl_status != CL_SUCCESS )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("cl_qpool_init returned %s\n", cl_status_text[cl_status]) );
return IB_ERROR;
}
@@ -323,7 +328,7 @@
0, sizeof(net_address_item_t), NULL, NULL, p_adapter );
if( cl_status != CL_SUCCESS )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("cl_vector_init for ip_vector returned %s\n",
CL_STATUS_MSG(cl_status)) );
return IB_ERROR;
@@ -334,7 +339,7 @@
ipoib_mac_from_guid( p_adapter->guids.port_guid, &p_adapter->mac );
if( status != IB_SUCCESS )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("ipoib_mac_from_guid returned %s\n",
p_adapter->p_ifc->get_err_str( status )) );
return status;
@@ -344,7 +349,7 @@
status = p_adapter->p_ifc->open_al( &p_adapter->h_al );
if( status != IB_SUCCESS )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("ib_open_al returned %s\n",
p_adapter->p_ifc->get_err_str( status )) );
return status;
@@ -383,7 +388,7 @@
if( status != IB_SUCCESS )
{
p_adapter->registering = FALSE;
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("ib_reg_pnp returned %s\n",
p_adapter->p_ifc->get_err_str( status )) );
return status;
@@ -500,12 +505,12 @@
if( old_state == IB_PNP_PORT_REMOVE )
{
KeReleaseMutex( &p_adapter->mutex, FALSE );
- IPOIB_TRACE_EXIT( IPOIB_DBG_PNP,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_INFORMATION ,IPOIB_DBG_PNP ,
("Aborting - Adapter destroying.\n") );
return IB_NOT_DONE;
}
- IPOIB_TRACE( IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION , IPOIB_DBG_PNP ,
("p_pnp_rec->pnp_event = 0x%x\n",p_pnp_rec->pnp_event));
p_port_rec = (ib_pnp_port_rec_t*)p_pnp_rec;
@@ -599,7 +604,7 @@
NDIS_STATUS_MEDIA_DISCONNECT, NULL, 0 );
NdisMIndicateStatusComplete( p_adapter->h_adapter );
- IPOIB_TRACE( IPOIB_DBG_INFO, ("Link DOWN!\n") );
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION , IPOIB_DBG_INIT , ("Link
DOWN!\n") );
ipoib_port_down( p_adapter->p_port );
}
@@ -633,7 +638,7 @@
break;
default:
- IPOIB_TRACE( IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION , IPOIB_DBG_INIT ,
("IPOIB: Received unhandled PnP event 0x%x\n",
p_pnp_rec->pnp_event) );
/* Fall through. */
@@ -671,7 +676,7 @@
NDIS_STATUS_MEDIA_DISCONNECT, NULL, 0 );
NdisMIndicateStatusComplete( p_adapter->h_adapter );
- IPOIB_TRACE( IPOIB_DBG_INFO, ("Link DOWN!\n") );
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION , IPOIB_DBG_INIT , ("Link
DOWN!\n") );
ipoib_port_down( p_adapter->p_port );
/* Fall through. */
@@ -836,7 +841,7 @@
if( status != IB_SUCCESS )
{
p_adapter->reset = FALSE;
- IPOIB_TRACE( IPOIB_DBG_ERROR,
+ IPOIB_PRINT( TRACE_LEVEL_ERROR,IPOIB_DBG_INIT ,
("__ipoib_pnp_reg returned %s\n",
p_adapter->p_ifc->get_err_str( status )) );
NdisMResetComplete(
@@ -873,25 +878,25 @@
switch( link_speed )
{
case IB_LINK_SPEED_ACTIVE_2_5:
- IPOIB_TRACE( IPOIB_DBG_INIT | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION , IPOIB_DBG_INIT ,
("Link speed is 2.5Gs\n") );
p_adapter->rate = IB_LINK_SPEED_ACTIVE_2_5;
break;
case IB_LINK_SPEED_ACTIVE_5:
- IPOIB_TRACE( IPOIB_DBG_INIT | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION , IPOIB_DBG_INIT ,
("Link speed is 5G\n") );
p_adapter->rate = IB_LINK_SPEED_ACTIVE_5;
break;
case IB_LINK_SPEED_ACTIVE_10:
- IPOIB_TRACE( IPOIB_DBG_INIT | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION , IPOIB_DBG_INIT ,
("Link speed is 10G\n") );
p_adapter->rate = IB_LINK_SPEED_ACTIVE_10;
break;
default:
- IPOIB_TRACE( IPOIB_DBG_ERROR,
+ IPOIB_PRINT( TRACE_LEVEL_ERROR,IPOIB_DBG_INIT ,
("Invalid link speed %d.\n", link_speed) );
p_adapter->rate = 0;
}
@@ -899,25 +904,25 @@
switch( link_width )
{
case IB_LINK_WIDTH_ACTIVE_1X:
- IPOIB_TRACE( IPOIB_DBG_INIT | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION , IPOIB_DBG_INIT ,
("Link width is 1X\n") );
p_adapter->rate *= ONE_X_IN_100BPS;
break;
case IB_LINK_WIDTH_ACTIVE_4X:
- IPOIB_TRACE( IPOIB_DBG_INIT | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION , IPOIB_DBG_INIT ,
("Link width is 4X\n") );
p_adapter->rate *= FOUR_X_IN_100BPS;
break;
case IB_LINK_WIDTH_ACTIVE_12X:
- IPOIB_TRACE( IPOIB_DBG_INIT | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION , IPOIB_DBG_INIT ,
("Link width is 12X\n") );
p_adapter->rate *= TWELVE_X_IN_100BPS;
break;
default:
- IPOIB_TRACE( IPOIB_DBG_ERROR,
+ IPOIB_PRINT( TRACE_LEVEL_ERROR,IPOIB_DBG_INIT ,
("Invalid link rate (%d).\n", link_width) );
p_adapter->rate = 0;
}
@@ -975,7 +980,7 @@
* Now that we're in the broadcast group, notify that
* we have a link.
*/
- IPOIB_TRACE( IPOIB_DBG_INFO, ("Link UP!\n") );
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION , IPOIB_DBG_INIT , ("Link
UP!\n") );
NdisWriteErrorLogEntry( p_adapter->h_adapter,
EVENT_IPOIB_PORT_UP + (p_adapter->rate/ONE_X_IN_100BPS),
1, p_adapter->rate );
Index: ulp/ipoib/kernel/ipoib_debug.h
===================================================================
--- ulp/ipoib/kernel/ipoib_debug.h (revision 1307)
+++ ulp/ipoib/kernel/ipoib_debug.h (working copy)
@@ -34,19 +34,62 @@
#define _IPOIB_DEBUG_H_
-#include <complib/cl_debug.h>
+//#include <complib/cl_debug.h>
+//#include <stdio.h>
-
/* Object types for passing into complib. */
#define IPOIB_OBJ_INSTANCE 1
#define IPOIB_OBJ_PORT 2
#define IPOIB_OBJ_ENDPOINT 3
+extern uint32_t g_ipoib_dbg_level;
+extern uint32_t g_ipoib_dbg_flags;
+
+#if defined(EVENT_TRACING)
+//
+// Software Tracing Definitions
+//
+#define WPP_CONTROL_GUIDS \
+ WPP_DEFINE_CONTROL_GUID(IPOIBCtlGuid,(3F9BC73D, EB03, 453a, B27B,
20F9A664211A), \
+ WPP_DEFINE_BIT( IPOIB_DBG_ALL) \
+ WPP_DEFINE_BIT( IPOIB_DBG_INIT) \
+ WPP_DEFINE_BIT( IPOIB_DBG_PNP) \
+ WPP_DEFINE_BIT( IPOIB_DBG_SEND) \
+ WPP_DEFINE_BIT( IPOIB_DBG_RECV) \
+ WPP_DEFINE_BIT( IPOIB_DBG_ENDPT) \
+ WPP_DEFINE_BIT( IPOIB_DBG_IB) \
+ WPP_DEFINE_BIT( IPOIB_DBG_BUF) \
+ WPP_DEFINE_BIT( IPOIB_DBG_MCAST) \
+ WPP_DEFINE_BIT( IPOIB_DBG_ALLOC) \
+ WPP_DEFINE_BIT( IPOIB_DBG_OID)\
+ WPP_DEFINE_BIT( IPOIB_DBG_IOCTL)\
+ WPP_DEFINE_BIT( IPOIB_DBG_STAT))
+
+
+
+#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
+// IPOIB_ENTER(FLAG);
+// IPOIB_EXIT(FLAG);
+// USEPREFIX(IPOIB_PRINT, "%!STDPREFIX!%!FUNC!() :");
+// USEPREFIX(IPOIB_PRINT_EXIT, "%!STDPREFIX!%!FUNC!() :");
+// USESUFFIX(IPOIB_PRINT_EXIT, "\n %!FUNC!():<===");
+// USESUFFIX(IPOIB_ENTER, " %!FUNC!():===>");
+// USESUFFIX(IPOIB_EXIT, " %!FUNC!():<===");
+// end_wpp
+
+#else
+
+#include <evntrace.h>
+
/*
* Debug macros
*/
-extern uint32_t g_ipoib_dbg_lvl;
#define IPOIB_DBG_INIT (1 << 0)
@@ -61,42 +104,72 @@
#define IPOIB_DBG_OID (1 << 9)
#define IPOIB_DBG_IOCTL (1 << 10)
#define IPOIB_DBG_STAT (1 << 11)
+#define IPOIB_DBG_ALL (1 << 31)
-#define IPOIB_DBG_FUNC (1 << 28) /* For function entry/exit */
-#define IPOIB_DBG_INFO (1 << 29) /* For verbose information */
-#define IPOIB_DBG_WARN (1 << 30) /* For warnings. */
-#define IPOIB_DBG_ERROR CL_DBG_ERROR
-#define IPOIB_DBG_ALL CL_DBG_ALL
-/* Enter and exit macros automatically add IPOIB_DBG_FUNC bit */
-#define IPOIB_ENTER( lvl ) \
- CL_ENTER( (lvl | IPOIB_DBG_FUNC), g_ipoib_dbg_lvl )
-#define IPOIB_EXIT( lvl ) \
- CL_EXIT( (lvl | IPOIB_DBG_FUNC), g_ipoib_dbg_lvl )
-#define IPOIB_TRACE( lvl, msg ) \
- CL_TRACE( (lvl), g_ipoib_dbg_lvl, msg )
-#define IPOIB_TRACE_EXIT( lvl, msg ) \
- CL_TRACE_EXIT( (lvl), g_ipoib_dbg_lvl, msg )
+#if DBG
+// assignment of _level_ is need to to overcome warning C4127
+#define IPOIB_PRINT(_level_,_flag_,_msg_) \
+ { \
+ int __lvl = _level_; \
+ if (g_ipoib_dbg_level >= (_level_) && \
+ (g_ipoib_dbg_flags & (_flag_))) { \
+ DbgPrint ("[IPOIB] %s() :", __FUNCTION__); \
+ if(__lvl == TRACE_LEVEL_ERROR) DbgPrint ("***ERROR*** "); \
+ DbgPrint _msg_; \
+ } \
+ }
+
+#define IPOIB_PRINT_EXIT(_level_,_flag_,_msg_) \
+ {\
+ IPOIB_PRINT(_level_,_flag_,_msg_) ;\
+ IPOIB_EXIT(_flag_);\
+ }
+
+
+#define IPOIB_ENTER(_flag_)\
+ IPOIB_PRINT(TRACE_LEVEL_VERBOSE, _flag_,("===>\n"));
+
+#define IPOIB_EXIT(_flag_)\
+ IPOIB_PRINT(TRACE_LEVEL_VERBOSE, _flag_, ("<===\n" ));
+
#define IPOIB_TRACE_BYTES( lvl, ptr, len ) \
- { \
- size_t _loop_; \
- for (_loop_ = 0; _loop_ < (len); ++_loop_) \
- { \
- CL_PRINT( (lvl), g_ipoib_dbg_lvl, ("0x%.2X ",
((uint8_t*)(ptr))[_loop_])); \
- if ((_loop_ + 1)% 16 == 0) \
- { \
- CL_PRINT( (lvl), g_ipoib_dbg_lvl, ("\n") ); \
- } \
- else if ((_loop_ % 4 + 1) == 0) \
- { \
- CL_PRINT( (lvl), g_ipoib_dbg_lvl, (" ") ); \
- } \
- } \
- CL_PRINT( (lvl), g_ipoib_dbg_lvl, ("\n") ); \
+ {\
+ if (g_ipoib_dbg_level >= (_level_) && \
+ (g_ipoib_dbg_flags & (_flag_))) { \
+ size_t _loop_; \
+ for (_loop_ = 0; _loop_ < (len); ++_loop_) \
+ { \
+ DbgPrint ("0x%.2X ", ((uint8_t*)(ptr))[_loop_]); \
+ if ((_loop_ + 1)% 16 == 0) \
+ { \
+ DbgPrint("\n"); \
+ } \
+ else if ((_loop_ % 4 + 1) == 0) \
+ { \
+ DbgPrint(" "); \
+ } \
+ } \
+ DbgPrint("\n"); \
+ }\
}
+#else
+#define IPOIB_PRINT(lvl ,flags, msg)
+
+#define IPOIB_PRINT_EXIT(_level_,_flag_,_msg_)
+
+#define IPOIB_ENTER(_flag_)
+
+#define IPOIB_EXIT(_flag_)
+
+#endif
+
+#endif //EVENT_TRACING
+
+
enum ipoib_perf_counters
{
SendBundle,
Index: ulp/ipoib/kernel/ipoib_driver.c
===================================================================
--- ulp/ipoib/kernel/ipoib_driver.c (revision 1307)
+++ ulp/ipoib/kernel/ipoib_driver.c (working copy)
@@ -32,6 +32,12 @@
#include "ipoib_driver.h"
#include "ipoib_debug.h"
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "ipoib_driver.tmh"
+#endif
#include "ipoib_port.h"
#include "ipoib_ibat.h"
#include <complib/cl_bus_ifc.h>
@@ -118,7 +124,8 @@
/* Global driver debug level */
-uint32_t g_ipoib_dbg_lvl = IPOIB_DBG_ERROR;
+uint32_t g_ipoib_dbg_level = TRACE_LEVEL_ERROR;
+uint32_t g_ipoib_dbg_flags = 0xffff;
ipoib_globals_t g_ipoib = {0};
@@ -248,11 +255,13 @@
#ifdef _DEBUG_
PAGED_CODE();
#endif
-
+#if defined(EVENT_TRACING)
+ WPP_INIT_TRACING(p_drv_obj, p_registry_path);
+#endif
status = CL_INIT;
if( !NT_SUCCESS( status ) )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("cl_init failed.\n") );
return status;
}
@@ -290,7 +299,7 @@
g_ipoib.h_ndis_wrapper, &characteristics, sizeof(characteristics) );
if( status != NDIS_STATUS_SUCCESS )
{
- IPOIB_TRACE( IPOIB_DBG_ERROR,
+ IPOIB_PRINT( TRACE_LEVEL_ERROR,IPOIB_DBG_INIT ,
("NdisMRegisterMiniport failed with status of %d\n", status) );
NdisTerminateWrapper( g_ipoib.h_ndis_wrapper, NULL );
CL_DEINIT;
@@ -310,18 +319,17 @@
{
NTSTATUS status;
/* Remember the terminating entry in the table below. */
- RTL_QUERY_REGISTRY_TABLE table[2];
+ RTL_QUERY_REGISTRY_TABLE table[3];
UNICODE_STRING param_path;
IPOIB_ENTER( IPOIB_DBG_INIT );
-
RtlInitUnicodeString( ¶m_path, NULL );
param_path.MaximumLength = p_registry_path->Length +
sizeof(L"\\Parameters");
param_path.Buffer = cl_zalloc( param_path.MaximumLength );
if( !param_path.Buffer )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Failed to allocate parameters path buffer.\n") );
return STATUS_INSUFFICIENT_RESOURCES;
}
@@ -337,16 +345,30 @@
/* Setup the table entries. */
table[0].Flags = RTL_QUERY_REGISTRY_DIRECT;
- table[0].Name = L"DebugFlags";
- table[0].EntryContext = &g_ipoib_dbg_lvl;
+ table[0].Name = L"DebugLevel";
+ table[0].EntryContext = &g_ipoib_dbg_level;
table[0].DefaultType = REG_DWORD;
- table[0].DefaultData = &g_ipoib_dbg_lvl;
+ table[0].DefaultData = &g_ipoib_dbg_level;
table[0].DefaultLength = sizeof(ULONG);
+ table[1].Flags = RTL_QUERY_REGISTRY_DIRECT;
+ table[1].Name = L"DebugFlags";
+ table[1].EntryContext = &g_ipoib_dbg_flags;
+ table[1].DefaultType = REG_DWORD;
+ table[1].DefaultData = &g_ipoib_dbg_flags;
+ table[1].DefaultLength = sizeof(ULONG);
+
+
+
/* Have at it! */
status = RtlQueryRegistryValues( RTL_REGISTRY_ABSOLUTE,
param_path.Buffer, table, NULL, NULL );
+ IPOIB_PRINT( TRACE_LEVEL_ERROR, IPOIB_DBG_INIT,
+ ("debug level %d debug flags 0x%.8x\n",
+ g_ipoib_dbg_level ,
+ g_ipoib_dbg_flags));
+
cl_free( param_path.Buffer );
IPOIB_EXIT( IPOIB_DBG_INIT );
return status;
@@ -358,6 +380,10 @@
IN PDRIVER_OBJECT p_drv_obj )
{
IPOIB_ENTER( IPOIB_DBG_INIT );
+ #if defined(EVENT_TRACING)
+ WPP_CLEANUP(p_drv_obj);
+ #endif
+
UNREFERENCED_PARAMETER( p_drv_obj );
CL_DEINIT;
IPOIB_EXIT( IPOIB_DBG_INIT );
@@ -379,7 +405,7 @@
NdisOpenConfiguration( &status, &h_config, wrapper_config_context );
if( status != NDIS_STATUS_SUCCESS )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("NdisOpenConfiguration returned 0x%.8x\n", status) );
return status;
}
@@ -390,7 +416,7 @@
&status, &p_param, h_config, &keyword, NdisParameterInteger );
if( status != NDIS_STATUS_SUCCESS )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Receive Queue Depth parameter missing.\n") );
return status;
}
@@ -402,7 +428,7 @@
&status, &p_param, h_config, &keyword, NdisParameterInteger );
if( status != NDIS_STATUS_SUCCESS )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Send Queue Depth parameter missing.\n") );
return status;
}
@@ -423,7 +449,7 @@
&status, &p_param, h_config, &keyword, NdisParameterInteger );
if( status != NDIS_STATUS_SUCCESS )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Send Checksum Offload parameter missing.\n") );
return status;
}
@@ -453,7 +479,7 @@
&status, &p_param, h_config, &keyword, NdisParameterInteger );
if( status != NDIS_STATUS_SUCCESS )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("SA query timeout parameter missing.\n") );
return status;
}
@@ -465,7 +491,7 @@
&status, &p_param, h_config, &keyword, NdisParameterInteger );
if( status != NDIS_STATUS_SUCCESS )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("SA query retry count parameter missing.\n") );
return status;
}
@@ -477,7 +503,7 @@
&status, &p_param, h_config, &keyword, NdisParameterInteger );
if( status != NDIS_STATUS_SUCCESS )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Receive pool to queue depth ratio parameter missing.\n") );
return status;
}
@@ -538,7 +564,7 @@
NULL, 0, NULL, &event, &io_status );
if( !p_irp )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Failed to allocate query interface IRP.\n") );
return STATUS_INSUFFICIENT_RESOURCES;
}
@@ -561,7 +587,7 @@
if( !NT_SUCCESS( status ) )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Query interface for IPOIB interface returned %08x.\n", status) );
return status;
}
@@ -627,7 +653,7 @@
if( medium_index == medium_array_size ) /* Never found it */
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR, ("No supported media.\n") );
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL , ("No supported
media.\n") );
return NDIS_STATUS_UNSUPPORTED_MEDIA;
}
@@ -637,7 +663,7 @@
ib_status = ipoib_create_adapter( wrapper_config_context, h_adapter,
&p_adapter );
if( ib_status != IB_SUCCESS )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("ipoib_create_adapter returned status %d.\n", ib_status ) );
return NDIS_STATUS_FAILURE;
}
@@ -654,7 +680,7 @@
if( status != NDIS_STATUS_SUCCESS )
{
ipoib_destroy_adapter( p_adapter );
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("NdisMInitializeScatterGatherDma returned 0x%.8x.\n", status) );
return status;
}
@@ -667,7 +693,7 @@
NdisWriteErrorLogEntry( h_adapter,
NDIS_ERROR_CODE_HARDWARE_FAILURE, 0 );
ipoib_destroy_adapter( p_adapter );
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("ipoib_start_adapter returned status %d.\n", ib_status ) );
return NDIS_STATUS_FAILURE;
}
@@ -697,7 +723,7 @@
CL_ASSERT( adapter_context );
p_adapter = (ipoib_adapter_t*)adapter_context;
- IPOIB_TRACE( IPOIB_DBG_INIT | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION , IPOIB_DBG_INIT ,
("Port %016I64x (CA %016I64x port %d) halting\n",
p_adapter->guids.port_guid, p_adapter->guids.ca_guid,
p_adapter->guids.port_num) );
@@ -791,32 +817,32 @@
{
/* Required General */
case OID_GEN_SUPPORTED_LIST:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID,
("Port %d received query for OID_GEN_SUPPORTED_LIST\n", port_num) );
src_buf = (PVOID)SUPPORTED_OIDS;
buf_len = sizeof(SUPPORTED_OIDS);
break;
case OID_GEN_HARDWARE_STATUS:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID,
("Port %d received query for OID_GEN_HARDWARE_STATUS\n", port_num)
);
cl_obj_lock( &p_adapter->obj );
switch( p_adapter->state )
{
case IB_PNP_PORT_ADD:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d returning NdisHardwareStatusInitializing\n", port_num) );
info = NdisHardwareStatusInitializing;
break;
case IB_PNP_PORT_ACTIVE:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d returning NdisHardwareStatusReady\n", port_num) );
info = NdisHardwareStatusReady;
break;
default:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d returning NdisHardwareStatusNotReady\n", port_num) );
info = NdisHardwareStatusNotReady;
}
@@ -825,20 +851,20 @@
case OID_GEN_MEDIA_SUPPORTED:
case OID_GEN_MEDIA_IN_USE:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received query for OID_GEN_MEDIA_SUPPORTED "
"or OID_GEN_MEDIA_IN_USE\n", port_num) );
info = NdisMedium802_3;
break;
case OID_GEN_MAXIMUM_FRAME_SIZE:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received query for OID_GEN_MAXIMUM_FRAME_SIZE\n",
port_num) );
info = PAYLOAD_MTU;
break;
case OID_GEN_LINK_SPEED:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received query for OID_GEN_LINK_SPEED\n", port_num) );
cl_obj_lock( &p_adapter->obj );
switch( p_adapter->state )
@@ -850,13 +876,13 @@
/* Save the request parameters. */
p_adapter->query_oid = oid_info;
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d returning NDIS_STATUS_PENDING\n", port_num) );
status = NDIS_STATUS_PENDING;
break;
case IB_PNP_PORT_REMOVE:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d returning NDIS_STATUS_NOT_ACCEPTED\n", port_num) );
status = NDIS_STATUS_NOT_ACCEPTED;
break;
@@ -870,13 +896,13 @@
break;
case OID_GEN_TRANSMIT_BUFFER_SPACE:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received query for OID_GEN_TRANSMIT_BUFFER_SPACE\n",
port_num) );
info = p_adapter->params.sq_depth * XFER_BLOCK_SIZE;
break;
case OID_GEN_RECEIVE_BUFFER_SPACE:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received query for OID_GEN_TRANSMIT_BUFFER_SPACE "
"or OID_GEN_RECEIVE_BUFFER_SPACE\n", port_num) );
info = p_adapter->params.rq_depth * XFER_BLOCK_SIZE;
@@ -887,7 +913,7 @@
case OID_GEN_TRANSMIT_BLOCK_SIZE:
case OID_GEN_RECEIVE_BLOCK_SIZE:
case OID_GEN_MAXIMUM_TOTAL_SIZE:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received query for OID_GEN_MAXIMUM_LOOKAHEAD "
"or OID_GEN_CURRENT_LOOKAHEAD or "
"OID_GEN_TRANSMIT_BLOCK_SIZE or "
@@ -897,21 +923,21 @@
break;
case OID_GEN_VENDOR_ID:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received query for OID_GEN_VENDOR_ID\n", port_num) );
src_buf = (void*)VENDOR_ID;
buf_len = sizeof(VENDOR_ID);
break;
case OID_GEN_VENDOR_DESCRIPTION:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received query for OID_GEN_VENDOR_DESCRIPTION\n",
port_num) );
src_buf = VENDOR_DESCRIPTION;
buf_len = sizeof(VENDOR_DESCRIPTION);
break;
case OID_GEN_VENDOR_DRIVER_VERSION:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received query for OID_GEN_VENDOR_DRIVER_VERSION\n",
port_num) );
src_buf = &version;
buf_len = sizeof(version);
@@ -920,19 +946,19 @@
break;
case OID_GEN_PHYSICAL_MEDIUM:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received query for OID_GEN_PHYSICAL_MEDIUM\n", port_num)
);
info = NdisPhysicalMediumUnspecified;
break;
case OID_GEN_CURRENT_PACKET_FILTER:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received query for OID_GEN_CURRENT_PACKET_FILTER\n",
port_num) );
info = p_adapter->packet_filter;
break;
case OID_GEN_DRIVER_VERSION:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received query for OID_GEN_DRIVER_VERSION\n", port_num) );
src_buf = &version;
buf_len = sizeof(version);
@@ -940,7 +966,7 @@
break;
case OID_GEN_MAC_OPTIONS:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received query for OID_GEN_MAC_OPTIONS\n", port_num) );
info = NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA |
NDIS_MAC_OPTION_TRANSFERS_NOT_PEND |
@@ -954,7 +980,7 @@
break;
case OID_GEN_MEDIA_CONNECT_STATUS:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received query for OID_GEN_MEDIA_CONNECT_STATUS\n",
port_num) );
cl_obj_lock( &p_adapter->obj );
switch( p_adapter->state )
@@ -968,25 +994,25 @@
p_adapter->pending_query = TRUE;
p_adapter->query_oid = oid_info;
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d returning NDIS_STATUS_PENDING\n", port_num) );
status = NDIS_STATUS_PENDING;
break;
case IB_PNP_PORT_ACTIVE:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d returning NdisMediaStateConnected\n", port_num) );
info = NdisMediaStateConnected;
break;
case IB_PNP_PORT_REMOVE:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d returning NDIS_STATUS_NOT_ACCEPTED\n", port_num) );
status = NDIS_STATUS_NOT_ACCEPTED;
break;
default:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d returning NdisMediaStateDisconnected\n", port_num) );
info = NdisMediaStateDisconnected;
}
@@ -994,126 +1020,126 @@
break;
case OID_GEN_MAXIMUM_SEND_PACKETS:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received query for OID_GEN_MAXIMUM_SEND_PACKETS\n",
port_num) );
info = MAXULONG;
break;
/* Required General Statistics */
case OID_GEN_XMIT_OK:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received query for OID_GEN_XMIT_OK\n", port_num) );
src_buf = NULL;
status = ipoib_get_send_stat( p_adapter, IP_STAT_SUCCESS, &oid_info
);
break;
case OID_GEN_RCV_OK:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received query for OID_GEN_RCV_OK\n", port_num) );
src_buf = NULL;
status = ipoib_get_recv_stat( p_adapter, IP_STAT_SUCCESS, &oid_info
);
break;
case OID_GEN_XMIT_ERROR:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received query for OID_GEN_XMIT_ERROR\n", port_num) );
src_buf = NULL;
status = ipoib_get_send_stat( p_adapter, IP_STAT_ERROR, &oid_info );
break;
case OID_GEN_RCV_ERROR:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received query for OID_GEN_RCV_ERROR\n", port_num) );
src_buf = NULL;
status = ipoib_get_recv_stat( p_adapter, IP_STAT_ERROR, &oid_info );
break;
case OID_GEN_RCV_NO_BUFFER:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received query for OID_GEN_RCV_NO_BUFFER\n", port_num) );
src_buf = NULL;
status = ipoib_get_recv_stat( p_adapter, IP_STAT_DROPPED, &oid_info
);
break;
case OID_GEN_DIRECTED_BYTES_XMIT:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received query for OID_GEN_DIRECTED_BYTES_XMIT\n",
port_num) );
src_buf = NULL;
status = ipoib_get_send_stat( p_adapter, IP_STAT_UCAST_BYTES,
&oid_info );
break;
case OID_GEN_DIRECTED_FRAMES_XMIT:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received query for OID_GEN_DIRECTED_FRAMES_XMIT\n",
port_num) );
src_buf = NULL;
status = ipoib_get_send_stat( p_adapter, IP_STAT_UCAST_FRAMES,
&oid_info );
break;
case OID_GEN_MULTICAST_BYTES_XMIT:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received query for OID_GEN_MULTICAST_BYTES_XMIT\n",
port_num) );
src_buf = NULL;
status = ipoib_get_send_stat( p_adapter, IP_STAT_MCAST_BYTES,
&oid_info );
break;
case OID_GEN_MULTICAST_FRAMES_XMIT:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received query for OID_GEN_MULTICAST_FRAMES_XMIT\n",
port_num) );
src_buf = NULL;
status = ipoib_get_send_stat( p_adapter, IP_STAT_MCAST_FRAMES,
&oid_info );
break;
case OID_GEN_BROADCAST_BYTES_XMIT:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received query for OID_GEN_BROADCAST_BYTES_XMIT\n",
port_num) );
src_buf = NULL;
status = ipoib_get_send_stat( p_adapter, IP_STAT_BCAST_BYTES,
&oid_info );
break;
case OID_GEN_BROADCAST_FRAMES_XMIT:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received query for OID_GEN_BROADCAST_FRAMES_XMIT\n",
port_num) );
src_buf = NULL;
status = ipoib_get_send_stat( p_adapter, IP_STAT_BCAST_FRAMES,
&oid_info );
break;
case OID_GEN_DIRECTED_BYTES_RCV:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received query for OID_GEN_DIRECTED_BYTES_RCV\n",
port_num) );
src_buf = NULL;
status = ipoib_get_recv_stat( p_adapter, IP_STAT_UCAST_BYTES,
&oid_info );
break;
case OID_GEN_DIRECTED_FRAMES_RCV:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received query for OID_GEN_DIRECTED_FRAMES_RCV\n",
port_num) );
src_buf = NULL;
status = ipoib_get_recv_stat( p_adapter, IP_STAT_UCAST_FRAMES,
&oid_info );
break;
case OID_GEN_MULTICAST_BYTES_RCV:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received query for OID_GEN_MULTICAST_BYTES_RCV\n",
port_num) );
src_buf = NULL;
status = ipoib_get_recv_stat( p_adapter, IP_STAT_MCAST_BYTES,
&oid_info );
break;
case OID_GEN_MULTICAST_FRAMES_RCV:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received query for OID_GEN_MULTICAST_FRAMES_RCV\n",
port_num) );
src_buf = NULL;
status = ipoib_get_recv_stat( p_adapter, IP_STAT_MCAST_FRAMES,
&oid_info );
break;
case OID_GEN_BROADCAST_BYTES_RCV:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received query for OID_GEN_BROADCAST_BYTES_RCV\n",
port_num) );
src_buf = NULL;
status = ipoib_get_recv_stat( p_adapter, IP_STAT_BCAST_BYTES,
&oid_info );
break;
case OID_GEN_BROADCAST_FRAMES_RCV:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received query for OID_GEN_BROADCAST_FRAMES_RCV\n",
port_num) );
src_buf = NULL;
status = ipoib_get_recv_stat( p_adapter, IP_STAT_BCAST_FRAMES,
&oid_info );
@@ -1125,12 +1151,12 @@
#if defined( _DEBUG_ )
if( oid == OID_802_3_PERMANENT_ADDRESS )
{
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received query for OID_802_3_PERMANENT_ADDRESS\n",
port_num) );
}
else
{
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received query for OID_802_3_CURRENT_ADDRESS\n",
port_num) );
}
#endif /* defined( _DEBUG_ )*/
@@ -1139,20 +1165,20 @@
break;
case OID_802_3_MULTICAST_LIST:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received query for OID_802_3_MULTICAST_LIST\n", port_num)
);
src_buf = p_adapter->mcast_array;
buf_len = p_adapter->mcast_array_size * sizeof(mac_addr_t);
break;
case OID_802_3_MAXIMUM_LIST_SIZE:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received query for OID_802_3_MAXIMUM_LIST_SIZE\n",
port_num) );
info = MAX_MCAST;
break;
case OID_802_3_MAC_OPTIONS:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received query for OID_802_3_MAC_OPTIONS\n", port_num) );
info = 0;
break;
@@ -1161,7 +1187,7 @@
case OID_802_3_RCV_ERROR_ALIGNMENT:
case OID_802_3_XMIT_ONE_COLLISION:
case OID_802_3_XMIT_MORE_COLLISIONS:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received query for OID_802_3_RCV_ERROR_ALIGNMENT or "
"OID_802_3_XMIT_ONE_COLLISION or "
"OID_802_3_XMIT_MORE_COLLISIONS\n", port_num) );
@@ -1193,7 +1219,7 @@
case OID_802_3_XMIT_LATE_COLLISIONS:
case OID_PNP_CAPABILITIES:
status = NDIS_STATUS_NOT_SUPPORTED;
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received an unsupported oid of 0x%.8X!\n", port_num, oid)
);
break;
@@ -1206,7 +1232,7 @@
#endif
default:
status = NDIS_STATUS_INVALID_OID;
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received an invalid oid of 0x%.8X!\n", port_num, oid) );
break;
}
@@ -1246,7 +1272,7 @@
{
if( p_oid_info->buf_len < buf_len )
{
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Insufficient buffer space. "
"Returning NDIS_STATUS_INVALID_LENGTH.\n") );
oid_status = NDIS_STATUS_INVALID_LENGTH;
@@ -1264,7 +1290,7 @@
}
else
{
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Returning NDIS_NOT_ACCEPTED") );
oid_status = NDIS_STATUS_NOT_ACCEPTED;
}
@@ -1292,7 +1318,7 @@
NDIS_TASK_TCP_IP_CHECKSUM *p_offload_chksum;
ULONG buf_len;
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received query for OID_TCP_TASK_OFFLOAD\n",
p_adapter->guids.port_num) );
@@ -1372,7 +1398,7 @@
NDIS_TASK_OFFLOAD *p_offload_task;
NDIS_TASK_TCP_IP_CHECKSUM *p_offload_chksum;
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received set for OID_TCP_TASK_OFFLOAD\n",
p_adapter->guids.port_num) );
@@ -1522,7 +1548,7 @@
{
/* Required General */
case OID_GEN_CURRENT_PACKET_FILTER:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received set for OID_GEN_CURRENT_PACKET_FILTER\n",
port_num));
if( info_buf_len < sizeof(p_adapter->packet_filter) )
{
@@ -1584,14 +1610,14 @@
break;
case OID_GEN_CURRENT_LOOKAHEAD:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received set for OID_GEN_CURRENT_LOOKAHEAD\n", port_num));
if( info_buf_len < buf_len )
status = NDIS_STATUS_INVALID_LENGTH;
break;
case OID_GEN_PROTOCOL_OPTIONS:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received set for OID_GEN_PROTOCOL_OPTIONS\n", port_num));
if( info_buf_len < buf_len )
status = NDIS_STATUS_INVALID_LENGTH;
@@ -1603,31 +1629,31 @@
#ifdef NDIS51_MINIPORT
case OID_GEN_MACHINE_NAME:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION ,IPOIB_DBG_OID ,
("Port %d received set for OID_GEN_MACHINE_NAME\n", port_num) );
break;
#endif
/* Required Ethernet operational characteristics */
case OID_802_3_MULTICAST_LIST:
- IPOIB_TRACE( IPOIB_DBG_OID,
+ IPOIB_PRINT(TRACE_LEVEL_INFORMATION ,IPOIB_DBG_OID,
("Port %d received set for OID_802_3_MULTICAST_LIST\n", port_num) );
if( info_buf_len > MAX_MCAST * sizeof(mac_addr_t) )
{
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d OID_802_3_MULTICAST_LIST - Multicast list full.\n",
port_num) );
status = NDIS_STATUS_MULTICAST_FULL;
*p_bytes_needed = MAX_MCAST * sizeof(mac_addr_t);
}
else if( info_buf_len % sizeof(mac_addr_t) )
{
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d OID_802_3_MULTICAST_LIST - Invalid input buffer.\n",
port_num) );
status = NDIS_STATUS_INVALID_DATA;
}
else if( !info_buf && info_buf_len )
{
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d OID_802_3_MULTICAST_LIST - Invalid input buffer.\n",
port_num) );
status = NDIS_STATUS_INVALID_DATA;
}
@@ -1648,7 +1674,7 @@
break;
case OID_TCP_TASK_OFFLOAD:
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received set for OID_TCP_TASK_OFFLOAD\n", port_num) );
buf_len = info_buf_len;
@@ -1663,7 +1689,7 @@
case OID_GEN_VLAN_ID:
#endif
status = NDIS_STATUS_NOT_SUPPORTED;
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received an unsupported oid of 0x%.8X!\n", port_num,
oid));
break;
@@ -1690,7 +1716,7 @@
case OID_GEN_PHYSICAL_MEDIUM:
default:
status = NDIS_STATUS_INVALID_OID;
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received an invalid oid of 0x%.8X!\n", port_num, oid));
break;
}
@@ -1792,7 +1818,7 @@
p_adapter = (ipoib_adapter_t*)adapter_context;
- IPOIB_TRACE( IPOIB_DBG_PNP, ("Event %d\n", pnp_event) );
+ IPOIB_PRINT(TRACE_LEVEL_INFORMATION ,IPOIB_DBG_PNP, ("Event %d\n",
pnp_event) );
if( pnp_event != NdisDevicePnPEventPowerProfileChanged )
{
cl_obj_lock( &p_adapter->obj );
@@ -1976,13 +2002,13 @@
status = NDIS_STATUS_SUCCESS;
port_num = p_adapter->guids.port_num;
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d received set for OID_GEN_NETWORK_LAYER_ADDRESSES\n",
port_num) );
if( !info_buf )
{
- IPOIB_TRACE( IPOIB_DBG_ERROR,
+ IPOIB_PRINT( TRACE_LEVEL_ERROR,IPOIB_DBG_INIT ,
("Port %d - OID_GEN_NETWORK_LAYER_ADDRESSES - "
"NULL buffer\n", port_num) );
IPOIB_EXIT( IPOIB_DBG_OID );
@@ -1995,7 +2021,7 @@
*/
if( info_buf_len < FIELD_OFFSET(NETWORK_ADDRESS_LIST, Address) )
{
- IPOIB_TRACE( IPOIB_DBG_ERROR,
+ IPOIB_PRINT( TRACE_LEVEL_ERROR,IPOIB_DBG_INIT ,
("Port %d OID_GEN_NETWORK_LAYER_ADDRESSES - "
"bad length of %d, not enough "
"for NETWORK_ADDRESS_LIST (%d)\n", port_num, info_buf_len,
@@ -2010,13 +2036,13 @@
{
if( p_net_addrs->AddressType == NDIS_PROTOCOL_ID_TCP_IP )
{
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION ,IPOIB_DBG_OID ,
("Port %d OID_GEN_NETWORK_LAYER_ADDRESSES - "
"clear TCP/IP addresses\n", port_num) );
}
else
{
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION ,IPOIB_DBG_OID ,
("Port %d OID_GEN_NETWORK_LAYER_ADDRESSES - "
"Non TCP/IP address type of 0x%.4X on clear\n",
port_num, p_net_addrs->AddressType) );
@@ -2032,7 +2058,7 @@
if( info_buf_len < total_size )
{
- IPOIB_TRACE( IPOIB_DBG_ERROR,
+ IPOIB_PRINT( TRACE_LEVEL_ERROR ,IPOIB_DBG_OID ,
("Port %d OID_GEN_NETWORK_LAYER_ADDRESSES - "
"bad length of %d, %d required for %d addresses\n",
port_num, info_buf_len, total_size, p_net_addrs->AddressCount) );
@@ -2050,9 +2076,9 @@
if( cl_status != CL_SUCCESS )
{
cl_obj_unlock( &p_adapter->obj );
- IPOIB_TRACE( IPOIB_DBG_ERROR,
+ IPOIB_PRINT(TRACE_LEVEL_ERROR ,IPOIB_DBG_OID ,
("Port %d - OID_GEN_NETWORK_LAYER_ADDRESSES - "
- "Failed to set IP vector capacity: %s\n",
+ "Failed to set IP vector capacity: %s\n", port_num,
CL_STATUS_MSG(cl_status)) );
IPOIB_EXIT( IPOIB_DBG_OID );
return NDIS_STATUS_RESOURCES;
@@ -2060,7 +2086,7 @@
*p_bytes_read = total_size;
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d OID_GEN_NETWORK_LAYER_ADDRESSES - List contains %d
addresses\n",
port_num, p_net_addrs->AddressCount));
@@ -2079,7 +2105,7 @@
if( p_net_addr_oid->AddressType != NDIS_PROTOCOL_ID_TCP_IP )
{
- IPOIB_TRACE( IPOIB_DBG_WARN,
+ IPOIB_PRINT( TRACE_LEVEL_WARNING ,IPOIB_DBG_OID ,
("Port %d OID_GEN_NETWORK_LAYER_ADDRESSES - Address %d is wrong
type of 0x%.4X, "
"should be 0x%.4X\n", port_num, i, p_net_addr_oid->AddressType,
NDIS_PROTOCOL_ID_TCP_IP));
@@ -2088,7 +2114,7 @@
if( p_net_addr_oid->AddressLength != NETWORK_ADDRESS_LENGTH_IP)
{
- IPOIB_TRACE( IPOIB_DBG_WARN,
+ IPOIB_PRINT( TRACE_LEVEL_WARNING ,IPOIB_DBG_OID ,
("Port %d OID_GEN_NETWORK_LAYER_ADDRESSES - Address %d is wrong
size of %d, "
"should be %d\n", port_num, i, p_net_addr_oid->AddressLength,
NETWORK_ADDRESS_LENGTH_IP));
@@ -2106,7 +2132,7 @@
if( i == p_net_addrs->AddressCount )
{
/* Didn't find a match, delete from SA */
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d OID_GEN_NETWORK_LAYER_ADDRESSES - Deleting Address
%d.%d.%d.%d\n",
port_num,
p_addr_item->address.as_bytes[0],
@@ -2141,7 +2167,7 @@
if( p_net_addr_oid->AddressType != NDIS_PROTOCOL_ID_TCP_IP )
{
- IPOIB_TRACE( IPOIB_DBG_WARN,
+ IPOIB_PRINT(TRACE_LEVEL_INFORMATION ,IPOIB_DBG_OID,
("Port %d OID_GEN_NETWORK_LAYER_ADDRESSES - Address %d is wrong
type of 0x%.4X, "
"should be 0x%.4X\n", port_num, i, p_net_addr_oid->AddressType,
NDIS_PROTOCOL_ID_TCP_IP));
@@ -2150,7 +2176,7 @@
if( p_net_addr_oid->AddressLength != NETWORK_ADDRESS_LENGTH_IP)
{
- IPOIB_TRACE( IPOIB_DBG_WARN,
+ IPOIB_PRINT(TRACE_LEVEL_INFORMATION , IPOIB_DBG_OID,
("Port %d OID_GEN_NETWORK_LAYER_ADDRESSES - Address %d is wrong
size of %d, "
"should be %d\n", port_num, i, p_net_addr_oid->AddressLength,
NETWORK_ADDRESS_LENGTH_IP));
@@ -2191,7 +2217,7 @@
p_addr_item->p_reg = NULL;
}
memcpy ((void *)&p_addr_item->address.as_ulong, (const void
*)&p_ip_addr->in_addr, sizeof(ULONG) );
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d OID_GEN_NETWORK_LAYER_ADDRESSES - Adding Address
%d.%d.%d.%d\n",
port_num,
p_addr_item->address.as_bytes[0],
@@ -2325,7 +2351,7 @@
if( ib_status == IB_INVALID_GUID )
{
/* If this occurs, we log the error but do not fail the OID yet */
- IPOIB_TRACE( IPOIB_DBG_WARN,
+ IPOIB_PRINT( TRACE_LEVEL_WARNINIG ,IPOIB_DBG_OID ,
("Port %d OID_GEN_NETWORK_LAYER_ADDRESSES - "
"Failed to register IP Address "
"of %d.%d.%d.%d with error IB_INVALID_GUID\n",
@@ -2338,7 +2364,7 @@
else
{
/* Fatal error. */
- IPOIB_TRACE( IPOIB_DBG_ERROR,
+ IPOIB_PRINT( TRACE_LEVEL_ERROR,IPOIB_DBG_OID ,
("Port %d OID_GEN_NETWORK_LAYER_ADDRESSES - Failed to register IP
Address "
"of %d.%d.%d.%d with error %s\n",
port_num,
@@ -2414,7 +2440,7 @@
if( p_reg_svc_rec->req_status == IB_SUCCESS &&
!p_reg_svc_rec->resp_status )
{
- IPOIB_TRACE( IPOIB_DBG_OID | IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID ,
("Port %d OID_GEN_NETWORK_LAYER_ADDRESSES - Registered IP Address
"
"of %d.%d.%d.%d\n",
port_num,
@@ -2425,7 +2451,7 @@
}
else if( p_reg_svc_rec->req_status != IB_CANCELED )
{
- IPOIB_TRACE( IPOIB_DBG_ERROR,
+ IPOIB_PRINT( TRACE_LEVEL_ERROR ,IPOIB_DBG_OID ,
("Port %d OID_GEN_NETWORK_LAYER_ADDRESSES - Failed to register IP
Address "
"of %d.%d.%d.%d with error %s\n",
port_num,
Index: ulp/ipoib/kernel/ipoib_endpoint.c
===================================================================
--- ulp/ipoib/kernel/ipoib_endpoint.c (revision 1307)
+++ ulp/ipoib/kernel/ipoib_endpoint.c (working copy)
@@ -34,6 +34,12 @@
#include "ipoib_endpoint.h"
#include "ipoib_port.h"
#include "ipoib_debug.h"
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "ipoib_endpoint.tmh"
+#endif
#include <complib/cl_atomic.h>
@@ -83,7 +89,7 @@
p_endpt = cl_zalloc( sizeof(ipoib_endpt_t) );
if( !p_endpt )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Failed to allocate endpoint (%d bytes)\n",
sizeof(ipoib_endpt_t)) );
return NULL;
@@ -138,7 +144,7 @@
if( status != IB_SUCCESS )
{
- IPOIB_TRACE( IPOIB_DBG_ERROR,
+ IPOIB_PRINT( TRACE_LEVEL_ERROR,IPOIB_DBG_INIT ,
("ib_create_av returned %s\n",
p_endpt->p_ifc->get_err_str( status )) );
}
@@ -159,7 +165,7 @@
IPOIB_ENTER( IPOIB_DBG_ENDPT );
- IPOIB_TRACE( (IPOIB_DBG_ENDPT | IPOIB_DBG_INFO),
+ IPOIB_PRINT(TRACE_LEVEL_INFORMATION ,IPOIB_DBG_ENDPT ,
("Create av for MAC: %02X-%02X-%02X-%02X-%02X-%02X\n",
p_endpt->mac.addr[0], p_endpt->mac.addr[1],
p_endpt->mac.addr[2], p_endpt->mac.addr[3],
@@ -169,7 +175,7 @@
&p_endpt->h_av );
if( status != IB_SUCCESS )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("__create_mcast_av returned %s\n",
p_endpt->p_ifc->get_err_str( status )) );
return status;
@@ -224,7 +230,7 @@
/* Leave the multicast group if it exists. */
if( p_endpt->h_mcast )
{
- IPOIB_TRACE( IPOIB_DBG_INFO, ("Leaving MCast group\n") );
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION ,IPOIB_DBG_ENDPT ,("Leaving
MCast group\n") );
p_port->p_adapter->p_ifc->leave_mcast( p_endpt->h_mcast, NULL );
}
@@ -322,7 +328,7 @@
p_port->p_adapter->h_al, &query, &p_endpt->h_query );
if( status != IB_SUCCESS )
{
- IPOIB_TRACE( IPOIB_DBG_ERROR,
+ IPOIB_PRINT( TRACE_LEVEL_ERROR ,IPOIB_DBG_ENDPT ,
("ib_query for path returned %s\n",
p_port->p_adapter->p_ifc->get_err_str( status )) );
ipoib_endpt_deref( p_endpt );
@@ -359,7 +365,7 @@
ipoib_endpt_deref( p_endpt );
if( p_query_rec->p_result_mad )
p_port->p_adapter->p_ifc->put_mad( p_query_rec->p_result_mad );
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Endpoint destroying, aborting.\n") );
return;
}
@@ -371,7 +377,7 @@
ipoib_endpt_deref( p_endpt );
if( p_query_rec->p_result_mad )
p_port->p_adapter->p_ifc->put_mad( p_query_rec->p_result_mad );
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Path query failed with %s\n",
p_port->p_adapter->p_ifc->get_err_str( p_query_rec->status )) );
return;
@@ -431,7 +437,7 @@
p_port->p_adapter->hung = TRUE;
ipoib_endpt_deref( p_endpt );
cl_obj_unlock( &p_endpt->obj );
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("ib_create_av failed with %s\n",
p_port->p_adapter->p_ifc->get_err_str( status )) );
return;
Index: ulp/ipoib/kernel/ipoib_endpoint.h
===================================================================
--- ulp/ipoib/kernel/ipoib_endpoint.h (revision 1307)
+++ ulp/ipoib/kernel/ipoib_endpoint.h (working copy)
@@ -130,7 +130,7 @@
IN ipoib_endpt_t* const p_endpt )
{
CL_ASSERT( p_endpt );
- IPOIB_ENTER( IPOIB_DBG_ENDPT );
+ //IPOIB_ENTER( IPOIB_DBG_ENDPT );
cl_obj_ref( &p_endpt->obj );
/*
* Anytime we reference the endpoint, we're either receiving data
@@ -138,7 +138,7 @@
* to prevent the AV from being flushed.
*/
p_endpt->expired = FALSE;
- IPOIB_EXIT( IPOIB_DBG_ENDPT );
+ //IPOIB_EXIT( IPOIB_DBG_ENDPT );
}
@@ -146,9 +146,9 @@
ipoib_endpt_deref(
IN ipoib_endpt_t* const p_endpt )
{
- IPOIB_ENTER( IPOIB_DBG_ENDPT );
+ //IPOIB_ENTER( IPOIB_DBG_ENDPT );
cl_obj_deref( &p_endpt->obj );
- IPOIB_EXIT( IPOIB_DBG_ENDPT );
+ //IPOIB_EXIT( IPOIB_DBG_ENDPT );
}
Index: ulp/ipoib/kernel/ipoib_ibat.c
===================================================================
--- ulp/ipoib/kernel/ipoib_ibat.c (revision 1307)
+++ ulp/ipoib/kernel/ipoib_ibat.c (working copy)
@@ -35,6 +35,12 @@
#include "ipoib_adapter.h"
#include "ipoib_port.h"
#include "ipoib_debug.h"
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "ipoib_ibat.tmh"
+#endif
#include <iba/ib_at_ioctl.h>
@@ -76,14 +82,14 @@
if( pIoStack->Parameters.DeviceIoControl.InputBufferLength !=
sizeof(IOCTL_IBAT_PORTS_IN) )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR, ("Invalid input buffer size.\n")
);
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL , ("Invalid input
buffer size.\n") );
return STATUS_INVALID_PARAMETER;
}
if( pIoStack->Parameters.DeviceIoControl.OutputBufferLength <
sizeof(IOCTL_IBAT_PORTS_OUT) )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR, ("Invalid output buffer size.\n")
);
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL , ("Invalid output
buffer size.\n") );
return STATUS_INVALID_PARAMETER;
}
@@ -92,7 +98,7 @@
if( pIn->Version != IBAT_IOCTL_VERSION )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR, ("Invalid version.\n") );
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL , ("Invalid
version.\n") );
return STATUS_INVALID_PARAMETER;
}
@@ -162,14 +168,14 @@
if( pIoStack->Parameters.DeviceIoControl.InputBufferLength !=
sizeof(IOCTL_IBAT_IP_ADDRESSES_IN) )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR, ("Invalid input buffer size.\n")
);
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL , ("Invalid input
buffer size.\n") );
return STATUS_INVALID_PARAMETER;
}
if( pIoStack->Parameters.DeviceIoControl.OutputBufferLength <
sizeof(IOCTL_IBAT_IP_ADDRESSES_OUT) )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR, ("Invalid output buffer size.\n")
);
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL , ("Invalid output
buffer size.\n") );
return STATUS_INVALID_PARAMETER;
}
@@ -178,7 +184,7 @@
if( pIn->Version != IBAT_IOCTL_VERSION )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR, ("Invalid version.\n") );
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL , ("Invalid
version.\n") );
return STATUS_INVALID_PARAMETER;
}
@@ -255,14 +261,14 @@
if( pIoStack->Parameters.DeviceIoControl.InputBufferLength !=
sizeof(IOCTL_IBAT_MAC_TO_GID_IN) )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR, ("Invalid input buffer size.\n")
);
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL , ("Invalid input
buffer size.\n") );
return STATUS_INVALID_PARAMETER;
}
if( pIoStack->Parameters.DeviceIoControl.OutputBufferLength !=
sizeof(IOCTL_IBAT_MAC_TO_GID_OUT) )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR, ("Invalid output buffer size.\n")
);
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL , ("Invalid output
buffer size.\n") );
return STATUS_INVALID_PARAMETER;
}
@@ -271,7 +277,7 @@
if( pIn->Version != IBAT_IOCTL_VERSION )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR, ("Invalid version.\n") );
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL , ("Invalid
version.\n") );
return STATUS_INVALID_PARAMETER;
}
@@ -336,7 +342,7 @@
&p_dev_obj, &g_ipoib.h_ibat_dev );
if( status != NDIS_STATUS_SUCCESS )
{
- IPOIB_TRACE( IPOIB_DBG_ERROR,
+ IPOIB_PRINT( TRACE_LEVEL_ERROR,IPOIB_DBG_INIT ,
("NdisMRegisterDevice failed with status of %d\n", status) );
}
}
@@ -443,22 +449,22 @@
switch( pIoStack->Parameters.DeviceIoControl.IoControlCode )
{
case IOCTL_IBAT_PORTS:
- IPOIB_TRACE( IPOIB_DBG_IOCTL, ("IOCTL_IBAT_PORTS recieved\n") );
+ IPOIB_PRINT(TRACE_LEVEL_INFORMATION, IPOIB_DBG_IOCTL,
("IOCTL_IBAT_PORTS recieved\n") );
status = __ibat_get_ports( pIrp, pIoStack );
break;
case IOCTL_IBAT_IP_ADDRESSES:
- IPOIB_TRACE( IPOIB_DBG_IOCTL, ("IOCTL_IBAT_IP_ADDRESSES recieved\n"
));
+ IPOIB_PRINT(TRACE_LEVEL_INFORMATION, IPOIB_DBG_IOCTL,
("IOCTL_IBAT_IP_ADDRESSES recieved\n" ));
status = __ibat_get_ips( pIrp, pIoStack );
break;
case IOCTL_IBAT_MAC_TO_GID:
- IPOIB_TRACE( IPOIB_DBG_IOCTL, ("IOCTL_IBAT_MAC_TO_GID recieved\n" ));
+ IPOIB_PRINT(TRACE_LEVEL_INFORMATION, IPOIB_DBG_IOCTL,
("IOCTL_IBAT_MAC_TO_GID recieved\n" ));
status = __ibat_mac_to_gid( pIrp, pIoStack );
break;
default:
- IPOIB_TRACE( IPOIB_DBG_WARN, ("unknow IOCTL code = 0x%x\n",
+ IPOIB_PRINT( TRACE_LEVEL_WARNING ,IPOIB_DBG_IOCTL , ("unknow IOCTL
code = 0x%x\n",
pIoStack->Parameters.DeviceIoControl.IoControlCode) );
status = STATUS_INVALID_PARAMETER;
}
Index: ulp/ipoib/kernel/ipoib_port.c
===================================================================
--- ulp/ipoib/kernel/ipoib_port.c (revision 1307)
+++ ulp/ipoib/kernel/ipoib_port.c (working copy)
@@ -34,8 +34,13 @@
#include "ipoib_port.h"
#include "ipoib_adapter.h"
#include "ipoib_debug.h"
+#if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
+#include "ipoib_port.tmh"
+#endif
-
/*
* PR 102492 relates to the SA not accepting wildcard values for
MCMemberRecord
* Sets used to create/join Multicast groups. Defining this keyword
causes all
@@ -488,7 +493,7 @@
(sizeof(ipoib_hdr_t) * (p_adapter->params.sq_depth - 1)) );
if( !p_port )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Failed to allocate ipoib_port_t (%d bytes)\n",
sizeof(ipoib_port_t)) );
return IB_INSUFFICIENT_MEMORY;
@@ -503,7 +508,7 @@
status = __port_init( p_port, p_adapter, p_pnp_rec );
if( status != IB_SUCCESS )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("ipoib_port_init returned %s.\n",
p_adapter->p_ifc->get_err_str( status )) );
__port_cleanup( &p_port->obj );
@@ -573,7 +578,7 @@
cl_status = cl_spinlock_init( &p_port->send_lock );
if( cl_status != CL_SUCCESS )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("cl_spinlock_init returned %s\n", cl_status_text[cl_status]) );
return IB_ERROR;
}
@@ -581,7 +586,7 @@
cl_status = cl_spinlock_init( &p_port->recv_lock );
if( cl_status != CL_SUCCESS )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("cl_spinlock_init returned %s\n", cl_status_text[cl_status]) );
return IB_ERROR;
}
@@ -590,7 +595,7 @@
status = __ib_mgr_init( p_port );
if( status != IB_SUCCESS )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("__ib_mgr_init returned %s\n",
p_adapter->p_ifc->get_err_str( status )) );
return status;
@@ -600,7 +605,7 @@
status = __buf_mgr_init( p_port );
if( status != IB_SUCCESS )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("__buf_mgr_init returned %s\n",
p_adapter->p_ifc->get_err_str( status )) );
return status;
@@ -610,7 +615,7 @@
status = __recv_mgr_init( p_port );
if( status != IB_SUCCESS )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("__recv_mgr_init returned %s\n",
p_adapter->p_ifc->get_err_str( status )) );
return status;
@@ -620,7 +625,7 @@
status = __endpt_mgr_init( p_port );
if( status != IB_SUCCESS )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("__endpt_mgr_init returned %s\n",
p_adapter->p_ifc->get_err_str( status )) );
return status;
@@ -631,7 +636,7 @@
__port_destroying, __port_cleanup, __port_free );
if( cl_status != CL_SUCCESS )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("cl_obj_init returned %s\n", cl_status_text[cl_status]) );
return IB_ERROR;
}
@@ -755,7 +760,7 @@
{
NdisWriteErrorLogEntry( p_port->p_adapter->h_adapter,
EVENT_IPOIB_OPEN_CA, 1, status );
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("ib_open_ca returned %s\n",
p_port->p_adapter->p_ifc->get_err_str( status )) );
return status;
@@ -768,7 +773,7 @@
{
NdisWriteErrorLogEntry( p_port->p_adapter->h_adapter,
EVENT_IPOIB_ALLOC_PD, 1, status );
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("ib_alloc_pd returned %s\n",
p_port->p_adapter->p_ifc->get_err_str( status )) );
return status;
@@ -786,7 +791,7 @@
{
NdisWriteErrorLogEntry( p_port->p_adapter->h_adapter,
EVENT_IPOIB_CREATE_RECV_CQ, 1, status );
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("ib_create_cq returned %s.\n",
p_port->p_adapter->p_ifc->get_err_str( status )) );
return status;
@@ -803,7 +808,7 @@
{
NdisWriteErrorLogEntry( p_port->p_adapter->h_adapter,
EVENT_IPOIB_CREATE_SEND_CQ, 1, status );
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("ib_create_cq returned %s.\n",
p_port->p_adapter->p_ifc->get_err_str( status )) );
return status;
@@ -827,7 +832,7 @@
{
NdisWriteErrorLogEntry( p_port->p_adapter->h_adapter,
EVENT_IPOIB_CREATE_QP, 1, status );
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("ib_create_qp returned %s\n",
p_port->p_adapter->p_ifc->get_err_str( status )) );
return status;
@@ -839,7 +844,7 @@
{
NdisWriteErrorLogEntry( p_port->p_adapter->h_adapter,
EVENT_IPOIB_QUERY_QP, 1, status );
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("ib_query_qp returned %s\n",
p_port->p_adapter->p_ifc->get_err_str( status )) );
return status;
@@ -863,7 +868,7 @@
{
NdisWriteErrorLogEntry( p_port->p_adapter->h_adapter,
EVENT_IPOIB_REG_PHYS, 1, status );
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("ib_reg_phys returned %s\n",
p_port->p_adapter->p_ifc->get_err_str( status )) );
return status;
@@ -904,7 +909,7 @@
__buf_mgr_construct(
IN ipoib_port_t* const p_port )
{
- IPOIB_ENTER( IPOIB_DBG_BUF | IPOIB_DBG_INIT );
+ IPOIB_ENTER( IPOIB_DBG_INIT );
cl_qpool_construct( &p_port->buf_mgr.recv_pool );
@@ -917,7 +922,7 @@
p_port->buf_mgr.h_send_pkt_pool = NULL;
p_port->buf_mgr.h_send_buf_pool = NULL;
- IPOIB_EXIT( IPOIB_DBG_BUF | IPOIB_DBG_INIT );
+ IPOIB_EXIT( IPOIB_DBG_INIT );
}
@@ -929,7 +934,7 @@
NDIS_STATUS ndis_status;
ipoib_params_t *p_params;
- IPOIB_ENTER( IPOIB_DBG_BUF | IPOIB_DBG_INIT );
+ IPOIB_ENTER(IPOIB_DBG_INIT );
CL_ASSERT( p_port );
CL_ASSERT( p_port->p_adapter );
@@ -948,7 +953,7 @@
{
NdisWriteErrorLogEntry( p_port->p_adapter->h_adapter,
EVENT_IPOIB_RECV_POOL, 1, cl_status );
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("cl_qpool_init for recvs returned %s\n",
cl_status_text[cl_status]) );
return IB_INSUFFICIENT_MEMORY;
@@ -961,7 +966,7 @@
{
NdisWriteErrorLogEntry( p_port->p_adapter->h_adapter,
EVENT_IPOIB_RECV_PKT_POOL, 1, ndis_status );
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("NdisAllocatePacketPool returned %08X\n", ndis_status) );
return IB_INSUFFICIENT_RESOURCES;
}
@@ -972,7 +977,7 @@
{
NdisWriteErrorLogEntry( p_port->p_adapter->h_adapter,
EVENT_IPOIB_RECV_BUF_POOL, 1, ndis_status );
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("NdisAllocateBufferPool returned %08X\n", ndis_status) );
return IB_INSUFFICIENT_RESOURCES;
}
@@ -984,7 +989,7 @@
{
NdisWriteErrorLogEntry( p_port->p_adapter->h_adapter,
EVENT_IPOIB_SEND_PKT_POOL, 1, ndis_status );
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("NdisAllocatePacketPool returned %08X\n", ndis_status) );
return IB_INSUFFICIENT_RESOURCES;
}
@@ -995,12 +1000,12 @@
{
NdisWriteErrorLogEntry( p_port->p_adapter->h_adapter,
EVENT_IPOIB_SEND_BUF_POOL, 1, ndis_status );
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("NdisAllocateBufferPool returned %08X\n", ndis_status) );
return IB_INSUFFICIENT_RESOURCES;
}
- IPOIB_EXIT( IPOIB_DBG_BUF | IPOIB_DBG_INIT );
+ IPOIB_EXIT( IPOIB_DBG_INIT );
return IB_SUCCESS;
}
@@ -1009,7 +1014,7 @@
__buf_mgr_destroy(
IN ipoib_port_t* const p_port )
{
- IPOIB_ENTER( IPOIB_DBG_BUF | IPOIB_DBG_INIT );
+ IPOIB_ENTER(IPOIB_DBG_INIT );
CL_ASSERT( p_port );
@@ -1031,7 +1036,7 @@
/* Free the lookaside list of scratch buffers. */
ExDeleteNPagedLookasideList( &p_port->buf_mgr.send_buf_list );
- IPOIB_EXIT( IPOIB_DBG_BUF | IPOIB_DBG_INIT );
+ IPOIB_EXIT( IPOIB_DBG_INIT );
}
@@ -1045,7 +1050,7 @@
ipoib_port_t *p_port;
uint32_t ds0_len;
- IPOIB_ENTER( IPOIB_DBG_BUF | IPOIB_DBG_ALLOC );
+ IPOIB_ENTER( IPOIB_DBG_ALLOC );
CL_ASSERT( p_object );
CL_ASSERT( context );
@@ -1089,7 +1094,7 @@
p_desc->p_buf = (recv_buf_t*)cl_zalloc( sizeof(recv_buf_t) );
if( !p_desc->p_buf )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Failed to allocate receive buffer.\n") );
return CL_INSUFFICIENT_MEMORY;
}
@@ -1106,7 +1111,7 @@
*pp_pool_item = &p_desc->item;
- IPOIB_EXIT( IPOIB_DBG_BUF | IPOIB_DBG_ALLOC );
+ IPOIB_EXIT( IPOIB_DBG_ALLOC );
return CL_SUCCESS;
}
@@ -1119,7 +1124,7 @@
{
ipoib_recv_desc_t *p_desc;
- IPOIB_ENTER( IPOIB_DBG_BUF | IPOIB_DBG_ALLOC );
+ IPOIB_ENTER( IPOIB_DBG_ALLOC );
UNUSED_PARAM( context );
@@ -1128,7 +1133,7 @@
if( p_desc->p_buf )
cl_free( p_desc->p_buf );
- IPOIB_EXIT( IPOIB_DBG_BUF | IPOIB_DBG_ALLOC );
+ IPOIB_EXIT( IPOIB_DBG_ALLOC );
}
#endif
@@ -1138,7 +1143,7 @@
IN ipoib_port_t* const p_port )
{
ipoib_recv_desc_t *p_desc;
- IPOIB_ENTER( IPOIB_DBG_BUF | IPOIB_DBG_RECV );
+ IPOIB_ENTER( IPOIB_DBG_RECV );
p_desc = (ipoib_recv_desc_t*)cl_qpool_get( &p_port->buf_mgr.recv_pool
);
/* Reference the port object for the send. */
if( p_desc )
@@ -1156,7 +1161,7 @@
#endif /* IPOIB_INLINE_RECV */
CL_ASSERT( p_desc->local_ds[0].lkey == p_port->ib_mgr.lkey );
}
- IPOIB_EXIT( IPOIB_DBG_BUF | IPOIB_DBG_RECV );
+ IPOIB_EXIT( IPOIB_DBG_RECV );
return p_desc;
}
@@ -1169,7 +1174,7 @@
{
NDIS_BUFFER *p_buf;
- IPOIB_ENTER( IPOIB_DBG_BUF | IPOIB_DBG_RECV );
+ IPOIB_ENTER(IPOIB_DBG_RECV );
if( p_packet )
{
@@ -1189,7 +1194,7 @@
*/
cl_obj_deref( &p_port->obj );
- IPOIB_EXIT( IPOIB_DBG_BUF | IPOIB_DBG_RECV );
+ IPOIB_EXIT( IPOIB_DBG_RECV );
}
@@ -1198,9 +1203,9 @@
IN ipoib_port_t* const p_port,
IN cl_qlist_t* const p_list )
{
- IPOIB_ENTER( IPOIB_DBG_BUF | IPOIB_DBG_RECV );
+ IPOIB_ENTER( IPOIB_DBG_RECV );
cl_qpool_put_list( &p_port->buf_mgr.recv_pool, p_list );
- IPOIB_EXIT( IPOIB_DBG_BUF | IPOIB_DBG_RECV );
+ IPOIB_EXIT( IPOIB_DBG_RECV );
}
@@ -1213,13 +1218,13 @@
NDIS_PACKET *p_packet;
NDIS_BUFFER *p_buffer;
- IPOIB_ENTER( IPOIB_DBG_BUF | IPOIB_DBG_RECV );
+ IPOIB_ENTER( IPOIB_DBG_RECV );
NdisDprAllocatePacketNonInterlocked( &status, &p_packet,
p_port->buf_mgr.h_packet_pool );
if( status != NDIS_STATUS_SUCCESS )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Failed to allocate NDIS_PACKET: %08x\n", status) );
return NULL;
}
@@ -1235,7 +1240,7 @@
#endif /* IPOIB_INLINE_RECV */
if( status != NDIS_STATUS_SUCCESS )
{
- IPOIB_TRACE( IPOIB_DBG_ERROR,
+ IPOIB_PRINT( TRACE_LEVEL_ERROR,IPOIB_DBG_INIT ,
("Failed to allocate NDIS_BUFFER: %08x\n", status) );
NdisDprFreePacketNonInterlocked( p_packet );
return NULL;
@@ -1245,7 +1250,7 @@
NDIS_SET_PACKET_HEADER_SIZE( p_packet, sizeof(eth_hdr_t) );
NDIS_SET_PACKET_STATUS( p_packet, NDIS_STATUS_SUCCESS );
- IPOIB_EXIT( IPOIB_DBG_BUF | IPOIB_DBG_RECV );
+ IPOIB_EXIT( IPOIB_DBG_RECV );
return p_packet;
}
@@ -1281,7 +1286,7 @@
{
NdisWriteErrorLogEntry( p_port->p_adapter->h_adapter,
EVENT_IPOIB_RECV_PKT_ARRAY, 0 );
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("cl_malloc for PNDIS_PACKET array failed.\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -1327,7 +1332,7 @@
if( p_port->state == IB_QPS_ERROR )
{
cl_obj_unlock( &p_port->obj );
- IPOIB_TRACE_EXIT( IPOIB_DBG_RECV,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_INFORMATION ,IPOIB_DBG_RECV,
("Port in invalid state. Not reposting.\n") );
return IB_SUCCESS;
}
@@ -1338,7 +1343,7 @@
{
if( p_port->recv_mgr.depth == p_port->p_adapter->params.rq_depth )
{
- IPOIB_TRACE( IPOIB_DBG_INFO | IPOIB_DBG_RECV,
+ IPOIB_PRINT(TRACE_LEVEL_INFORMATION ,IPOIB_DBG_RECV,
("Receive queue already full\n") );
break;
}
@@ -1349,7 +1354,7 @@
cl_perf_stop( &p_port->p_adapter->perf, GetRecv );
if( !p_next )
{
- IPOIB_TRACE( IPOIB_DBG_INFO | IPOIB_DBG_RECV,
+ IPOIB_PRINT(TRACE_LEVEL_INFORMATION ,IPOIB_DBG_RECV,
("Out of receive descriptors!\n") );
break;
}
@@ -1387,7 +1392,7 @@
*/
if( status != IB_SUCCESS )
{
- IPOIB_TRACE( IPOIB_DBG_ERROR,
+ IPOIB_PRINT( TRACE_LEVEL_ERROR,IPOIB_DBG_INIT ,
("ip_post_recv returned %s\n",
p_port->p_adapter->p_ifc->get_err_str( status )) );
/* return the descriptors to the pool */
@@ -1469,7 +1474,7 @@
}
else if( status != IB_NOT_DONE )
{
- IPOIB_TRACE( IPOIB_DBG_RECV,
+ IPOIB_PRINT(TRACE_LEVEL_INFORMATION ,IPOIB_DBG_RECV,
("__recv_mgr_prepare_pkt returned %s\n",
p_port->p_adapter->p_ifc->get_err_str( status )) );
/* Return the item to the head of the list. */
@@ -1666,7 +1671,7 @@
#endif /* IPOIB_INLINE_RECV */
if( status != IB_SUCCESS )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("ipoib_mac_from_guid returned %s\n",
p_port->p_adapter->p_ifc->get_err_str( status )) );
return;
@@ -1681,7 +1686,7 @@
p_wc->recv.ud.remote_lid, p_wc->recv.ud.remote_qp );
if( !*pp_src )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("ipoib_endpt_create returned %s\n",
p_port->p_adapter->p_ifc->get_err_str( status )) );
return;
@@ -1709,7 +1714,7 @@
if( *pp_src && (*pp_src)->qpn != p_wc->recv.ud.remote_qp )
{
/* Update the QPN for the endpoint. */
- IPOIB_TRACE( (IPOIB_DBG_RECV | IPOIB_DBG_WARN),
+ IPOIB_PRINT(TRACE_LEVEL_INFORMATION ,IPOIB_DBG_RECV ,
("Updating QPN for MAC: %02X-%02X-%02X-%02X-%02X-%02X\n",
(*pp_src )->mac.addr[0], (*pp_src )->mac.addr[1],
(*pp_src )->mac.addr[2], (*pp_src )->mac.addr[3],
@@ -1719,7 +1724,7 @@
if( *pp_src && *pp_dst )
{
- IPOIB_TRACE( (IPOIB_DBG_RECV | IPOIB_DBG_INFO),
+ IPOIB_PRINT(TRACE_LEVEL_INFORMATION ,IPOIB_DBG_RECV ,
("Recv:\n"
"\tsrc MAC: %02X-%02X-%02X-%02X-%02X-%02X\n"
"\tdst MAC: %02X-%02X-%02X-%02X-%02X-%02X\n",
@@ -1768,14 +1773,14 @@
{
if( p_wc->status != IB_WCS_WR_FLUSHED_ERR )
{
- IPOIB_TRACE( IPOIB_DBG_ERROR,
+ IPOIB_PRINT( TRACE_LEVEL_ERROR,IPOIB_DBG_INIT ,
("Failed completion %s\n",
p_port->p_adapter->p_ifc->get_wc_status_str( p_wc->status )) );
ipoib_inc_recv_stat( p_port->p_adapter, IP_STAT_ERROR, 0 );
}
else
{
- IPOIB_TRACE( IPOIB_DBG_INFO | IPOIB_DBG_RECV,
+ IPOIB_PRINT(TRACE_LEVEL_INFORMATION ,IPOIB_DBG_RECV ,
("Flushed completion %s\n",
p_port->p_adapter->p_ifc->get_wc_status_str( p_wc->status )) );
ipoib_inc_recv_stat( p_port->p_adapter, IP_STAT_DROPPED, 0 );
@@ -1790,7 +1795,7 @@
if( len < sizeof(ipoib_hdr_t) )
{
- IPOIB_TRACE( IPOIB_DBG_ERROR,
+ IPOIB_PRINT( TRACE_LEVEL_ERROR , IPOIB_DBG_RECV ,
("Received ETH packet < min size\n") );
ipoib_inc_recv_stat( p_port->p_adapter, IP_STAT_ERROR, 0 );
cl_qlist_insert_tail( p_bad_list, &p_desc->item.list_item );
@@ -1833,7 +1838,7 @@
case ETH_PROT_TYPE_IP:
if( len < (sizeof(ipoib_hdr_t) + sizeof(ip_hdr_t)) )
{
- IPOIB_TRACE( IPOIB_DBG_ERROR,
+ IPOIB_PRINT( TRACE_LEVEL_ERROR,IPOIB_DBG_INIT ,
("Received IP packet < min size\n") );
status = IB_INVALID_SETTING;
break;
@@ -1853,7 +1858,7 @@
if( len <
(sizeof(ipoib_hdr_t) + sizeof(ip_hdr_t) + sizeof(udp_hdr_t)) )
{
- IPOIB_TRACE( IPOIB_DBG_ERROR,
+ IPOIB_PRINT( TRACE_LEVEL_ERROR,IPOIB_DBG_INIT ,
("Received UDP packet < min size\n") );
status = IB_INVALID_SETTING;
break;
@@ -1868,7 +1873,7 @@
if( len < (sizeof(ipoib_hdr_t) + sizeof(ip_hdr_t) +
sizeof(udp_hdr_t) + DHCP_MIN_SIZE) )
{
- IPOIB_TRACE( IPOIB_DBG_ERROR,
+ IPOIB_PRINT( TRACE_LEVEL_ERROR,IPOIB_DBG_INIT ,
("Received DHCP < min size\n") );
status = IB_INVALID_SETTING;
break;
@@ -1890,7 +1895,7 @@
case ETH_PROT_TYPE_ARP:
if( len < (sizeof(ipoib_hdr_t) + sizeof(ipoib_arp_pkt_t)) )
{
- IPOIB_TRACE( IPOIB_DBG_ERROR,
+ IPOIB_PRINT( TRACE_LEVEL_ERROR,IPOIB_DBG_INIT ,
("Received ARP < min size\n") );
status = IB_INVALID_SETTING;
break;
@@ -1958,7 +1963,7 @@
if( !p_src || !p_dst )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Received packet with no matching endpoints.\n") );
return IB_NOT_DONE;
}
@@ -2000,7 +2005,7 @@
status = __recv_gen( p_ipoib, p_eth, p_src, p_dst );
if( status != IB_SUCCESS )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("__recv_gen returned %s.\n",
p_port->p_adapter->p_ifc->get_err_str( status )) );
return status;
@@ -2010,7 +2015,7 @@
p_dhcp = &p_eth->type.ip.prot.udp.dhcp;
if( p_dhcp->op != DHCP_REQUEST && p_dhcp->op != DHCP_REPLY )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR, ("Invalid DHCP op code.\n") );
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL , ("Invalid DHCP op
code.\n") );
return IB_INVALID_SETTING;
}
@@ -2021,7 +2026,7 @@
p_option = &p_dhcp->options[0];
if ( *(uint32_t *)p_option != DHCP_COOKIE )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("DHCP cookie corrupted.\n") );
return IB_INVALID_PARAMETER;
}
@@ -2063,13 +2068,13 @@
case DHCPINFORM:
if( !p_cid )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Failed to find required Client-identifier option.\n") );
return IB_INVALID_SETTING;
}
if( p_dhcp->htype != DHCP_HW_TYPE_IB )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Invalid hardware address type.\n") );
return IB_INVALID_SETTING;
}
@@ -2081,7 +2086,7 @@
break;
default:
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Invalide message type.\n") );
return IB_INVALID_PARAMETER;
}
@@ -2094,13 +2099,13 @@
/* Validate that the length and type of the option is as required. */
if( p_cid[1] != 21 )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Client-identifier length not 21 as required.\n") );
return IB_INVALID_SETTING;
}
if( p_cid[2] != DHCP_HW_TYPE_IB )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Client-identifier type is wrong.\n") );
return IB_INVALID_SETTING;
}
@@ -2140,7 +2145,7 @@
if( !p_dst )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Unknown destination endpoint\n") );
return IB_INVALID_SETTING;
}
@@ -2150,21 +2155,21 @@
if( p_ib_arp->hw_type != ARP_HW_TYPE_IB )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("ARP hardware type is not IB\n") );
return IB_INVALID_SETTING;
}
if( p_ib_arp->hw_size != sizeof(ipoib_hw_addr_t) )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("ARP hardware address size is not sizeof(ipoib_hw_addr_t)\n") );
return IB_INVALID_SETTING;
}
if( p_ib_arp->prot_type != ETH_PROT_TYPE_IP )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR, ("ARP protocal type not IP\n") );
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL , ("ARP protocal
type not IP\n") );
return IB_INVALID_SETTING;
}
@@ -2206,7 +2211,7 @@
status = ipoib_mac_from_guid( gid.unicast.interface_id, &mac );
if( status != IB_SUCCESS )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("ipoib_mac_from_guid returned %s\n",
p_port->p_adapter->p_ifc->get_err_str( status )) );
return status;
@@ -2221,7 +2226,7 @@
0, (p_ib_arp->src_hw.flags_qpn & CL_HTON32(0x00FFFFFF)) );
if( !*pp_src )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("ipoib_endpt_create returned %s\n",
p_port->p_adapter->p_ifc->get_err_str( status )) );
return status;
@@ -2254,7 +2259,7 @@
*/
if ( !ib_gid_is_multicast((const ib_gid_t *)&p_dst->dgid ) )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR, ("ARP: is not ARP MCAST\n") );
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL , ("ARP: is not
ARP MCAST\n") );
return IB_INVALID_SETTING;
}
@@ -2288,7 +2293,7 @@
status = __recv_gen( p_ipoib, p_eth, *pp_src, p_dst );
if( status != IB_SUCCESS )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("__recv_gen returned %s.\n",
p_port->p_adapter->p_ifc->get_err_str( status )) );
return status;
@@ -2370,7 +2375,7 @@
ipoib_inc_recv_stat( p_port->p_adapter, type, 0 );
/* Return the receive descriptor to the pool. */
__buf_mgr_put_recv( p_port, p_desc, NULL );
- IPOIB_TRACE_EXIT( IPOIB_DBG_RECV,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_INFORMATION ,IPOIB_DBG_RECV ,
("Packet filter doesn't match receive. Dropping.\n") );
/*
* Return IB_NOT_DONE since the packet has been completed,
@@ -2384,7 +2389,7 @@
cl_perf_stop( &p_port->p_adapter->perf, GetNdisPkt );
if( !*pp_packet )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("__buf_mgr_get_ndis_pkt failed\n") );
return IB_INSUFFICIENT_RESOURCES;
}
@@ -2437,7 +2442,7 @@
}
else if( status != IB_NOT_DONE )
{
- IPOIB_TRACE( IPOIB_DBG_RECV,
+ IPOIB_PRINT(TRACE_LEVEL_INFORMATION , IPOIB_DBG_RECV ,
("__recv_mgr_prepare_pkt returned %s\n",
p_port->p_adapter->p_ifc->get_err_str( status )) );
/* Put all completed receives on the port's done list. */
@@ -2567,7 +2572,7 @@
ExAllocateFromNPagedLookasideList( &p_port->buf_mgr.send_buf_list );
if( !p_desc->p_buf )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Failed to allocate buffer for packet copy.\n") );
return NDIS_STATUS_RESOURCES;
}
@@ -2575,7 +2580,7 @@
NdisAllocatePacket( &status, &p_packet,
p_port->buf_mgr.h_send_pkt_pool );
if( status != NDIS_STATUS_SUCCESS )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_SEND | IPOIB_DBG_WARN,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_WARNING ,IPOIB_DBG_SEND ,
("Failed to allocate NDIS_PACKET for copy.\n") );
return status;
}
@@ -2585,7 +2590,7 @@
if( status != NDIS_STATUS_SUCCESS )
{
NdisFreePacket( p_packet );
- IPOIB_TRACE_EXIT( IPOIB_DBG_SEND | IPOIB_DBG_WARN,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_WARNING ,IPOIB_DBG_SEND ,
("Failed to allocate NDIS_BUFFER for copy.\n") );
return status;
}
@@ -2614,7 +2619,7 @@
if( bytes_copied != tot_len )
{
/* Something went wrong. Drop the packet. */
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Failed to copy full packet: %d of %d bytes copied.\n",
bytes_copied, tot_len) );
return NDIS_STATUS_RESOURCES;
@@ -2648,7 +2653,7 @@
if( !p_mdl )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("No buffers associated with packet.\n") );
return IB_ERROR;
}
@@ -2656,7 +2661,7 @@
/* Remember that one of the DS entries is reserved for the IPoIB
header. */
if( num_pages >= MAX_SEND_SGE )
{
- IPOIB_TRACE( IPOIB_DBG_SEND | IPOIB_DBG_INFO,
+ IPOIB_PRINT(TRACE_LEVEL_INFORMATION ,IPOIB_DBG_SEND ,
("Too many buffers to fit in WR ds_array. Copying data.\n") );
status = __send_copy( p_port, p_desc );
IPOIB_EXIT( IPOIB_DBG_SEND );
@@ -2750,7 +2755,7 @@
NdisGetNextBuffer( p_mdl, &p_mdl );
if( !p_mdl )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Failed to get next buffer.\n") );
return IB_ERROR;
}
@@ -2783,7 +2788,7 @@
if( !p_sgl )
{
ASSERT( p_sgl );
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Failed to get SGL from packet.\n") );
return NDIS_STATUS_FAILURE;
}
@@ -2794,7 +2799,7 @@
( p_sgl->NumberOfElements > MAX_SEND_SGE &&
p_sgl->Elements[0].Length <= sizeof(eth_hdr_t)) )
{
- IPOIB_TRACE( IPOIB_DBG_SEND | IPOIB_DBG_INFO,
+ IPOIB_PRINT(TRACE_LEVEL_INFORMATION ,IPOIB_DBG_SEND ,
("Too many buffers to fit in WR ds_array. Copying data.\n") );
cl_perf_start( SendCopy );
status = __send_copy( p_port, p_desc );
@@ -2868,14 +2873,14 @@
NdisGetNextBuffer( p_buf, &p_buf );
if( !p_buf )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Failed to get IP header buffer.\n") );
return NDIS_STATUS_FAILURE;
}
NdisQueryBufferSafe( p_buf, &p_ip_hdr, &buf_len, NormalPagePriority
);
if( !p_ip_hdr )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Failed to query IP header buffer.\n") );
return NDIS_STATUS_FAILURE;
}
@@ -2888,7 +2893,7 @@
if( buf_len < sizeof(ip_hdr_t) )
{
/* This buffer is done for. Get the next buffer. */
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Buffer too small for IP packet.\n") );
return NDIS_STATUS_BUFFER_TOO_SHORT;
}
@@ -2938,14 +2943,14 @@
NdisGetNextBuffer( p_buf, &p_buf );
if( !p_buf )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Failed to get UDP header buffer.\n") );
return NDIS_STATUS_FAILURE;
}
NdisQueryBufferSafe( p_buf, &p_udp_hdr, &buf_len, NormalPagePriority
);
if( !p_udp_hdr )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Failed to query UDP header buffer.\n") );
return NDIS_STATUS_FAILURE;
}
@@ -2958,7 +2963,7 @@
/* Get the UDP header and check the destination port numbers. */
if( buf_len < sizeof(udp_hdr_t) )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Buffer not large enough for UDP packet.\n") );
return NDIS_STATUS_BUFFER_TOO_SHORT;
}
@@ -2983,7 +2988,7 @@
ExAllocateFromNPagedLookasideList( &p_port->buf_mgr.send_buf_list );
if( !p_desc->p_buf )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Failed to query DHCP packet buffer.\n") );
return NDIS_STATUS_RESOURCES;
}
@@ -3024,14 +3029,14 @@
NdisGetNextBuffer( p_buf, &p_buf );
if( !p_buf )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Failed to get DHCP buffer.\n") );
return NDIS_STATUS_FAILURE;
}
NdisQueryBufferSafe( p_buf, &p_dhcp, &buf_len, NormalPagePriority );
if( !p_dhcp )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Failed to query DHCP buffer.\n") );
return NDIS_STATUS_FAILURE;
}
@@ -3043,7 +3048,7 @@
if( buf_len < DHCP_MIN_SIZE )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Buffer not large enough for DHCP packet.\n") );
return NDIS_STATUS_BUFFER_TOO_SHORT;
}
@@ -3100,7 +3105,7 @@
*/
if( buf_len + 23 - p_cid[1] > sizeof(dhcp_pkt_t) )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Can't convert CID to IPoIB format.\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -3127,7 +3132,7 @@
*/
if( buf_len + 23 > sizeof(dhcp_pkt_t) )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Can't convert CID to IPoIB format.\n") );
return NDIS_STATUS_RESOURCES;
}
@@ -3158,7 +3163,7 @@
break;
default:
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Invalide message type.\n") );
return NDIS_STATUS_INVALID_DATA;
}
@@ -3193,14 +3198,14 @@
NdisGetNextBuffer( p_buf, &p_buf );
if( !p_buf )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Failed to get ARP buffer.\n") );
return NDIS_STATUS_FAILURE;
}
NdisQueryBufferSafe( p_buf, &p_arp, &buf_len, NormalPagePriority );
if( !p_arp )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Failed to get query ARP buffer.\n") );
return NDIS_STATUS_FAILURE;
}
@@ -3213,14 +3218,14 @@
/* Single buffer ARP packet. */
if( buf_len < sizeof(arp_pkt_t) )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Buffer too short for ARP.\n") );
return NDIS_STATUS_BUFFER_TOO_SHORT;
}
if( p_arp->prot_type != ETH_PROT_TYPE_IP )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Unsupported protocol type.\n") );
return NDIS_STATUS_INVALID_DATA;
}
@@ -3230,7 +3235,7 @@
ExAllocateFromNPagedLookasideList( &p_port->buf_mgr.send_buf_list );
if( !p_desc->p_buf )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Failed to query ARP packet buffer.\n") );
return NDIS_STATUS_RESOURCES;
}
@@ -3253,7 +3258,7 @@
&p_ib_arp->dst_hw.gid, &p_ib_arp->dst_hw.flags_qpn );
if( status != NDIS_STATUS_SUCCESS )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Failed lookup of destination HW address\n") );
return status;
}
@@ -3291,20 +3296,20 @@
if( !*pp_eth_hdr )
{
/* Failed to get first buffer. */
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("NdisMGetFirstBufferSafe failed.\n") );
return NDIS_STATUS_FAILURE;
}
if( *p_buf_len < sizeof(eth_hdr_t) )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("First buffer in packet smaller than eth_hdr_t: %d.\n",
*p_buf_len) );
return NDIS_STATUS_BUFFER_TOO_SHORT;
}
- IPOIB_TRACE_EXIT( (IPOIB_DBG_SEND | IPOIB_DBG_INFO),
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_INFORMATION ,IPOIB_DBG_SEND ,
("Ethernet header:\n"
"\tsrc MAC: %02X-%02X-%02X-%02X-%02X-%02X\n"
"\tdst MAC: %02X-%02X-%02X-%02X-%02X-%02X\n"
@@ -3336,7 +3341,7 @@
/* Check the send queue and pend the request if not empty. */
if( cl_qlist_count( &p_port->send_mgr.pending_list ) )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_SEND | IPOIB_DBG_WARN,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_WARNING ,IPOIB_DBG_SEND ,
("Pending list not empty.\n") );
return NDIS_STATUS_PENDING;
}
@@ -3344,7 +3349,7 @@
/* Check the send queue and pend the request if not empty. */
if( p_port->send_mgr.depth == p_port->p_adapter->params.sq_depth )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_SEND | IPOIB_DBG_WARN,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_WARNING ,IPOIB_DBG_SEND ,
("No available WQEs.\n") );
return NDIS_STATUS_PENDING;
}
@@ -3360,7 +3365,7 @@
{
if( ipoib_port_join_mcast( p_port, p_eth_hdr->dst ) == IB_SUCCESS )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ENDPT,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_INFORMATION ,IPOIB_DBG_SEND ,
("Multicast Mac - trying to join.\n") );
return NDIS_STATUS_PENDING;
}
@@ -3393,7 +3398,7 @@
cl_perf_stop( &p_port->p_adapter->perf, SendMgrFilter );
if( status != NDIS_STATUS_SUCCESS )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("__send_mgr_filter returned 0x%08X.\n", status) );
return status;
}
@@ -3547,7 +3552,7 @@
cl_perf_stop( &p_port->p_adapter->perf, PostSend );
if( ib_status != IB_SUCCESS )
{
- IPOIB_TRACE( IPOIB_DBG_ERROR,
+ IPOIB_PRINT( TRACE_LEVEL_ERROR,IPOIB_DBG_INIT ,
("ib_post_send returned %s\n",
p_port->p_adapter->p_ifc->get_err_str( ib_status )) );
cl_perf_start( ProcessFailedSends );
@@ -3594,7 +3599,7 @@
/* Check the send queue and pend the request if not empty. */
if( p_port->send_mgr.depth == p_port->p_adapter->params.sq_depth )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_SEND | IPOIB_DBG_WARN,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_WARNING ,IPOIB_DBG_SEND ,
("No available WQEs.\n") );
break;
}
@@ -3635,7 +3640,7 @@
if( ipoib_port_join_mcast( p_port, p_eth_hdr->dst ) ==
IB_SUCCESS )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ENDPT,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_INFORMATION ,IPOIB_DBG_SEND ,
("Multicast Mac - trying to join.\n") );
cl_qlist_insert_head( &p_port->send_mgr.pending_list,
IPOIB_LIST_ITEM_FROM_PACKET( desc.p_pkt ) );
@@ -3670,7 +3675,7 @@
cl_perf_stop( &p_port->p_adapter->perf, PostSend );
if( ib_status != IB_SUCCESS )
{
- IPOIB_TRACE( IPOIB_DBG_ERROR,
+ IPOIB_PRINT( TRACE_LEVEL_ERROR ,IPOIB_DBG_SEND ,
("ib_post_send returned %s\n",
p_port->p_adapter->p_ifc->get_err_str( ib_status )) );
cl_perf_start( ProcessFailedSends );
@@ -3776,7 +3781,7 @@
break;
case IB_WCS_WR_FLUSHED_ERR:
- IPOIB_TRACE( IPOIB_DBG_RECV | IPOIB_DBG_INFO,
+ IPOIB_PRINT(TRACE_LEVEL_INFORMATION ,IPOIB_DBG_SEND ,
("Flushed send completion.\n") );
ipoib_inc_send_stat( p_port->p_adapter, IP_STAT_DROPPED, 0 );
NdisMSendComplete( p_port->p_adapter->h_adapter,
@@ -3784,7 +3789,7 @@
break;
default:
- IPOIB_TRACE( IPOIB_DBG_ERROR, ("Send failed with %s\n",
+ IPOIB_PRINT( TRACE_LEVEL_ERROR ,IPOIB_DBG_SEND ,("Send failed with
%s\n",
p_port->p_adapter->p_ifc->get_wc_status_str( p_wc->status )) );
ipoib_inc_send_stat( p_port->p_adapter, IP_STAT_ERROR, 0 );
NdisMSendComplete( p_port->p_adapter->h_adapter,
@@ -4031,7 +4036,7 @@
if( p_item == cl_qmap_end( &p_port->endpt_mgr.mac_endpts ) )
{
cl_obj_unlock( &p_port->obj );
- IPOIB_TRACE_EXIT( IPOIB_DBG_ENDPT, ("Failed endpoint lookup.\n") );
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ENDPT, ("Failed
endpoint lookup.\n") );
return STATUS_INVALID_PARAMETER;
}
@@ -4062,7 +4067,7 @@
if( !cl_memcmp( &mac, &p_port->p_adapter->mac, sizeof(mac) ) )
{
/* Discard loopback traffic. */
- IPOIB_TRACE( IPOIB_DBG_WARN, ("Discarding loopback traffic\n") );
+ IPOIB_PRINT(TRACE_LEVEL_WARNING ,IPOIB_DBG_ENDPT ,("Discarding
loopback traffic\n") );
IPOIB_EXIT( IPOIB_DBG_ENDPT );
return NDIS_STATUS_NO_ROUTE_TO_DESTINATION;
}
@@ -4072,7 +4077,7 @@
cl_obj_lock( &p_port->obj );
- IPOIB_TRACE( (IPOIB_DBG_ENDPT | IPOIB_DBG_INFO),
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION ,IPOIB_DBG_ENDPT ,
("Look for :\t MAC: %02X-%02X-%02X-%02X-%02X-%02X\n",
mac.addr[0], mac.addr[1], mac.addr[2],
mac.addr[3], mac.addr[4], mac.addr[5]) );
@@ -4081,7 +4086,7 @@
if( p_item == cl_qmap_end( &p_port->endpt_mgr.mac_endpts ) )
{
cl_obj_unlock( &p_port->obj );
- IPOIB_TRACE_EXIT( IPOIB_DBG_ENDPT, ("Failed endpoint lookup.\n") );
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_INFORMATION ,IPOIB_DBG_ENDPT, ("Failed
endpoint lookup.\n") );
return NDIS_STATUS_NO_ROUTE_TO_DESTINATION;
}
@@ -4123,7 +4128,7 @@
if( p_item == cl_qmap_end( &p_port->endpt_mgr.mac_endpts ) )
{
cl_obj_unlock( &p_port->obj );
- IPOIB_TRACE_EXIT( IPOIB_DBG_ENDPT, ("Failed endpoint lookup.\n") );
+ IPOIB_PRINT_EXIT( TRACE_LEVEL_INFORMATION ,IPOIB_DBG_ENDPT ,("Failed
endpoint lookup.\n") );
return NDIS_STATUS_FAILURE;
}
@@ -4189,7 +4194,7 @@
{
IPOIB_ENTER( IPOIB_DBG_ENDPT );
- IPOIB_TRACE( (IPOIB_DBG_ENDPT | IPOIB_DBG_INFO),
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION ,IPOIB_DBG_ENDPT ,
("insert :\t MAC: %02X-%02X-%02X-%02X-%02X-%02X\n",
mac.addr[0], mac.addr[1], mac.addr[2],
mac.addr[3], mac.addr[4], mac.addr[5]) );
@@ -4271,7 +4276,7 @@
p_mcast_rec->p_member_rec->mlid, CL_HTON32(0x00FFFFFF) );
if( !p_endpt )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("ipoib_endpt_create failed.\n") );
return IB_INSUFFICIENT_RESOURCES;
}
@@ -4281,7 +4286,7 @@
p_port->port_num, p_mcast_rec );
if( status != IB_SUCCESS )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("ipoib_create_mcast_endpt returned %s\n",
p_port->p_adapter->p_ifc->get_err_str( status )) );
return status;
@@ -4452,7 +4457,7 @@
{
p_port->p_adapter->hung = TRUE;
cl_obj_deref( &p_port->obj );
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("ib_query returned %s\n",
p_port->p_adapter->p_ifc->get_err_str( status )) );
return;
@@ -4480,7 +4485,7 @@
if( !p_endpt )
{
p_port->p_adapter->hung = TRUE;
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("Failed to create local endpt\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -4496,7 +4501,7 @@
if( status != IB_SUCCESS )
{
cl_obj_destroy( &p_endpt->obj );
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("ib_create_av for local endpoint returned %s\n",
p_port->p_adapter->p_ifc->get_err_str( status )) );
return status;
@@ -4537,7 +4542,7 @@
status = __endpt_mgr_add_local( p_port, &p_port_rec->port_info );
if( status == IB_SUCCESS )
{
- IPOIB_TRACE( IPOIB_DBG_INFO,
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION , IPOIB_DBG_INIT ,
("Received port info: link width = %d.\n",
p_port_rec->port_info.link_width_active) );
@@ -4552,28 +4557,28 @@
}
else
{
- IPOIB_TRACE( IPOIB_DBG_ERROR,
+ IPOIB_PRINT( TRACE_LEVEL_ERROR,IPOIB_DBG_INIT ,
("__endpt_mgr_add_local returned %s\n",
p_port->p_adapter->p_ifc->get_err_str( status )) );
}
break;
case IB_CANCELED:
- IPOIB_TRACE( IPOIB_DBG_INIT,
+ IPOIB_PRINT(TRACE_LEVEL_INFORMATION ,IPOIB_DBG_INIT ,
("Instance destroying - Aborting.\n") );
break;
case IB_TIMEOUT:
NdisWriteErrorLogEntry( p_port->p_adapter->h_adapter,
EVENT_IPOIB_PORT_INFO_TIMEOUT, 0 );
- IPOIB_TRACE( IPOIB_DBG_INFO, ("Port info query timed out.\n") );
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION ,IPOIB_DBG_INIT , ("Port info
query timed out.\n") );
ipoib_set_inactive( p_port->p_adapter );
break;
case IB_REMOTE_ERROR:
NdisWriteErrorLogEntry( p_port->p_adapter->h_adapter,
EVENT_IPOIB_PORT_INFO_REJECT, 0 );
- IPOIB_TRACE( IPOIB_DBG_INFO, ("Port info query rejected by SA.\n") );
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION ,IPOIB_DBG_INIT , ("Port info
query rejected by SA.\n") );
ipoib_set_inactive( p_port->p_adapter );
break;
@@ -4581,7 +4586,7 @@
NdisWriteErrorLogEntry( p_port->p_adapter->h_adapter,
EVENT_IPOIB_QUERY_PORT_INFO, 1, p_query_rec->status );
/* Hopefully we'll get an SM change event that will restart things.
*/
- IPOIB_TRACE( IPOIB_DBG_INFO, ("Port info query failed.\n") );
+ IPOIB_PRINT( TRACE_LEVEL_INFORMATION ,IPOIB_DBG_INIT , ("Port info
query failed.\n") );
ipoib_set_inactive( p_port->p_adapter );
}
@@ -4634,7 +4639,7 @@
if( status != IB_SUCCESS )
{
cl_obj_deref( &p_port->obj );
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("ib_query returned %s\n",
p_port->p_adapter->p_ifc->get_err_str( status )) );
return;
@@ -4709,7 +4714,7 @@
break;
case IB_CANCELED:
- IPOIB_TRACE( IPOIB_DBG_INIT, ("Instance destroying - Aborting.\n") );
+ IPOIB_PRINT(TRACE_LEVEL_INFORMATION ,IPOIB_DBG_INIT ,("Instance
destroying - Aborting.\n") );
default:
NdisWriteErrorLogEntry( p_port->p_adapter->h_adapter,
@@ -4745,7 +4750,7 @@
* The MC group rate is higher than our port's rate. Log an error
* and stop. A port transition will drive the retry.
*/
- IPOIB_TRACE( IPOIB_DBG_WARN,
+ IPOIB_PRINT(TRACE_LEVEL_WARNING ,IPOIB_DBG_MCAST ,
("Unrealizable join due to rate mismatch.\n") );
NdisWriteErrorLogEntry( p_port->p_adapter->h_adapter,
EVENT_IPOIB_BCAST_RATE, 2,
@@ -4773,7 +4778,7 @@
if( ib_member_get_state( mcast_req.member_rec.scope_state ) !=
IB_MC_REC_STATE_FULL_MEMBER )
{
- IPOIB_TRACE( IPOIB_DBG_WARN,
+ IPOIB_PRINT(TRACE_LEVEL_WARNING ,IPOIB_DBG_MCAST ,
("Incorrect MC member rec join state in query response.\n") );
ib_member_set_state( &mcast_req.member_rec.scope_state,
IB_MC_REC_STATE_FULL_MEMBER );
@@ -4786,7 +4791,7 @@
if( status != IB_SUCCESS )
{
cl_obj_deref( &p_port->obj );
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("ib_join_mcast returned %s\n",
p_port->p_adapter->p_ifc->get_err_str( status )) );
return;
@@ -4853,7 +4858,7 @@
if( status != IB_SUCCESS )
{
cl_obj_deref( &p_port->obj );
- IPOIB_TRACE( IPOIB_DBG_ERROR,
+ IPOIB_PRINT( TRACE_LEVEL_ERROR,IPOIB_DBG_INIT ,
("ib_join_mcast returned %s\n",
p_port->p_adapter->p_ifc->get_err_str( status )) );
}
@@ -4894,7 +4899,7 @@
status = p_port->p_adapter->p_ifc->modify_qp( p_port->ib_mgr.h_qp,
&qp_mod );
if( status != IB_SUCCESS )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("ib_modify_qp to error state returned %s.\n",
p_port->p_adapter->p_ifc->get_err_str( status )) );
p_port->p_adapter->hung = TRUE;
@@ -4924,7 +4929,7 @@
{
cl_obj_unlock( &p_port->obj );
cl_obj_deref( &p_port->obj );
- IPOIB_TRACE_EXIT( IPOIB_DBG_INIT,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_INFORMATION ,IPOIB_DBG_INIT,
("Instance destroying - Aborting.\n") );
return;
}
@@ -4932,7 +4937,7 @@
if( p_mcast_rec->status != IB_SUCCESS )
{
- IPOIB_TRACE( IPOIB_DBG_ERROR,
+ IPOIB_PRINT( TRACE_LEVEL_ERROR,IPOIB_DBG_INIT ,
("Multicast join for broadcast group returned %s.\n",
p_port->p_adapter->p_ifc->get_err_str( p_mcast_rec->status )) );
if( p_mcast_rec->status == IB_REMOTE_ERROR )
@@ -4969,7 +4974,7 @@
status = __endpt_mgr_add_bcast( p_port, p_mcast_rec );
if( status != IB_SUCCESS )
{
- IPOIB_TRACE( IPOIB_DBG_ERROR,
+ IPOIB_PRINT( TRACE_LEVEL_ERROR,IPOIB_DBG_INIT ,
("__endpt_mgr_add_bcast returned %s\n",
p_port->p_adapter->p_ifc->get_err_str( status )) );
status = p_port->p_adapter->p_ifc->leave_mcast( p_mcast_rec->h_mcast,
NULL );
@@ -4985,7 +4990,7 @@
status = __ib_mgr_activate( p_port );
if( status != IB_SUCCESS )
{
- IPOIB_TRACE( IPOIB_DBG_ERROR,
+ IPOIB_PRINT( TRACE_LEVEL_ERROR,IPOIB_DBG_INIT ,
("__ib_mgr_activate returned %s\n",
p_port->p_adapter->p_ifc->get_err_str( status )) );
/* Flag the adapter as hung. */
@@ -5044,7 +5049,7 @@
status = p_port->p_adapter->p_ifc->modify_qp( p_port->ib_mgr.h_qp,
&qp_mod );
if( status != IB_SUCCESS )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("ib_modify_qp returned %s\n",
p_port->p_adapter->p_ifc->get_err_str( status )) );
return status;
@@ -5057,7 +5062,7 @@
status = p_port->p_adapter->p_ifc->init_dgrm_svc( p_port->ib_mgr.h_qp,
&dgrm_info );
if( status != IB_SUCCESS )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("ib_init_dgrm_svc returned %s\n",
p_port->p_adapter->p_ifc->get_err_str( status )) );
return status;
@@ -5067,7 +5072,7 @@
status = p_port->p_adapter->p_ifc->rearm_cq( p_port->ib_mgr.h_recv_cq,
FALSE );
if( status != IB_SUCCESS )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("ib_rearm_cq for recv returned %s\n",
p_port->p_adapter->p_ifc->get_err_str( status )) );
return status;
@@ -5075,7 +5080,7 @@
status = p_port->p_adapter->p_ifc->rearm_cq( p_port->ib_mgr.h_send_cq,
FALSE );
if( status != IB_SUCCESS )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("ib_rearm_cq for send returned %s\n",
p_port->p_adapter->p_ifc->get_err_str( status )) );
return status;
@@ -5171,7 +5176,7 @@
&mcast_req.member_rec.mgid, 0, CL_HTON32(0x00FFFFFF) );
if( !p_endpt )
{
- IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR, ("ipoib_endpt_create failed.\n")
);
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_ERROR ,IPOIB_DBG_ALL ,
("ipoib_endpt_create failed.\n") );
return IB_INSUFFICIENT_MEMORY;
}
@@ -5184,7 +5189,7 @@
if( status != IB_SUCCESS )
{
cl_obj_deref( &p_port->obj );
- IPOIB_TRACE( IPOIB_DBG_ERROR,
+ IPOIB_PRINT( TRACE_LEVEL_ERROR,IPOIB_DBG_INIT ,
("ib_join_mcast returned %s\n",
p_port->p_adapter->p_ifc->get_err_str( status )) );
}
@@ -5213,7 +5218,7 @@
{
cl_obj_unlock( &p_port->obj );
cl_obj_deref( &p_port->obj );
- IPOIB_TRACE_EXIT( IPOIB_DBG_INIT,
+ IPOIB_PRINT_EXIT(TRACE_LEVEL_INFORMATION ,IPOIB_DBG_INIT ,
("Instance destroying - Aborting.\n") );
return;
}
@@ -5221,7 +5226,7 @@
if( p_mcast_rec->status != IB_SUCCESS )
{
- IPOIB_TRACE( IPOIB_DBG_ERROR,
+ IPOIB_PRINT( TRACE_LEVEL_ERROR ,IPOIB_DBG_MCAST ,
("Multicast join request failed with status %s.\n",
p_port->p_adapter->p_ifc->get_err_str( p_mcast_rec->status )) );
ipoib_set_inactive( p_port->p_adapter );
@@ -5241,7 +5246,7 @@
* is not an error.
*/
cl_obj_unlock( &p_port->obj );
- IPOIB_TRACE( IPOIB_DBG_MCAST,
+ IPOIB_PRINT(TRACE_LEVEL_WARNING ,IPOIB_DBG_MCAST ,
("Failed to find endpoint for update.\n") );
p_port->p_adapter->p_ifc->leave_mcast( p_mcast_rec->h_mcast, NULL );
cl_obj_deref( &p_port->obj );
@@ -5258,7 +5263,7 @@
if( status != IB_SUCCESS )
{
cl_obj_unlock( &p_port->obj );
- IPOIB_TRACE( IPOIB_DBG_ERROR,
+ IPOIB_PRINT( TRACE_LEVEL_ERROR ,IPOIB_DBG_MCAST ,
("ipoib_endpt_set_mcast returned %s.\n",
p_port->p_adapter->p_ifc->get_err_str( status )) );
/* Flag the adapter as hung. */
Index: ulp/ipoib/kernel/netipoib.inf
===================================================================
--- ulp/ipoib/kernel/netipoib.inf (revision 1307)
+++ ulp/ipoib/kernel/netipoib.inf (working copy)
@@ -135,7 +135,8 @@
AddReg = Ipoib.ParamsReg
[Ipoib.ParamsReg]
-HKR,"Parameters","DebugFlags",%REG_DWORD_NO_CLOBBER%,0x80000000
+HKR,"Parameters","DebugLevel",%REG_DWORD_NO_CLOBBER%,0x00000003
+HKR,"Parameters","DebugFlags",%REG_DWORD_NO_CLOBBER%,0x00000fff
[IpoibEventLog]
AddReg = IpoibAddEventLogReg
Index: ulp/ipoib/kernel/SOURCES
===================================================================
--- ulp/ipoib/kernel/SOURCES (revision 1307)
+++ ulp/ipoib/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= ipoib_log.mc \
ipoib.rc \
ipoib_driver.c \
@@ -27,4 +35,14 @@
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:ipoib_debug.h \
+ -func:IPOIB_PRINT(LEVEL,FLAGS,(MSG,...)) \
+ -func:IPOIB_PRINT_EXIT(LEVEL,FLAGS,(MSG,...))
+!ENDIF
+
MSC_WARNING_LEVEL= /W4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wpp.patch
Type: application/octet-stream
Size: 106579 bytes
Desc: wpp.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20060502/0781e471/attachment.obj>
More information about the ofw
mailing list