Print this page
10805 Fix for 10687 can be improved
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/sys/ib/clients/rdsv3/rdsv3_debug.h
+++ new/usr/src/uts/common/sys/ib/clients/rdsv3/rdsv3_debug.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21 /*
22 22 * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
23 23 */
24 24
25 25 /*
26 26 * Copyright 2019, Joyent, Inc.
27 27 */
28 28
29 29 #ifndef _RDSV3_DEBUG_H
30 30 #define _RDSV3_DEBUG_H
31 31
32 32 #ifdef __cplusplus
33 33 extern "C" {
34 34 #endif
35 35
36 36 #define LABEL "RDSV3"
37 37
38 38 /*
39 39 * warnings, console & syslog buffer.
40 40 * For Non recoverable or Major Errors
41 41 */
42 42 #define RDSV3_LOG_L0 0
43 43
44 44 /*
45 45 * syslog buffer or RDS trace buffer (console if booted /w debug)
46 46 * For additional information on Non recoverable errors and
47 47 * warnings/informational message for sys-admin types.
48 48 */
49 49 #define RDSV3_LOG_L1 1
50 50
51 51 /*
52 52 * debug only
53 53 * for more verbose trace than L1, for e.g. recoverable errors,
54 54 * or intersting trace
55 55 */
56 56 #define RDSV3_LOG_L2 2
57 57
58 58 /*
59 59 * debug only
60 60 * for more verbose trace than L2, for e.g. informational messages
61 61 */
62 62 #define RDSV3_LOG_L3 3
63 63
64 64 /*
65 65 * debug only
66 66 * for more verbose trace than L3, for e.g. printing function entries...
67 67 */
68 68 #define RDSV3_LOG_L4 4
69 69
70 70 /*
71 71 * debug only
72 72 * most verbose level. Used only for excessive trace, for e.g.
73 73 * printing structures etc.
74 74 */
75 75 #define RDSV3_LOG_L5 5
76 76
77 77 /*
78 78 * debug only
79 79 * for messages from softints, taskqs, intr handlers, timeout handlers etc.
80 80 */
81 81 #define RDSV3_LOG_LINTR 6
82 82
83 83
84 84 #ifdef DEBUG
85 85 #define RDSV3_DPRINTF_INTR rdsv3_dprintf_intr
86 86 #define RDSV3_DPRINTF5 rdsv3_dprintf5
87 87 #define RDSV3_DPRINTF4 rdsv3_dprintf4
88 88 #define RDSV3_DPRINTF3 rdsv3_dprintf3
89 89
90 90 void rdsv3_dprintf_intr(
91 91 char *name,
92 92 char *fmt, ...);
↓ open down ↓ |
92 lines elided |
↑ open up ↑ |
93 93 void rdsv3_dprintf5(
94 94 char *name,
95 95 char *fmt, ...);
96 96 void rdsv3_dprintf4(
97 97 char *name,
98 98 char *fmt, ...);
99 99 void rdsv3_dprintf3(
100 100 char *name,
101 101 char *fmt, ...);
102 102 #else
103 -#define RDSV3_DPRINTF_INTR(...)
104 -#define RDSV3_DPRINTF5(...)
105 -#define RDSV3_DPRINTF4(...)
106 -#define RDSV3_DPRINTF3(...)
103 +#define RDSV3_DPRINTF_INTR(...) (void)(0)
104 +#define RDSV3_DPRINTF5(...) (void)(0)
105 +#define RDSV3_DPRINTF4(...) (void)(0)
106 +#define RDSV3_DPRINTF3(...) (void)(0)
107 107 #endif
108 108
109 109 #define RDSV3_DPRINTF2 rdsv3_dprintf2
110 110 #define RDSV3_DPRINTF1 rdsv3_dprintf1
111 111 #define RDSV3_DPRINTF0 rdsv3_dprintf0
112 112
113 113 void rdsv3_dprintf2(
114 114 char *name,
115 115 char *fmt, ...);
116 116 void rdsv3_dprintf1(
117 117 char *name,
118 118 char *fmt, ...);
119 119 void rdsv3_dprintf0(
120 120 char *name,
121 121 char *fmt, ...);
122 122
123 123 void rdsv3_trace(
124 124 char *name,
125 125 uint8_t lvl,
126 126 char *fmt, ...);
127 127
128 128 void rdsv3_vprintk(
129 129 char *name,
130 130 uint8_t lvl,
131 131 const char *fmt,
132 132 va_list ap);
133 133
134 134 /* defined in rds_debug.c */
135 135 void rdsv3_logging_initialization();
136 136 void rdsv3_logging_destroy();
137 137 int rdsv3_printk_ratelimit(void);
138 138
139 139 #ifdef __cplusplus
140 140 }
141 141 #endif
142 142
143 143 #endif /* _RDSV3_DEBUG_H */
↓ open down ↓ |
27 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX