2 * Copyright (c) 2005 SilverStorm Technologies. All rights reserved.
\r
4 * This software is available to you under the OpenIB.org BSD license
\r
7 * Redistribution and use in source and binary forms, with or
\r
8 * without modification, are permitted provided that the following
\r
9 * conditions are met:
\r
11 * - Redistributions of source code must retain the above
\r
12 * copyright notice, this list of conditions and the following
\r
15 * - Redistributions in binary form must reproduce the above
\r
16 * copyright notice, this list of conditions and the following
\r
17 * disclaimer in the documentation and/or other materials
\r
18 * provided with the distribution.
\r
20 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\r
21 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\r
22 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
\r
23 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
\r
24 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
\r
25 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
\r
26 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
\r
37 #ifndef _SRP_DEBUG_H_
\r
38 #define _SRP_DEBUG_H_
\r
41 #include <complib/cl_debug.h>
\r
44 extern uint32_t g_srp_dbg_lvl;
\r
45 extern char g_srb_function_name[][32];
\r
46 extern char g_srb_status_name[][32];
\r
48 /* Debug message category */
\r
49 #define SRP_DBG_PNP (1 << 1)
\r
50 #define SRP_DBG_DEBUG (1 << 2)
\r
52 /* Debug message types. */
\r
53 #define SRP_DBG_FUNC (1 << 28)
\r
54 #define SRP_DBG_VERBOSE (1 << 29)
\r
55 #define SRP_DBG_WARN (1 << 30)
\r
56 #define SRP_DBG_ERROR CL_DBG_ERROR
\r
57 #define SRP_DBG_ALL CL_DBG_ALL
\r
59 #define SRP_ENTER( lvl ) \
\r
60 CL_ENTER( (lvl), g_srp_dbg_lvl )
\r
61 // CL_ENTER( (lvl | SRP_DBG_FUNC), g_srp_dbg_lvl )
\r
62 #define SRP_EXIT( lvl ) \
\r
63 CL_EXIT( (lvl), g_srp_dbg_lvl )
\r
64 // CL_EXIT( (lvl | SRP_DBG_FUNC), g_srp_dbg_lvl )
\r
65 #define SRP_TRACE( lvl, msg ) \
\r
66 CL_TRACE( (lvl), g_srp_dbg_lvl, msg )
\r
67 #define SRP_TRACE_EXIT( lvl, msg ) \
\r
68 CL_TRACE_EXIT( (lvl), g_srp_dbg_lvl, msg )
\r
69 #define SRP_PRINT( lvl, msg ) \
\r
70 CL_PRINT( (lvl), g_srp_dbg_lvl, msg )
\r
73 #endif /* _SRP_DEBUG_H_ */
\r