Print this page
10686 Debug macros causes smatch issues
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/sys/ib/clients/eoib/eib_impl.h
+++ new/usr/src/uts/common/sys/ib/clients/eoib/eib_impl.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
↓ open down ↓ |
15 lines elided |
↑ open up ↑ |
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 /*
23 23 * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
24 24 */
25 25
26 +/*
27 + * Copyright 2019, Joyent, Inc.
28 + */
29 +
26 30 #ifndef _SYS_IB_EOIB_EIB_IMPL_H
27 31 #define _SYS_IB_EOIB_EIB_IMPL_H
28 32
29 33 #ifdef __cplusplus
30 34 extern "C" {
31 35 #endif
32 36
33 37 #include <sys/ddi.h>
34 38 #include <sys/mac.h>
35 39 #include <sys/sunddi.h>
36 40 #include <sys/varargs.h>
37 41 #include <sys/vlan.h>
38 42 #include <sys/ib/ibtl/ibti.h>
39 43 #include <sys/ib/ibtl/ibvti.h>
40 44 #include <sys/ib/ib_pkt_hdrs.h>
41 45
42 46 #include <sys/ib/clients/eoib/fip.h>
43 47 #include <sys/ib/clients/eoib/eib.h>
44 48
45 49 /*
46 50 * Driver specific constants
47 51 */
48 52 #define EIB_E_SUCCESS 0
49 53 #define EIB_E_FAILURE -1
50 54 #define EIB_MAX_LINE 128
51 55 #define EIB_MAX_SGL 59
52 56 #define EIB_MAX_POST_MULTIPLE 4
53 57 #define EIB_MAX_PAYLOAD_HDR_SZ 160
54 58 #define EIB_TX_COPY_THRESH 4096 /* greater than mtu */
55 59 #define EIB_MAX_VNICS 64 /* do not change this */
56 60 #define EIB_LOGIN_TIMEOUT_USEC 8000000
57 61 #define EIB_RWR_CHUNK_SZ 8
58 62 #define EIB_IPHDR_ALIGN_ROOM 32
59 63 #define EIB_IP_HDR_ALIGN 2
60 64 #define EIB_MAX_RX_PKTS_ONINTR 0x800
61 65 #define EIB_MAX_LOGIN_ATTEMPTS 3
62 66 #define EIB_MAX_VHUB_TBL_ATTEMPTS 3
63 67 #define EIB_MAX_KA_ATTEMPTS 3
64 68 #define EIB_MAX_ATTEMPTS 10
65 69 #define EIB_DELAY_HALF_SECOND 500000
66 70 #define EIB_GRH_SZ (sizeof (ib_grh_t))
67 71
68 72 /*
69 73 * Debug messages
70 74 */
71 75 #define EIB_MSGS_CRIT 0x01
72 76 #define EIB_MSGS_ERR 0x02
73 77 #define EIB_MSGS_WARN 0x04
74 78 #define EIB_MSGS_DEBUG 0x08
75 79 #define EIB_MSGS_ARGS 0x10
76 80 #define EIB_MSGS_PKT 0x20
77 81 #define EIB_MSGS_VERBOSE 0x40
78 82 #define EIB_MSGS_DEFAULT (EIB_MSGS_CRIT | EIB_MSGS_ERR | EIB_MSGS_WARN)
79 83
80 84 #define EIB_LOGSZ_DEFAULT 0x20000
↓ open down ↓ |
45 lines elided |
↑ open up ↑ |
81 85
82 86 #define EIB_DPRINTF_CRIT eib_dprintf_crit
83 87 #define EIB_DPRINTF_ERR eib_dprintf_err
84 88 #define EIB_DPRINTF_WARN eib_dprintf_warn
85 89 #ifdef EIB_DEBUG
86 90 #define EIB_DPRINTF_DEBUG eib_dprintf_debug
87 91 #define EIB_DPRINTF_ARGS eib_dprintf_args
88 92 #define EIB_DPRINTF_PKT eib_dprintf_pkt
89 93 #define EIB_DPRINTF_VERBOSE eib_dprintf_verbose
90 94 #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 +#define EIB_DPRINTF_DEBUG(...)
96 +#define EIB_DPRINTF_ARGS(...)
97 +#define EIB_DPRINTF_PKT(...)
98 +#define EIB_DPRINTF_VERBOSE(...)
95 99 #endif
96 100
97 101 /*
98 102 * EoIB threads to provide various services
99 103 */
100 104 #define EIB_EVENTS_HDLR "eib_events_handler"
101 105 #define EIB_RWQES_REFILLER "eib_rwqes_refiller"
102 106 #define EIB_VNIC_CREATOR "eib_vnic_creator"
103 107 #define EIB_TXWQES_MONITOR "eib_txwqe_monitor"
104 108 #define EIB_LSOBUFS_MONITOR "eib_lsobufs_monitor"
105 109
106 110 /*
107 111 * Macro for finding the least significant bit set in a 64-bit unsigned int
108 112 */
109 113 #define EIB_FIND_LSB_SET(val64) eib_setbit_mod67[((-(val64) & (val64)) % 67)]
110 114
111 115 /*
112 116 * LSO buffers
113 117 *
114 118 * Under normal circumstances we should never need to use any buffer
115 119 * that's larger than MTU. Unfortunately, IB HCA has limitations
116 120 * on the length of SGL that are much smaller than those for regular
117 121 * ethernet NICs. Since the network layer doesn't care to limit the
118 122 * number of mblk fragments in any send mp chain, we end up having to
119 123 * use these larger buffers occasionally.
120 124 */
121 125 #define EIB_LSO_MAXLEN 65536
122 126 #define EIB_LSO_BUFSZ 8192
123 127 #define EIB_LSO_NUM_BUFS 1024
124 128 #define EIB_LSO_FREE_BUFS_THRESH (EIB_LSO_NUM_BUFS >> 5)
125 129
126 130 typedef struct eib_lsobuf_s {
127 131 struct eib_lsobuf_s *lb_next;
128 132 uint8_t *lb_buf;
129 133 int lb_isfree;
130 134 } eib_lsobuf_t;
131 135
132 136 typedef struct eib_lsobkt_s {
133 137 kmutex_t bk_lock;
134 138 kcondvar_t bk_cv;
135 139 uint_t bk_status;
136 140 uint8_t *bk_mem;
137 141 eib_lsobuf_t *bk_bufl;
138 142 eib_lsobuf_t *bk_free_head;
139 143 ibt_mr_hdl_t bk_mr_hdl;
140 144 ibt_lkey_t bk_lkey;
141 145 uint_t bk_nelem;
142 146 uint_t bk_nfree;
143 147 } eib_lsobkt_t;
144 148
145 149 #define EIB_LBUF_SHORT 0x1
146 150 #define EIB_LBUF_MONITOR_DIE 0x2
147 151
148 152 /*
149 153 * The admin partition is only used for sending login and logout messages
150 154 * and receiving login acknowledgements from the gateway. While packets
151 155 * going out on several vlans at the same time could result in multiple
152 156 * vnic creations happening at the same time (and therefore multiple login
153 157 * packets), we serialize the vnic creation via the vnic creator thread, so
154 158 * we shouldn't need a lot of send wqes or receive wqes. Note also that we
155 159 * keep the cq size request to slightly less than a 2^n boundary to allow
156 160 * the alloc cq routine to return the closest 2^n boundary as the real cq
157 161 * size without wasting too much memory.
158 162 */
159 163 #define EIB_ADMIN_MAX_SWQE 30
160 164 #define EIB_ADMIN_MAX_RWQE 30
161 165 #define EIB_ADMIN_CQ_SIZE (EIB_ADMIN_MAX_SWQE + EIB_ADMIN_MAX_RWQE + 1)
162 166
163 167 /*
164 168 * The control qp is per vhub partition, and is used to send and receive
165 169 * vhub control messages such as vhub table request/response, vhub
166 170 * update response and vnic alive messages. While the vhub table response
167 171 * and vhub update messages might take a few rwqes, the vhub table request
168 172 * is made only once per vnic, and the vnic alive message is periodic
169 173 * and uses a single swqe as well. Per vnic, we should certainly not need
170 174 * too many swqes/rwqes.
171 175 */
172 176 #define EIB_CTL_MAX_SWQE 30
173 177 #define EIB_CTL_MAX_RWQE 30
174 178 #define EIB_CTL_CQ_SIZE (EIB_CTL_MAX_SWQE + EIB_CTL_MAX_RWQE + 1)
175 179
176 180 /*
177 181 * For the vNIC's data channel, there are three items that are of importance:
178 182 * the constraints defined below, the hca_max_chan_sz attribute and the value of
179 183 * (hca_max_cq_sz - 1). The maximum limit on swqe/rwqe is set to the minimum
180 184 * of these three values.
181 185 *
182 186 * While the total number of RWQEs posted to the data channel of any vNIC will
183 187 * not exceed EIB_DATA_MAX_RWQE, we also do not want to acquire and post all of
184 188 * it during the data channel initialization, since that is a lot of wqes for
185 189 * one vnic to consume when we don't even know if the vnic will need it at all.
186 190 * We post an initial set of EIB_DATA_RWQE_BKT rwqes, and slowly post more and
187 191 * more sets as we see them being consumed, until we hit the hard limit of
188 192 * EIB_DATA_MAX_RWQE.
189 193 */
190 194 #define EIB_DATA_MAX_SWQE 4000
191 195 #define EIB_DATA_MAX_RWQE 4000
192 196 #define EIB_DATA_RWQE_BKT 512
193 197
194 198 /*
195 199 * vNIC data channel CQ moderation parameters
196 200 */
197 201 #define EIB_TX_COMP_COUNT 10
198 202 #define EIB_TX_COMP_USEC 300
199 203 #define EIB_RX_COMP_COUNT 4
200 204 #define EIB_RX_COMP_USEC 10
201 205
202 206 /*
203 207 * qe_info masks (blk:ndx:type:flags)
204 208 */
205 209 #define EIB_WQEBLK_SHIFT 24
206 210 #define EIB_WQEBLK_MASK 0xFF
207 211 #define EIB_WQENDX_SHIFT 16
208 212 #define EIB_WQENDX_MASK 0xFF
209 213 #define EIB_WQETYP_SHIFT 8
210 214 #define EIB_WQETYP_MASK 0xFF
211 215 #define EIB_WQEFLGS_SHIFT 0
212 216 #define EIB_WQEFLGS_MASK 0xFF
213 217
214 218 /*
215 219 * Macros to get the bit fields from qe_info
216 220 */
217 221 #define EIB_WQE_BLK(info) (((info) >> EIB_WQEBLK_SHIFT) & EIB_WQEBLK_MASK)
218 222 #define EIB_WQE_NDX(info) (((info) >> EIB_WQENDX_SHIFT) & EIB_WQENDX_MASK)
219 223 #define EIB_WQE_TYPE(info) (((info) >> EIB_WQETYP_SHIFT) & EIB_WQETYP_MASK)
220 224 #define EIB_WQE_FLAGS(info) ((info) & EIB_WQEFLGS_MASK)
221 225
222 226 /*
223 227 * Values for type and flags in qe_info
224 228 */
225 229 #define EIB_WQE_TX 0x1
226 230 #define EIB_WQE_RX 0x2
227 231
228 232 /*
229 233 * Flags for rx wqes/buffers
230 234 */
231 235 #define EIB_WQE_FLG_POSTED_TO_HCA 0x1
232 236 #define EIB_WQE_FLG_WITH_NW 0x2
233 237
234 238 /*
235 239 * Flags for tx wqes/buffers
236 240 */
237 241 #define EIB_WQE_FLG_BUFTYPE_LSO 0x4
238 242 #define EIB_WQE_FLG_BUFTYPE_MAPPED 0x8
239 243
240 244 /*
241 245 * Send/Recv workq entries
242 246 */
243 247 typedef struct eib_wqe_s {
244 248 struct eib_wqe_pool_s *qe_pool;
245 249 uint8_t *qe_cpbuf;
246 250 uint8_t *qe_payload_hdr;
247 251 uint_t qe_bufsz;
248 252 uint_t qe_info;
249 253 int qe_vnic_inst;
250 254 ibt_ud_dest_hdl_t qe_dest;
251 255 frtn_t qe_frp;
252 256
253 257 mblk_t *qe_mp;
254 258 ibt_mi_hdl_t qe_iov_hdl;
255 259 ibt_all_wr_t qe_wr;
256 260 ibt_wr_ds_t qe_sgl;
257 261 ibt_wr_ds_t qe_big_sgl[EIB_MAX_SGL];
258 262 struct eib_wqe_s *qe_nxt_post;
259 263 struct eib_chan_s *qe_chan;
260 264 } eib_wqe_t;
261 265
262 266 /*
263 267 * The wqe in-use/free status in EoIB is managed via a 2-level bitmap
264 268 * logic.
265 269 *
266 270 * Each set of 64 wqes (a "wqe block") is managed by a single 64-bit
267 271 * integer bitmap. The free status of a set of 64 such wqe blocks (a
268 272 * "wqe pool") is managed by one 64-bit integer bitmap (if any wqe in
269 273 * the wqe block is free, the bit in the map is 1, otherwise it is 0).
270 274 *
271 275 * The maximum pool size is 4096 wqes, but this can easily be extended
272 276 * to support more wqes using additional pools of wqes.
273 277 *
274 278 * Note that an entire pool of wqes is allocated via a single allocation,
275 279 * the wqe addresses in a pool are all contiguous. The tx/rx copy buffers
276 280 * for a wqe pool are also allocated via a single allocation.
277 281 */
278 282 #define EIB_BLKS_PER_POOL 64
279 283 #define EIB_WQES_PER_BLK 64 /* do not change this */
280 284 #define EIB_WQES_PER_POOL (EIB_BLKS_PER_POOL * EIB_WQES_PER_BLK)
281 285
282 286 #define EIB_WQE_SZ (sizeof (eib_wqe_t))
283 287 #define EIB_WQEBLK_SZ (EIB_WQES_PER_BLK * EIB_WQE_SZ)
284 288
285 289 typedef struct eib_wqe_pool_s {
286 290 struct eib_wqe_pool_s *wp_next;
287 291 struct eib_s *wp_ss;
288 292 ib_vaddr_t wp_vaddr;
289 293 ib_memlen_t wp_memsz;
290 294 ibt_mr_hdl_t wp_mr;
291 295 ibt_lkey_t wp_lkey;
292 296 uint_t wp_nfree_lwm;
293 297 int wp_type;
294 298
295 299 kmutex_t wp_lock;
296 300 kcondvar_t wp_cv;
297 301 uint_t wp_status;
298 302 uint_t wp_nfree;
299 303 uint64_t wp_free_blks;
300 304 uint64_t wp_free_wqes[EIB_BLKS_PER_POOL];
301 305 struct eib_wqe_s *wp_wqe;
302 306 } eib_wqe_pool_t;
303 307
304 308 /*
305 309 * Values for wp_type
306 310 */
307 311 #define EIB_WP_TYPE_TX 0x1
308 312 #define EIB_WP_TYPE_RX 0x2
309 313
310 314 /*
311 315 * Values for wp_status (bit fields)
312 316 */
313 317 #define EIB_TXWQE_SHORT 0x1 /* only for tx wqe pool */
314 318 #define EIB_TXWQE_MONITOR_DIE 0x2 /* only for tx wqe pool */
315 319
316 320 #define EIB_RXWQE_SHORT 0x1 /* only for rx wqe pool */
317 321
318 322 /*
319 323 * The low-water-mark is an indication of when wqe grabs for low-priority
320 324 * qps should start to get refused (swqe grabs for control messages such
321 325 * as keepalives and rwqe grabs for posting back to control qps will still
322 326 * be allowed). The high-water-mark is an indication of when normal
323 327 * behavior should resume.
324 328 */
325 329 #define EIB_NFREE_SWQES_LWM (EIB_WQES_PER_POOL / 64) /* 1/64 */
326 330 #define EIB_NFREE_SWQES_HWM (EIB_WQES_PER_POOL / 32) /* 1/32 */
327 331 #define EIB_NFREE_RWQES_LWM (EIB_WQES_PER_POOL / 10) /* 10% */
328 332 #define EIB_NFREE_RWQES_HWM (EIB_WQES_PER_POOL / 5) /* 20% */
329 333
330 334 /*
331 335 * The "rwqes low" is used to determine when we should start using allocb()
332 336 * to copy and send received mblks in the rx path. It should be a little
333 337 * above the rwqes low-water-mark, but less than the high-water-mark.
334 338 */
335 339 #define EIB_NFREE_RWQES_LOW \
336 340 ((EIB_NFREE_RWQES_LWM + EIB_NFREE_RWQES_HWM) / 2)
337 341
338 342 #define EIB_WPRI_HI 1 /* for keepalive posts */
339 343 #define EIB_WPRI_LO 2 /* for all other posts */
340 344
341 345 /*
342 346 * Multicast GID Layout: the multicast gid is specified in big-endian
343 347 * representation, as a collection of different-sized fields in the
344 348 * EoIB specification. On Solaris, the multicast gid is represented
345 349 * as a collection of two 8-byte fields (in ib_gid_t).
346 350 */
347 351 typedef struct eib_mgid_spec_s {
348 352 uint8_t sp_mgid_prefix[FIP_MGID_PREFIX_LEN];
349 353 uint8_t sp_type;
350 354 uint8_t sp_dmac[ETHERADDRL];
351 355 uint8_t sp_rss_hash;
352 356 uint8_t sp_vhub_id[FIP_VHUBID_LEN];
353 357 } eib_mgid_spec_t;
354 358
355 359 /*
356 360 * Values for sp_type in mgid as per EoIB specification
357 361 */
358 362 #define EIB_MGID_VHUB_DATA 0x0
359 363 #define EIB_MGID_VHUB_UPDATE 0x2
360 364 #define EIB_MGID_VHUB_TABLE 0x3
361 365
362 366 typedef union eib_mgid_s {
363 367 eib_mgid_spec_t gd_spec;
364 368 ib_gid_t gd_sol;
365 369 } eib_mgid_t;
366 370
367 371 /*
368 372 * Gateway properties handed over to us by the EoIB nexus
369 373 */
370 374 typedef struct eib_gw_props_s {
371 375 kmutex_t pp_gw_lock;
372 376
373 377 ib_guid_t pp_gw_system_guid;
374 378 ib_guid_t pp_gw_guid;
375 379 ib_sn_prefix_t pp_gw_sn_prefix;
376 380
377 381 uint_t pp_gw_adv_period;
378 382 uint_t pp_gw_ka_period;
379 383 uint_t pp_vnic_ka_period;
380 384
381 385 ib_qpn_t pp_gw_ctrl_qpn;
382 386 ib_lid_t pp_gw_lid;
383 387 uint16_t pp_gw_portid;
384 388
385 389 uint16_t pp_gw_num_net_vnics;
386 390 uint8_t pp_gw_flag_available;
387 391 uint8_t pp_gw_is_host_adm_vnics;
388 392 uint8_t pp_gw_sl;
389 393 uint8_t pp_gw_n_rss_qpn;
390 394
391 395 uint8_t *pp_gw_system_name;
392 396 uint8_t *pp_gw_port_name;
393 397 uint8_t *pp_gw_vendor_id;
394 398
395 399 clock_t pp_gw_ka_ticks; /* 2.5 x gw_ka_period */
396 400 clock_t pp_vnic_ka_ticks; /* vnic_ka_period */
397 401 } eib_gw_props_t;
398 402
399 403 /*
400 404 * Port-specific properties
401 405 */
402 406 typedef struct eib_props_s {
403 407 uint64_t ep_ifspeed;
404 408 ib_guid_t ep_hca_guid;
405 409 uint8_t ep_port_num;
406 410 ib_gid_t ep_sgid;
407 411 ib_lid_t ep_blid;
408 412 uint16_t ep_mtu;
409 413 ibt_srate_t ep_srate;
410 414 } eib_props_t;
411 415
412 416 /*
413 417 * Capabilities derived from HCA attributes
414 418 */
415 419 typedef struct eib_caps_s {
416 420 uint_t cp_lso_maxlen;
417 421 uint32_t cp_cksum_flags;
418 422 int cp_resv_lkey_capab;
419 423 ibt_lkey_t cp_resv_lkey;
420 424
421 425 uint_t cp_max_swqe;
422 426 uint_t cp_max_rwqe;
423 427 uint_t cp_max_sgl;
424 428 uint_t cp_hiwm_sgl;
425 429 } eib_caps_t;
426 430
427 431 /*
428 432 * List of multicast groups the vnic joined
429 433 */
430 434 typedef struct eib_mcg_s {
431 435 struct eib_mcg_s *mg_next;
432 436 ib_gid_t mg_rgid;
433 437 ib_gid_t mg_mgid;
434 438 uint8_t mg_join_state;
435 439 uint8_t mg_mac[ETHERADDRL];
436 440 ibt_mcg_info_t *mg_mcginfo;
437 441 } eib_mcg_t;
438 442
439 443 /*
440 444 * Admin/control/data channel information
441 445 */
442 446 typedef struct eib_chan_s {
443 447 ibt_channel_hdl_t ch_chan;
444 448 ib_qpn_t ch_qpn;
445 449
446 450 ibt_wc_t *ch_wc;
447 451 ibt_cq_hdl_t ch_cq_hdl;
448 452 uint_t ch_cq_sz;
449 453
450 454 ibt_wc_t *ch_rcv_wc;
451 455 ibt_cq_hdl_t ch_rcv_cq_hdl;
452 456 uint_t ch_rcv_cq_sz;
453 457
454 458 int ch_vnic_inst;
455 459 uint_t ch_max_swqes;
456 460 uint_t ch_max_rwqes;
457 461 uint_t ch_lwm_rwqes;
458 462 uint_t ch_rwqe_bktsz;
459 463 uint_t ch_ip_hdr_align;
460 464 boolean_t ch_alloc_mp;
461 465 boolean_t ch_tear_down;
462 466
463 467 kmutex_t ch_pkey_lock;
464 468 ib_pkey_t ch_pkey;
465 469 uint16_t ch_pkey_ix;
466 470
467 471 kmutex_t ch_cep_lock;
468 472 kcondvar_t ch_cep_cv;
469 473 ibt_cep_state_t ch_cep_state;
470 474
471 475 kmutex_t ch_tx_lock;
472 476 kcondvar_t ch_tx_cv;
473 477 uint_t ch_tx_posted;
474 478 boolean_t ch_tx_busy;
475 479 struct eib_wqe_s *ch_tx;
476 480 struct eib_wqe_s *ch_tx_tail;
477 481
478 482 kmutex_t ch_rx_lock;
479 483 kcondvar_t ch_rx_cv;
480 484 uint_t ch_rx_posted;
481 485 boolean_t ch_rx_refilling;
482 486
483 487 kmutex_t ch_vhub_lock;
484 488 struct eib_mcg_s *ch_vhub_table;
485 489 struct eib_mcg_s *ch_vhub_update;
486 490 struct eib_mcg_s *ch_vhub_data;
487 491
488 492 struct eib_chan_s *ch_rxpost_next;
489 493 } eib_chan_t;
490 494
491 495 /*
492 496 * States for vNIC state machine during login
493 497 */
494 498 #define EIB_LOGIN_INIT 0
495 499 #define EIB_LOGIN_ACK_WAIT 1
496 500 #define EIB_LOGIN_ACK_RCVD 2
497 501 #define EIB_LOGIN_NACK_RCVD 3
498 502 #define EIB_LOGIN_TBL_WAIT 4
499 503 #define EIB_LOGIN_TBL_INPROG 5
500 504 #define EIB_LOGIN_TBL_DONE 6
501 505 #define EIB_LOGIN_TBL_FAILED 7
502 506 #define EIB_LOGIN_DONE 8
503 507 #define EIB_LOGIN_TIMED_OUT 9
504 508 #define EIB_LOGOUT_DONE 10
505 509
506 510 typedef struct eib_login_data_s {
507 511 ib_guid_t ld_gw_guid;
508 512 ib_lid_t ld_gw_lid;
509 513 uint_t ld_syndrome;
510 514 uint16_t ld_gw_port_id;
511 515 ib_qpn_t ld_gw_data_qpn;
512 516 ib_qpn_t ld_gw_ctl_qpn;
513 517 uint16_t ld_vnic_id; /* includes set msbit */
514 518 uint16_t ld_vhub_mtu;
515 519 uint16_t ld_vhub_pkey;
516 520 uint16_t ld_assigned_vlan;
517 521 uint8_t ld_gw_sl;
518 522 uint8_t ld_n_rss_mcgid;
519 523 uint8_t ld_n_mac_mcgid;
520 524 uint8_t ld_vnic_name[FIP_VNIC_NAME_LEN];
521 525 uint8_t ld_assigned_mac[ETHERADDRL];
522 526 uint8_t ld_gw_mgid_prefix[FIP_MGID_PREFIX_LEN];
523 527 uint8_t ld_vlan_in_packets;
524 528 uint32_t ld_vhub_id;
525 529 } eib_login_data_t;
526 530
527 531 #define EIB_UNICAST_MAC(mac) (((mac)[0] & 0x01) == 0)
528 532
529 533 /*
530 534 * Map to translate between DMAC and {qpn, lid, sl}
531 535 */
532 536 typedef struct eib_vhub_map_s {
533 537 struct eib_vhub_map_s *mp_next;
534 538 uint32_t mp_tusn;
535 539 ib_qpn_t mp_qpn;
536 540 ib_lid_t mp_lid;
537 541 uint8_t mp_mac[ETHERADDRL];
538 542 uint8_t mp_sl;
539 543 uint8_t mp_v_rss_type;
540 544 } eib_vhub_map_t;
541 545
542 546 /*
543 547 * Per-vNIC vHUB Table
544 548 */
545 549 #define EIB_TB_NBUCKETS 13
546 550 typedef struct eib_vhub_table_s {
547 551 kmutex_t tb_lock;
548 552 struct eib_vhub_map_s *tb_gateway;
549 553 struct eib_vhub_map_s *tb_unicast_miss;
550 554 struct eib_vhub_map_s *tb_vhub_multicast;
551 555 struct eib_vhub_map_s *tb_vnic_entry[EIB_TB_NBUCKETS];
552 556 struct eib_vhub_map_s *tb_mcast_entry[EIB_TB_NBUCKETS];
553 557
554 558 uint32_t tb_tusn;
555 559 uint8_t tb_eport_state;
556 560
557 561 uint16_t tb_entries_seen;
558 562 uint16_t tb_entries_in_table;
559 563 uint32_t tb_checksum;
560 564 } eib_vhub_table_t;
561 565
562 566 typedef struct eib_vhub_update_s {
563 567 kmutex_t up_lock;
564 568 eib_vhub_map_t *up_vnic_entry;
565 569 uint32_t up_tusn;
566 570 uint8_t up_eport_state;
567 571 } eib_vhub_update_t;
568 572
569 573 typedef struct eib_ether_hdr_s {
570 574 int eh_tagless;
571 575 uint16_t eh_ether_type;
572 576 uint16_t eh_vlan;
573 577 uint8_t eh_dmac[ETHERADDRL];
574 578 uint8_t eh_smac[ETHERADDRL];
575 579 } eib_ether_hdr_t;
576 580
577 581 /*
578 582 * vNIC Information
579 583 */
580 584 typedef struct eib_vnic_s {
581 585 struct eib_s *vn_ss;
582 586 eib_chan_t *vn_ctl_chan;
583 587 eib_chan_t *vn_data_chan;
584 588 int vn_instance;
585 589 uint16_t vn_vlan;
586 590 uint16_t vn_id;
587 591 uint8_t vn_macaddr[ETHERADDRL];
588 592 struct eib_login_data_s vn_login_data;
589 593
590 594 kmutex_t vn_lock;
591 595 kcondvar_t vn_cv;
592 596 uint_t vn_state;
593 597 struct eib_vhub_table_s *vn_vhub_table;
594 598 struct eib_vhub_update_s *vn_vhub_update;
595 599
596 600 ddi_softint_handle_t vn_ctl_si_hdl;
597 601 ddi_softint_handle_t vn_data_tx_si_hdl;
598 602 ddi_softint_handle_t vn_data_rx_si_hdl;
599 603 } eib_vnic_t;
600 604
601 605
602 606 /*
603 607 * Base NIC's mac state flags. The lock protects the starting/stopping
604 608 * bits. Access to the rest of the mac state is protected by these
605 609 * two bits.
606 610 */
607 611 #define EIB_NIC_STARTING 0x01
608 612 #define EIB_NIC_STOPPING 0x02
609 613 #define EIB_NIC_STARTED 0x80
610 614 #define EIB_NIC_RESTARTING (EIB_NIC_STARTING | EIB_NIC_STOPPING)
611 615
612 616 typedef struct eib_node_state_s {
613 617 kmutex_t ns_lock;
614 618 kcondvar_t ns_cv;
615 619 uint_t ns_nic_state;
616 620 link_state_t ns_link_state;
617 621 } eib_node_state_t;
618 622
619 623 /*
620 624 * MIB-II statistics to report to the mac layer
621 625 */
622 626 typedef struct eib_stats_s {
623 627 uint64_t st_obytes; /* bytes sent out */
624 628 uint64_t st_opkts; /* pkts sent out */
625 629 uint64_t st_brdcstxmit; /* broadcast pkts transmitted */
626 630 uint64_t st_multixmit; /* multicast pkts transmitted */
627 631 uint64_t st_oerrors; /* transmit errors */
628 632 uint64_t st_noxmitbuf; /* transmit pkts discarded */
629 633
630 634 uint64_t st_rbytes; /* bytes received */
631 635 uint64_t st_ipkts; /* pkts received */
632 636 uint64_t st_brdcstrcv; /* broadcast pkts received */
633 637 uint64_t st_multircv; /* multicast pkts received */
634 638 uint64_t st_ierrors; /* receive errors */
635 639 uint64_t st_norcvbuf; /* receive pkts discarded */
636 640 } eib_stats_t;
637 641
638 642 #define EIB_UPDATE_COUNTER(addr, val) (atomic_add_64((addr), (val)))
639 643 #define EIB_INCR_COUNTER(addr) (atomic_inc_64((addr)))
640 644 #define EIB_DECR_COUNTER(addr) (atomic_dec_64((addr)))
641 645
642 646 /*
643 647 * Cache of address vectors with dlid as the key. Currently we use
644 648 * eib state structure's ei_lock to protect the individual address
645 649 * vector's fields. This is a lock granularity that's slightly
646 650 * bigger than ideal, but it should do for now.
647 651 */
648 652 #define EIB_AV_NBUCKETS 17
649 653 typedef struct eib_avect_s {
650 654 struct eib_avect_s *av_next;
651 655 ibt_adds_vect_t av_vect;
652 656 uint_t av_ref;
653 657 } eib_avect_t;
654 658
655 659 /*
656 660 * vNIC creation and deletion are serialized by a non-zero value
657 661 * to the ei_vnic_state member (i.e. only one vnic may be created
658 662 * or deleted at a time). The code makes sure to access/update
659 663 * the ei_active_vnics member only after a successful setting of
660 664 * ei_vnic_state.
661 665 */
662 666 #define EIB_VN_BEING_CREATED 0x01
663 667 #define EIB_VN_BEING_DELETED 0x02
664 668 #define EIB_VN_BEING_MODIFIED (EIB_VN_BEING_CREATED | EIB_VN_BEING_DELETED)
665 669
666 670 /*
667 671 * All possible EoIB event work items that need to be handled
668 672 */
669 673 #define EIB_EV_NONE 0
670 674 #define EIB_EV_PORT_DOWN 1
671 675 #define EIB_EV_PORT_UP 2
672 676 #define EIB_EV_PKEY_CHANGE 3
673 677 #define EIB_EV_SGID_CHANGE 4
674 678 #define EIB_EV_CLNT_REREG 5
675 679 #define EIB_EV_GW_EPORT_DOWN 6
676 680 #define EIB_EV_GW_DOWN 7
677 681 #define EIB_EV_GW_UP 8
678 682 #define EIB_EV_GW_INFO_UPDATE 9
679 683 #define EIB_EV_MCG_DELETED 10
680 684 #define EIB_EV_MCG_CREATED 11
681 685 #define EIB_EV_SHUTDOWN 12
682 686
683 687 typedef struct eib_event_s {
684 688 struct eib_event_s *ev_next;
685 689 uint_t ev_code;
686 690 void *ev_arg;
687 691 } eib_event_t;
688 692
689 693 /*
690 694 * Work element for new vnic creation
691 695 */
692 696 typedef struct eib_vnic_req_s {
693 697 struct eib_vnic_req_s *vr_next;
694 698 uint_t vr_req;
695 699 uint8_t vr_mac[ETHERADDRL];
696 700 uint16_t vr_vlan;
697 701 } eib_vnic_req_t;
698 702
699 703 /*
700 704 * Values for vr_req
701 705 */
702 706 #define EIB_CR_REQ_NEW_VNIC 1
703 707 #define EIB_CR_REQ_FLUSH 2
704 708 #define EIB_CR_REQ_DIE 3
705 709
706 710 /*
707 711 * Work element for vnics kept alive by the keepalive manager thread
708 712 * and bitfield values for ei_ka_vnics_event.
709 713 */
710 714 typedef struct eib_ka_vnics_s {
711 715 struct eib_ka_vnics_s *ka_next;
712 716 struct eib_vnic_s *ka_vnic;
713 717 } eib_ka_vnics_t;
714 718
715 719 #define EIB_KA_VNICS_DIE 0x1
716 720 #define EIB_KA_VNICS_TIMED_OUT 0x2
717 721
718 722 /*
719 723 * EoIB per-instance state
720 724 */
721 725 typedef struct eib_s {
722 726 ibt_clnt_hdl_t ei_ibt_hdl;
723 727 ibt_hca_hdl_t ei_hca_hdl;
724 728 ibt_pd_hdl_t ei_pd_hdl;
725 729 mac_handle_t ei_mac_hdl;
726 730
727 731 ddi_softint_handle_t ei_admin_si_hdl;
728 732 ddi_callback_id_t ei_login_ack_cb;
729 733 ddi_callback_id_t ei_gw_alive_cb;
730 734 ddi_callback_id_t ei_gw_info_cb;
731 735
732 736 ibt_hca_attr_t *ei_hca_attrs;
733 737 dev_info_t *ei_dip;
734 738 uint_t ei_instance;
735 739
736 740 struct eib_gw_props_s *ei_gw_props;
737 741 struct eib_props_s *ei_props;
738 742 struct eib_caps_s *ei_caps;
739 743 struct eib_stats_s *ei_stats;
740 744
741 745 struct eib_node_state_s *ei_node_state;
742 746 struct eib_chan_s *ei_admin_chan;
743 747
744 748 struct eib_wqe_pool_s *ei_tx;
745 749 struct eib_wqe_pool_s *ei_rx;
746 750 struct eib_lsobkt_s *ei_lso;
747 751
748 752 kmutex_t ei_vnic_lock;
749 753 kcondvar_t ei_vnic_cv;
750 754 uint_t ei_vnic_state;
751 755 uint64_t ei_active_vnics;
752 756 uint64_t ei_zombie_vnics;
753 757 uint64_t ei_rejoin_vnics;
754 758 struct eib_vnic_s *ei_vnic[EIB_MAX_VNICS];
755 759 struct eib_vnic_s *ei_vnic_pending;
756 760 int64_t ei_gw_last_heartbeat;
757 761 boolean_t ei_gw_unreachable;
758 762 uint8_t ei_gw_eport_state;
759 763
760 764 kmutex_t ei_av_lock;
761 765 struct eib_avect_s *ei_av[EIB_AV_NBUCKETS];
762 766
763 767 kmutex_t ei_ev_lock;
764 768 kcondvar_t ei_ev_cv;
765 769 struct eib_event_s *ei_event;
766 770
767 771 kmutex_t ei_rxpost_lock;
768 772 kcondvar_t ei_rxpost_cv;
769 773 uint_t ei_rxpost_die;
770 774 struct eib_chan_s *ei_rxpost;
771 775
772 776 kmutex_t ei_vnic_req_lock;
773 777 kcondvar_t ei_vnic_req_cv;
774 778 struct eib_vnic_req_s *ei_vnic_req;
775 779 struct eib_vnic_req_s *ei_failed_vnic_req;
776 780 struct eib_vnic_req_s *ei_pending_vnic_req;
777 781
778 782 kmutex_t ei_ka_vnics_lock;
779 783 kcondvar_t ei_ka_vnics_cv;
780 784 uint_t ei_ka_vnics_event;
781 785 struct eib_ka_vnics_s *ei_ka_vnics;
782 786
783 787 kt_did_t ei_txwqe_monitor;
784 788 kt_did_t ei_lsobufs_monitor;
785 789 kt_did_t ei_rwqes_refiller;
786 790 kt_did_t ei_vnic_creator;
787 791 kt_did_t ei_events_handler;
788 792 kt_did_t ei_keepalives_manager;
789 793 } eib_t;
790 794
791 795 /*
792 796 * Private read-only datalink properties
793 797 */
794 798 #define EIB_DLPROP_GW_EPORT_STATE "_eib_eport_state"
795 799 #define EIB_DLPROP_HCA_GUID "_eib_hca_guid"
796 800 #define EIB_DLPROP_PORT_GUID "_eib_port_guid"
797 801
798 802 /*
799 803 * FUNCTION PROTOTYPES FOR CROSS-FILE LINKAGE
800 804 */
801 805
802 806 /*
803 807 * FIP protocol related
804 808 */
805 809 extern int eib_fip_login(eib_t *, eib_vnic_t *, int *);
806 810 extern int eib_fip_heartbeat(eib_t *, eib_vnic_t *, int *);
807 811 extern int eib_fip_vhub_table(eib_t *, eib_vnic_t *, int *);
808 812 extern int eib_fip_logout(eib_t *, eib_vnic_t *, int *);
809 813 extern int eib_fip_parse_login_ack(eib_t *, uint8_t *, eib_login_data_t *);
810 814 extern int eib_fip_parse_ctl_pkt(uint8_t *, eib_vnic_t *);
811 815
812 816 /*
813 817 * Service threads and other handlers
814 818 */
815 819 extern void eib_events_handler(eib_t *);
816 820 extern void eib_svc_enqueue_event(eib_t *, eib_event_t *);
817 821 extern void eib_refill_rwqes(eib_t *);
818 822 extern void eib_vnic_creator(eib_t *);
819 823 extern void eib_monitor_tx_wqes(eib_t *);
820 824 extern void eib_monitor_lso_bufs(eib_t *);
821 825 extern void eib_manage_keepalives(eib_t *);
822 826 extern void eib_stop_events_handler(eib_t *);
823 827 extern void eib_stop_refill_rwqes(eib_t *);
824 828 extern void eib_stop_vnic_creator(eib_t *);
825 829 extern void eib_stop_monitor_tx_wqes(eib_t *);
826 830 extern int eib_stop_monitor_lso_bufs(eib_t *, boolean_t);
827 831 extern void eib_stop_manage_keepalives(eib_t *);
828 832 extern void eib_flush_vnic_reqs(eib_t *);
829 833 extern void eib_gw_info_cb(dev_info_t *, ddi_eventcookie_t, void *, void *);
830 834 extern void eib_gw_alive_cb(dev_info_t *, ddi_eventcookie_t, void *, void *);
831 835 extern void eib_login_ack_cb(dev_info_t *, ddi_eventcookie_t, void *, void *);
832 836
833 837 /*
834 838 * Admin QP related
835 839 */
836 840 extern int eib_adm_setup_qp(eib_t *, int *);
837 841 extern uint_t eib_adm_comp_handler(caddr_t, caddr_t);
838 842 extern void eib_rb_adm_setup_qp(eib_t *);
839 843
840 844 /*
841 845 * Control QP related
842 846 */
843 847 extern int eib_ctl_create_qp(eib_t *, eib_vnic_t *, int *);
844 848 extern uint_t eib_ctl_comp_handler(caddr_t, caddr_t);
845 849 extern void eib_rb_ctl_create_qp(eib_t *, eib_vnic_t *);
846 850
847 851 /*
848 852 * Data QP related
849 853 */
850 854 extern int eib_data_create_qp(eib_t *, eib_vnic_t *, int *);
851 855 extern uint_t eib_data_rx_comp_handler(caddr_t, caddr_t);
852 856 extern uint_t eib_data_tx_comp_handler(caddr_t, caddr_t);
853 857 extern void eib_data_rx_recycle(caddr_t);
854 858 extern void eib_data_post_tx(eib_vnic_t *, eib_wqe_t *);
855 859 extern void eib_data_parse_ether_hdr(mblk_t *, eib_ether_hdr_t *);
856 860 extern int eib_data_lookup_vnic(eib_t *, uint8_t *, uint16_t, eib_vnic_t **,
857 861 boolean_t *);
858 862 extern int eib_data_prepare_frame(eib_vnic_t *, eib_wqe_t *, mblk_t *,
859 863 eib_ether_hdr_t *);
860 864 extern void eib_rb_data_create_qp(eib_t *, eib_vnic_t *);
861 865
862 866 /*
863 867 * Resource related
864 868 */
865 869 extern int eib_rsrc_setup_bufs(eib_t *, int *);
866 870 extern int eib_rsrc_grab_swqes(eib_t *, eib_wqe_t **, uint_t, uint_t *, int);
867 871 extern int eib_rsrc_grab_rwqes(eib_t *, eib_wqe_t **, uint_t, uint_t *, int);
868 872 extern int eib_rsrc_grab_lsobufs(eib_t *, uint_t, ibt_wr_ds_t *, uint32_t *);
869 873 extern eib_wqe_t *eib_rsrc_grab_swqe(eib_t *, int);
870 874 extern eib_wqe_t *eib_rsrc_grab_rwqe(eib_t *, int);
871 875 extern void eib_rsrc_return_swqe(eib_t *, eib_wqe_t *, eib_chan_t *);
872 876 extern void eib_rsrc_return_rwqe(eib_t *, eib_wqe_t *, eib_chan_t *);
873 877 extern void eib_rsrc_return_lsobufs(eib_t *, ibt_wr_ds_t *, uint32_t);
874 878 extern void eib_rsrc_decr_posted_swqe(eib_t *, eib_chan_t *);
875 879 extern void eib_rsrc_decr_posted_rwqe(eib_t *, eib_chan_t *);
876 880 extern void eib_rsrc_txwqes_needed(eib_t *);
877 881 extern void eib_rsrc_lsobufs_needed(eib_t *);
878 882 extern boolean_t eib_rsrc_rxpool_low(eib_wqe_t *);
879 883 extern void eib_rb_rsrc_setup_bufs(eib_t *, boolean_t);
880 884
881 885 /*
882 886 * IBT related
883 887 */
884 888 extern int eib_ibt_hca_init(eib_t *);
885 889 extern void eib_ibt_link_mod(eib_t *);
886 890 extern int eib_ibt_modify_chan_pkey(eib_t *, eib_chan_t *, ib_pkey_t);
887 891 extern eib_avect_t *eib_ibt_hold_avect(eib_t *, ib_lid_t, uint8_t);
888 892 extern void eib_ibt_release_avect(eib_t *, eib_avect_t *);
889 893 extern void eib_ibt_free_avects(eib_t *);
890 894 extern void eib_ibt_async_handler(void *, ibt_hca_hdl_t, ibt_async_code_t,
891 895 ibt_async_event_t *);
892 896 extern void eib_ibt_record_capab(eib_t *, ibt_hca_attr_t *, eib_caps_t *);
893 897 extern void eib_rb_ibt_hca_init(eib_t *, uint_t);
894 898
895 899 /*
896 900 * Chan related
897 901 */
898 902 extern eib_chan_t *eib_chan_init(void);
899 903 extern void eib_chan_fini(eib_chan_t *);
900 904 extern int eib_chan_post_rx(eib_t *, eib_chan_t *, uint_t *);
901 905 extern int eib_chan_post_recv(eib_t *, eib_chan_t *, eib_wqe_t *);
902 906
903 907 /*
904 908 * Mac layer related
905 909 */
906 910 extern void eib_mac_set_nic_state(eib_t *, uint_t);
907 911 extern void eib_mac_clr_nic_state(eib_t *, uint_t);
908 912 extern void eib_mac_upd_nic_state(eib_t *, uint_t, uint_t);
909 913 extern uint_t eib_mac_get_nic_state(eib_t *);
910 914 extern void eib_mac_link_state(eib_t *, link_state_t, boolean_t);
911 915 extern void eib_mac_link_down(eib_t *, boolean_t);
912 916 extern void eib_mac_link_up(eib_t *, boolean_t);
913 917 extern int eib_mac_start(eib_t *);
914 918 extern void eib_mac_stop(eib_t *);
915 919 extern int eib_mac_multicast(eib_t *, boolean_t, uint8_t *);
916 920 extern int eib_mac_promisc(eib_t *, boolean_t);
917 921 extern int eib_mac_tx(eib_t *, mblk_t *);
918 922 extern int eib_mac_hca_portstate(eib_t *, ib_lid_t *, int *);
919 923
920 924 /*
921 925 * VNIC related
922 926 */
923 927 extern int eib_vnic_create(eib_t *, uint8_t *, uint16_t, eib_vnic_t **, int *);
924 928 extern void eib_vnic_delete(eib_t *, eib_vnic_t *);
925 929 extern int eib_vnic_wait_for_login_ack(eib_t *, eib_vnic_t *, int *);
926 930 extern void eib_vnic_login_ack(eib_t *, eib_login_data_t *);
927 931 extern int eib_vnic_wait_for_table(eib_t *, eib_vnic_t *, int *);
928 932 extern void eib_vnic_vhub_table_done(eib_vnic_t *, uint_t);
929 933 extern int eib_vnic_join_data_mcg(eib_t *, eib_vnic_t *, uint8_t *,
930 934 boolean_t, int *);
931 935 extern int eib_vnic_setup_dest(eib_vnic_t *, eib_wqe_t *, uint8_t *, uint16_t);
932 936 extern void eib_vnic_leave_data_mcg(eib_t *, eib_vnic_t *, uint8_t *);
933 937 extern void eib_vnic_init_tables(eib_t *, eib_vnic_t *);
934 938 extern void eib_vnic_fini_tables(eib_t *, eib_vnic_t *, boolean_t);
935 939 extern eib_chan_t *eib_vnic_get_data_chan(eib_t *, int);
936 940 extern void eib_vnic_need_new(eib_t *, uint8_t *, uint16_t);
937 941 extern void eib_vnic_enqueue_req(eib_t *, eib_vnic_req_t *);
938 942 extern void eib_vnic_resurrect_zombies(eib_t *, uint8_t *);
939 943 extern void eib_vnic_restart(eib_t *, int, uint8_t *);
940 944 extern void eib_vnic_rejoin_mcgs(eib_t *);
941 945 extern void eib_rb_vnic_create(eib_t *, eib_vnic_t *, uint_t);
942 946
943 947 /*
944 948 * Logging and other stuff
945 949 */
946 950 extern void eib_debug_init(void);
947 951 extern void eib_debug_fini(void);
948 952 extern void eib_dprintf_crit(int, const char *fmt, ...);
949 953 extern void eib_dprintf_err(int, const char *fmt, ...);
950 954 extern void eib_dprintf_warn(int, const char *fmt, ...);
951 955 #ifdef EIB_DEBUG
952 956 extern void eib_dprintf_debug(int, const char *fmt, ...);
953 957 extern void eib_dprintf_args(int, const char *fmt, ...);
954 958 extern void eib_dprintf_pkt(int, uint8_t *, uint_t);
955 959 extern void eib_dprintf_verbose(int, const char *fmt, ...);
956 960 #endif
957 961 extern int eib_get_props(eib_t *);
958 962 extern void eib_update_props(eib_t *, eib_gw_info_t *);
959 963 extern void eib_rb_get_props(eib_t *);
960 964
961 965 /*
962 966 * EoIB specific global variables
963 967 */
964 968 extern ib_gid_t eib_reserved_gid;
965 969 extern uint8_t eib_zero_mac[];
966 970 extern uint8_t eib_broadcast_mac[];
967 971 extern int eib_setbit_mod67[];
968 972 extern char *eib_pvt_props[];
969 973
970 974 /*
971 975 * HW/FW workarounds
972 976 */
973 977 extern int eib_wa_no_desc_list_len;
974 978 extern int eib_wa_no_cksum_offload;
975 979 extern int eib_wa_no_lso;
976 980 extern int eib_wa_no_mcast_entries;
977 981 extern int eib_wa_no_av_discover;
978 982 extern int eib_wa_no_good_vp_flag;
979 983 extern int eib_wa_no_good_vhub_cksum;
980 984
981 985 /*
982 986 * Miscellaneous externs
983 987 */
984 988 extern void freemsgchain(mblk_t *);
985 989 extern pri_t minclsyspri;
986 990
987 991 #ifdef __cplusplus
988 992 }
989 993 #endif
990 994
991 995 #endif /* _SYS_IB_EOIB_EIB_IMPL_H */
↓ open down ↓ |
887 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX