6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
24 */
25
26 #ifndef _SYS_IB_EOIB_EIB_IMPL_H
27 #define _SYS_IB_EOIB_EIB_IMPL_H
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32
33 #include <sys/ddi.h>
34 #include <sys/mac.h>
35 #include <sys/sunddi.h>
36 #include <sys/varargs.h>
37 #include <sys/vlan.h>
38 #include <sys/ib/ibtl/ibti.h>
39 #include <sys/ib/ibtl/ibvti.h>
40 #include <sys/ib/ib_pkt_hdrs.h>
41
42 #include <sys/ib/clients/eoib/fip.h>
43 #include <sys/ib/clients/eoib/eib.h>
44
45 /*
71 #define EIB_MSGS_CRIT 0x01
72 #define EIB_MSGS_ERR 0x02
73 #define EIB_MSGS_WARN 0x04
74 #define EIB_MSGS_DEBUG 0x08
75 #define EIB_MSGS_ARGS 0x10
76 #define EIB_MSGS_PKT 0x20
77 #define EIB_MSGS_VERBOSE 0x40
78 #define EIB_MSGS_DEFAULT (EIB_MSGS_CRIT | EIB_MSGS_ERR | EIB_MSGS_WARN)
79
80 #define EIB_LOGSZ_DEFAULT 0x20000
81
82 #define EIB_DPRINTF_CRIT eib_dprintf_crit
83 #define EIB_DPRINTF_ERR eib_dprintf_err
84 #define EIB_DPRINTF_WARN eib_dprintf_warn
85 #ifdef EIB_DEBUG
86 #define EIB_DPRINTF_DEBUG eib_dprintf_debug
87 #define EIB_DPRINTF_ARGS eib_dprintf_args
88 #define EIB_DPRINTF_PKT eib_dprintf_pkt
89 #define EIB_DPRINTF_VERBOSE eib_dprintf_verbose
90 #else
91 #define EIB_DPRINTF_DEBUG 0 &&
92 #define EIB_DPRINTF_ARGS 0 &&
93 #define EIB_DPRINTF_PKT 0 &&
94 #define EIB_DPRINTF_VERBOSE 0 &&
95 #endif
96
97 /*
98 * EoIB threads to provide various services
99 */
100 #define EIB_EVENTS_HDLR "eib_events_handler"
101 #define EIB_RWQES_REFILLER "eib_rwqes_refiller"
102 #define EIB_VNIC_CREATOR "eib_vnic_creator"
103 #define EIB_TXWQES_MONITOR "eib_txwqe_monitor"
104 #define EIB_LSOBUFS_MONITOR "eib_lsobufs_monitor"
105
106 /*
107 * Macro for finding the least significant bit set in a 64-bit unsigned int
108 */
109 #define EIB_FIND_LSB_SET(val64) eib_setbit_mod67[((-(val64) & (val64)) % 67)]
110
111 /*
112 * LSO buffers
113 *
114 * Under normal circumstances we should never need to use any buffer
|
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
24 */
25
26 /*
27 * Copyright 2019, Joyent, Inc.
28 */
29
30 #ifndef _SYS_IB_EOIB_EIB_IMPL_H
31 #define _SYS_IB_EOIB_EIB_IMPL_H
32
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36
37 #include <sys/ddi.h>
38 #include <sys/mac.h>
39 #include <sys/sunddi.h>
40 #include <sys/varargs.h>
41 #include <sys/vlan.h>
42 #include <sys/ib/ibtl/ibti.h>
43 #include <sys/ib/ibtl/ibvti.h>
44 #include <sys/ib/ib_pkt_hdrs.h>
45
46 #include <sys/ib/clients/eoib/fip.h>
47 #include <sys/ib/clients/eoib/eib.h>
48
49 /*
75 #define EIB_MSGS_CRIT 0x01
76 #define EIB_MSGS_ERR 0x02
77 #define EIB_MSGS_WARN 0x04
78 #define EIB_MSGS_DEBUG 0x08
79 #define EIB_MSGS_ARGS 0x10
80 #define EIB_MSGS_PKT 0x20
81 #define EIB_MSGS_VERBOSE 0x40
82 #define EIB_MSGS_DEFAULT (EIB_MSGS_CRIT | EIB_MSGS_ERR | EIB_MSGS_WARN)
83
84 #define EIB_LOGSZ_DEFAULT 0x20000
85
86 #define EIB_DPRINTF_CRIT eib_dprintf_crit
87 #define EIB_DPRINTF_ERR eib_dprintf_err
88 #define EIB_DPRINTF_WARN eib_dprintf_warn
89 #ifdef EIB_DEBUG
90 #define EIB_DPRINTF_DEBUG eib_dprintf_debug
91 #define EIB_DPRINTF_ARGS eib_dprintf_args
92 #define EIB_DPRINTF_PKT eib_dprintf_pkt
93 #define EIB_DPRINTF_VERBOSE eib_dprintf_verbose
94 #else
95 #define EIB_DPRINTF_DEBUG(...)
96 #define EIB_DPRINTF_ARGS(...)
97 #define EIB_DPRINTF_PKT(...)
98 #define EIB_DPRINTF_VERBOSE(...)
99 #endif
100
101 /*
102 * EoIB threads to provide various services
103 */
104 #define EIB_EVENTS_HDLR "eib_events_handler"
105 #define EIB_RWQES_REFILLER "eib_rwqes_refiller"
106 #define EIB_VNIC_CREATOR "eib_vnic_creator"
107 #define EIB_TXWQES_MONITOR "eib_txwqe_monitor"
108 #define EIB_LSOBUFS_MONITOR "eib_lsobufs_monitor"
109
110 /*
111 * Macro for finding the least significant bit set in a 64-bit unsigned int
112 */
113 #define EIB_FIND_LSB_SET(val64) eib_setbit_mod67[((-(val64) & (val64)) % 67)]
114
115 /*
116 * LSO buffers
117 *
118 * Under normal circumstances we should never need to use any buffer
|