4 * @brief definitions of log macros and log configuration
7 * IXP400 SW Release version 2.0
9 * -- Copyright Notice --
12 * Copyright 2001-2005, Intel Corporation.
13 * All rights reserved.
16 * SPDX-License-Identifier: BSD-3-Clause
18 * -- End of Copyright Notice --
24 #define NULL_PRINT_ROUTINE(format, arg...) /* nothing */
26 #define NULL_PRINT_ROUTINE if(0) printf
29 /***************************************************
31 ***************************************************/
32 /* safe to permanently leave these on */
34 #define HAS_ERROR_IRQ_LOG
35 #define HAS_WARNING_LOG
37 /***************************************************
39 ***************************************************/
41 /* debug output can be turned on unless specifically
42 declared as a non-debug build */
45 #undef HAS_EVENTS_TRACE
46 #undef HAS_EVENTS_VERBOSE_TRACE
48 #undef HAS_SUPPORT_TRACE
49 #undef HAS_SUPPORT_VERBOSE_TRACE
52 #undef HAS_NPE_VERBOSE_TRACE
53 #undef HAS_DUMP_NPE_TREE
55 #undef HAS_UPDATE_TRACE
56 #undef HAS_UPDATE_VERBOSE_TRACE
61 /***************************************************
63 ***************************************************/
65 /************** Globals ******************/
69 #define ERROR_LOG printf
73 #define ERROR_LOG NULL_PRINT_ROUTINE
77 #ifdef HAS_ERROR_IRQ_LOG
79 #define ERROR_IRQ_LOG(format, arg1, arg2, arg3, arg4, arg5, arg6) ixOsalLog(IX_OSAL_LOG_LVL_ERROR, IX_OSAL_LOG_DEV_STDOUT, format, arg1, arg2, arg3, arg4, arg5, arg6)
83 #define ERROR_IRQ_LOG(format, arg1, arg2, arg3, arg4, arg5, arg6) /* nothing */
87 #ifdef HAS_WARNING_LOG
89 #define WARNING_LOG printf
93 #define WARNING_LOG NULL_PRINT_ROUTINE
97 /************** Events *******************/
99 #ifdef HAS_EVENTS_TRACE
101 #define IX_ETH_DB_EVENTS_TRACE printf
102 #define IX_ETH_DB_IRQ_EVENTS_TRACE(format, arg1, arg2, arg3, arg4, arg5, arg6) ixOsalLog(IX_OSAL_LOG_LVL_MESSAGE, IX_OSAL_LOG_DEV_STDOUT, format, arg1, arg2, arg3, arg4, arg5, arg6)
104 #ifdef HAS_EVENTS_VERBOSE_TRACE
106 #define IX_ETH_DB_EVENTS_VERBOSE_TRACE printf
110 #define IX_ETH_DB_EVENTS_VERBOSE_TRACE NULL_PRINT_ROUTINE
112 #endif /* HAS_EVENTS_VERBOSE_TRACE */
116 #define IX_ETH_DB_EVENTS_TRACE NULL_PRINT_ROUTINE
117 #define IX_ETH_DB_EVENTS_VERBOSE_TRACE NULL_PRINT_ROUTINE
118 #define IX_ETH_DB_IRQ_EVENTS_TRACE(format, arg1, arg2, arg3, arg4, arg5, arg6) /* nothing */
120 #endif /* HAS_EVENTS_TRACE */
122 /************** Support *******************/
124 #ifdef HAS_SUPPORT_TRACE
126 #define IX_ETH_DB_SUPPORT_TRACE printf
127 #define IX_ETH_DB_SUPPORT_IRQ_TRACE(format, arg1, arg2, arg3, arg4, arg5, arg6) ixOsalLog(IX_OSAL_LOG_LVL_MESSAGE, IX_OSAL_LOG_DEV_STDOUT, format, arg1, arg2, arg3, arg4, arg5, arg6)
129 #ifdef HAS_SUPPORT_VERBOSE_TRACE
131 #define IX_ETH_DB_SUPPORT_VERBOSE_TRACE printf
135 #define IX_ETH_DB_SUPPORT_VERBOSE_TRACE NULL_PRINT_ROUTINE
137 #endif /* HAS_SUPPORT_VERBOSE_TRACE */
141 #define IX_ETH_DB_SUPPORT_TRACE NULL_PRINT_ROUTINE
142 #define IX_ETH_DB_SUPPORT_VERBOSE_TRACE NULL_PRINT_ROUTINE
143 #define IX_ETH_DB_SUPPORT_IRQ_TRACE(format, arg1, arg2, arg3, arg4, arg5, arg6) /* nothing */
145 #endif /* HAS_SUPPORT_TRACE */
147 /************** NPE Adaptor *******************/
151 #define IX_ETH_DB_NPE_TRACE printf
152 #define IX_ETH_DB_NPE_IRQ_TRACE(format, arg1, arg2, arg3, arg4, arg5, arg6) ixOsalLog(IX_OSAL_LOG_LVL_MESSAGE, IX_OSAL_LOG_DEV_STDOUT, format, arg1, arg2, arg3, arg4, arg5, arg6)
154 #ifdef HAS_NPE_VERBOSE_TRACE
156 #define IX_ETH_DB_NPE_VERBOSE_TRACE printf
160 #define IX_ETH_DB_NPE_VERBOSE_TRACE NULL_PRINT_ROUTINE
162 #endif /* HAS_NPE_VERBOSE_TRACE */
166 #define IX_ETH_DB_NPE_TRACE NULL_PRINT_ROUTINE
167 #define IX_ETH_DB_NPE_VERBOSE_TRACE NULL_PRINT_ROUTINE
168 #define IX_ETH_DB_NPE_IRQ_TRACE(format, arg1, arg2, arg3, arg4, arg5, arg6) /* nothing */
170 #endif /* HAS_NPE_TRACE */
172 #ifdef HAS_DUMP_NPE_TREE
174 #define IX_ETH_DB_NPE_DUMP_ELT(eltBaseAddress, eltSize) ixEthELTDumpTree(eltBaseAddress, eltSize)
178 #define IX_ETH_DB_NPE_DUMP_ELT(eltBaseAddress, eltSize) /* nothing */
180 #endif /* HAS_DUMP_NPE_TREE */
182 /************** Port Update *******************/
184 #ifdef HAS_UPDATE_TRACE
186 #define IX_ETH_DB_UPDATE_TRACE printf
188 #ifdef HAS_UPDATE_VERBOSE_TRACE
190 #define IX_ETH_DB_UPDATE_VERBOSE_TRACE printf
194 #define IX_ETH_DB_UPDATE_VERBOSE_TRACE NULL_PRINT_ROUTINE
198 #else /* HAS_UPDATE_VERBOSE_TRACE */
200 #define IX_ETH_DB_UPDATE_TRACE NULL_PRINT_ROUTINE
201 #define IX_ETH_DB_UPDATE_VERBOSE_TRACE NULL_PRINT_ROUTINE
203 #endif /* HAS_UPDATE_TRACE */