1
2
3
4
5
6
7
8
9
10
11 #ifndef __BFA_DEFS_FCS_H__
12 #define __BFA_DEFS_FCS_H__
13
14 #include "bfa_fc.h"
15 #include "bfa_defs_svc.h"
16
17
18
19
20 enum bfa_vf_state {
21 BFA_VF_UNINIT = 0,
22 BFA_VF_LINK_DOWN = 1,
23 BFA_VF_FLOGI = 2,
24 BFA_VF_AUTH = 3,
25 BFA_VF_NOFABRIC = 4,
26 BFA_VF_ONLINE = 5,
27 BFA_VF_EVFP = 6,
28 BFA_VF_ISOLATED = 7,
29 };
30
31
32
33
34 struct bfa_vf_stats_s {
35 u32 flogi_sent;
36 u32 flogi_rsp_err;
37 u32 flogi_acc_err;
38 u32 flogi_accepts;
39 u32 flogi_rejects;
40 u32 flogi_unknown_rsp;
41 u32 flogi_alloc_wait;
42 u32 flogi_rcvd;
43 u32 flogi_rejected;
44 u32 fabric_onlines;
45
46 u32 fabric_offlines;
47
48 u32 resvd;
49 };
50
51
52
53
54 struct bfa_vf_attr_s {
55 enum bfa_vf_state state;
56 u32 rsvd;
57 wwn_t fabric_name;
58 };
59
60 #define BFA_FCS_MAX_LPORTS 256
61 #define BFA_FCS_FABRIC_IPADDR_SZ 16
62
63
64
65
66 #define BFA_SYMNAME_MAXLEN 128
67 struct bfa_lport_symname_s {
68 char symname[BFA_SYMNAME_MAXLEN];
69 };
70
71
72
73
74
75
76
77 enum bfa_lport_role {
78 BFA_LPORT_ROLE_FCP_IM = 0x01,
79 BFA_LPORT_ROLE_FCP_MAX = BFA_LPORT_ROLE_FCP_IM,
80 };
81
82
83
84
85 struct bfa_lport_cfg_s {
86 wwn_t pwwn;
87 wwn_t nwwn;
88 struct bfa_lport_symname_s sym_name;
89 struct bfa_lport_symname_s node_sym_name;
90 enum bfa_lport_role roles;
91 u32 rsvd;
92 bfa_boolean_t preboot_vp;
93 u8 tag[16];
94 u8 padding[4];
95 };
96
97
98
99
100 enum bfa_lport_state {
101 BFA_LPORT_UNINIT = 0,
102 BFA_LPORT_FDISC = 1,
103 BFA_LPORT_ONLINE = 2,
104 BFA_LPORT_OFFLINE = 3,
105 };
106
107
108
109
110 enum bfa_lport_type {
111 BFA_LPORT_TYPE_PHYSICAL = 0,
112 BFA_LPORT_TYPE_VIRTUAL,
113 };
114
115
116
117
118 enum bfa_lport_offline_reason {
119 BFA_LPORT_OFFLINE_UNKNOWN = 0,
120 BFA_LPORT_OFFLINE_LINKDOWN,
121 BFA_LPORT_OFFLINE_FAB_UNSUPPORTED,
122
123 BFA_LPORT_OFFLINE_FAB_NORESOURCES,
124 BFA_LPORT_OFFLINE_FAB_LOGOUT,
125 };
126
127
128
129
130 struct bfa_lport_info_s {
131 u8 port_type;
132
133 u8 port_state;
134 u8 offline_reason;
135
136 wwn_t port_wwn;
137 wwn_t node_wwn;
138
139
140
141
142 u32 max_vports_supp;
143 u32 num_vports_inuse;
144 u32 max_rports_supp;
145 u32 num_rports_inuse;
146
147 };
148
149
150
151
152 struct bfa_lport_stats_s {
153 u32 ns_plogi_sent;
154 u32 ns_plogi_rsp_err;
155 u32 ns_plogi_acc_err;
156 u32 ns_plogi_accepts;
157 u32 ns_rejects;
158 u32 ns_plogi_unknown_rsp;
159 u32 ns_plogi_alloc_wait;
160
161 u32 ns_retries;
162 u32 ns_timeouts;
163
164 u32 ns_rspnid_sent;
165 u32 ns_rspnid_accepts;
166 u32 ns_rspnid_rsp_err;
167 u32 ns_rspnid_rejects;
168 u32 ns_rspnid_alloc_wait;
169
170 u32 ns_rftid_sent;
171 u32 ns_rftid_accepts;
172 u32 ns_rftid_rsp_err;
173 u32 ns_rftid_rejects;
174 u32 ns_rftid_alloc_wait;
175
176 u32 ns_rffid_sent;
177 u32 ns_rffid_accepts;
178 u32 ns_rffid_rsp_err;
179 u32 ns_rffid_rejects;
180 u32 ns_rffid_alloc_wait;
181
182 u32 ns_gidft_sent;
183 u32 ns_gidft_accepts;
184 u32 ns_gidft_rsp_err;
185 u32 ns_gidft_rejects;
186 u32 ns_gidft_unknown_rsp;
187 u32 ns_gidft_alloc_wait;
188
189 u32 ns_rnnid_sent;
190 u32 ns_rnnid_accepts;
191 u32 ns_rnnid_rsp_err;
192 u32 ns_rnnid_rejects;
193 u32 ns_rnnid_alloc_wait;
194
195 u32 ns_rsnn_nn_sent;
196 u32 ns_rsnn_nn_accepts;
197 u32 ns_rsnn_nn_rsp_err;
198 u32 ns_rsnn_nn_rejects;
199 u32 ns_rsnn_nn_alloc_wait;
200
201
202
203
204 u32 ms_retries;
205 u32 ms_timeouts;
206 u32 ms_plogi_sent;
207 u32 ms_plogi_rsp_err;
208 u32 ms_plogi_acc_err;
209 u32 ms_plogi_accepts;
210 u32 ms_rejects;
211 u32 ms_plogi_unknown_rsp;
212 u32 ms_plogi_alloc_wait;
213
214 u32 num_rscn;
215 u32 num_portid_rscn;
216
217
218 u32 uf_recvs;
219 u32 uf_recv_drops;
220
221 u32 plogi_rcvd;
222 u32 prli_rcvd;
223 u32 adisc_rcvd;
224 u32 prlo_rcvd;
225 u32 logo_rcvd;
226 u32 rpsc_rcvd;
227 u32 un_handled_els_rcvd;
228 u32 rport_plogi_timeouts;
229 u32 rport_del_max_plogi_retry;
230
231 };
232
233
234
235
236 struct bfa_lport_attr_s {
237 enum bfa_lport_state state;
238 u32 pid;
239 struct bfa_lport_cfg_s port_cfg;
240 enum bfa_port_type port_type;
241 u32 loopback;
242 wwn_t fabric_name;
243 u8 fabric_ip_addr[BFA_FCS_FABRIC_IPADDR_SZ];
244
245 mac_t fpma_mac;
246 u16 authfail;
247 };
248
249
250
251
252
253 enum bfa_vport_state {
254 BFA_FCS_VPORT_UNINIT = 0,
255 BFA_FCS_VPORT_CREATED = 1,
256 BFA_FCS_VPORT_OFFLINE = 1,
257 BFA_FCS_VPORT_FDISC_SEND = 2,
258 BFA_FCS_VPORT_FDISC = 3,
259 BFA_FCS_VPORT_FDISC_RETRY = 4,
260 BFA_FCS_VPORT_FDISC_RSP_WAIT = 5,
261 BFA_FCS_VPORT_ONLINE = 6,
262 BFA_FCS_VPORT_DELETING = 7,
263 BFA_FCS_VPORT_CLEANUP = 8,
264 BFA_FCS_VPORT_LOGO_SEND = 9,
265 BFA_FCS_VPORT_LOGO = 10,
266 BFA_FCS_VPORT_ERROR = 11,
267 BFA_FCS_VPORT_MAX_STATE,
268 };
269
270
271
272
273 struct bfa_vport_stats_s {
274 struct bfa_lport_stats_s port_stats;
275
276
277
278
279 u32 fdisc_sent;
280 u32 fdisc_accepts;
281 u32 fdisc_retries;
282 u32 fdisc_timeouts;
283 u32 fdisc_rsp_err;
284 u32 fdisc_acc_bad;
285 u32 fdisc_rejects;
286 u32 fdisc_unknown_rsp;
287
288
289
290 u32 fdisc_alloc_wait;
291
292 u32 logo_alloc_wait;
293 u32 logo_sent;
294 u32 logo_accepts;
295 u32 logo_rejects;
296 u32 logo_rsp_err;
297 u32 logo_unknown_rsp;
298
299
300 u32 fab_no_npiv;
301
302 u32 fab_offline;
303 u32 fab_online;
304 u32 fab_cleanup;
305 u32 rsvd;
306 };
307
308
309
310
311 struct bfa_vport_attr_s {
312 struct bfa_lport_attr_s port_attr;
313 enum bfa_vport_state vport_state;
314 u32 rsvd;
315 };
316
317
318
319
320 enum bfa_rport_state {
321 BFA_RPORT_UNINIT = 0,
322 BFA_RPORT_OFFLINE = 1,
323 BFA_RPORT_PLOGI = 2,
324 BFA_RPORT_ONLINE = 3,
325 BFA_RPORT_PLOGI_RETRY = 4,
326 BFA_RPORT_NSQUERY = 5,
327 BFA_RPORT_ADISC = 6,
328 BFA_RPORT_LOGO = 7,
329 BFA_RPORT_LOGORCV = 8,
330 BFA_RPORT_NSDISC = 9,
331 };
332
333
334
335
336 enum bfa_rport_function {
337 BFA_RPORT_INITIATOR = 0x01,
338 BFA_RPORT_TARGET = 0x02,
339 };
340
341
342
343
344 #define BFA_RPORT_SYMNAME_MAXLEN 255
345 struct bfa_rport_symname_s {
346 char symname[BFA_RPORT_SYMNAME_MAXLEN];
347 };
348
349
350
351
352 struct bfa_rport_stats_s {
353 u32 offlines;
354 u32 onlines;
355 u32 rscns;
356 u32 plogis;
357 u32 plogi_accs;
358 u32 plogi_timeouts;
359 u32 plogi_rejects;
360 u32 plogi_failed;
361 u32 plogi_rcvd;
362 u32 prli_rcvd;
363 u32 adisc_rcvd;
364 u32 adisc_rejects;
365 u32 adisc_sent;
366 u32 adisc_accs;
367 u32 adisc_failed;
368 u32 adisc_rejected;
369 u32 logos;
370 u32 logo_accs;
371 u32 logo_failed;
372 u32 logo_rejected;
373 u32 logo_rcvd;
374
375 u32 rpsc_rcvd;
376 u32 rpsc_rejects;
377 u32 rpsc_sent;
378 u32 rpsc_accs;
379 u32 rpsc_failed;
380 u32 rpsc_rejected;
381
382 u32 rjt_insuff_res;
383 struct bfa_rport_hal_stats_s hal_stats;
384 };
385
386
387
388
389 struct bfa_rport_attr_s {
390 wwn_t nwwn;
391 wwn_t pwwn;
392 enum fc_cos cos_supported;
393 u32 pid;
394 u32 df_sz;
395 enum bfa_rport_state state;
396 enum fc_cos fc_cos;
397 bfa_boolean_t cisc;
398 struct bfa_rport_symname_s symname;
399 enum bfa_rport_function scsi_function;
400 struct bfa_rport_qos_attr_s qos_attr;
401 enum bfa_port_speed curr_speed;
402
403
404 bfa_boolean_t trl_enforced;
405 enum bfa_port_speed assigned_speed;
406
407
408 };
409
410 struct bfa_rport_remote_link_stats_s {
411 u32 lfc;
412 u32 lsyc;
413 u32 lsic;
414 u32 pspec;
415 u32 itwc;
416 u32 icc;
417 };
418
419 struct bfa_rport_qualifier_s {
420 wwn_t pwwn;
421 u32 pid;
422 u32 rsvd;
423 };
424
425 #define BFA_MAX_IO_INDEX 7
426 #define BFA_NO_IO_INDEX 9
427
428
429
430
431 enum bfa_itnim_state {
432 BFA_ITNIM_OFFLINE = 0,
433 BFA_ITNIM_PRLI_SEND = 1,
434 BFA_ITNIM_PRLI_SENT = 2,
435 BFA_ITNIM_PRLI_RETRY = 3,
436 BFA_ITNIM_HCB_ONLINE = 4,
437 BFA_ITNIM_ONLINE = 5,
438 BFA_ITNIM_HCB_OFFLINE = 6,
439 BFA_ITNIM_INITIATIOR = 7,
440 };
441
442
443
444
445 struct bfa_itnim_stats_s {
446 u32 onlines;
447 u32 offlines;
448 u32 prli_sent;
449 u32 fcxp_alloc_wait;
450 u32 prli_rsp_err;
451 u32 prli_rsp_acc;
452 u32 initiator;
453 u32 prli_rsp_parse_err;
454 u32 prli_rsp_rjt;
455 u32 timeout;
456 u32 sler;
457 u32 rsvd;
458 };
459
460
461
462
463 struct bfa_itnim_attr_s {
464 enum bfa_itnim_state state;
465 u8 retry;
466 u8 task_retry_id;
467 u8 rec_support;
468 u8 conf_comp;
469 };
470
471 #endif