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