27 #define BFA_FCS_OS_STR_LEN 64
59 #define __fcs_min_cfg(__fcs) ((__fcs)->min_cfg)
61 #define BFA_FCS_BRCD_SWITCH_OUI 0x051e
62 #define N2N_LOCAL_PID 0x010000
63 #define N2N_REMOTE_PID 0x020000
64 #define BFA_FCS_RETRY_TIMEOUT 2000
65 #define BFA_FCS_MAX_NS_RETRIES 5
66 #define BFA_FCS_PID_IS_WKA(pid) ((bfa_ntoh3b(pid) > 0xFFF000) ? 1 : 0)
67 #define BFA_FCS_MAX_RPORT_LOGINS 1024
118 #define MAX_ALPA_COUNT 127
161 #define BFA_FCS_GET_HAL_FROM_PORT(port) (port->fcs->bfa)
162 #define BFA_FCS_GET_NS_FROM_PORT(port) (&port->port_topo.pfab.ns)
163 #define BFA_FCS_GET_SCN_FROM_PORT(port) (&port->port_topo.pfab.scn)
164 #define BFA_FCS_GET_MS_FROM_PORT(port) (&port->port_topo.pfab.ms)
165 #define BFA_FCS_GET_FDMI_FROM_PORT(port) (&port->port_topo.pfab.ms.fdmi)
166 #define BFA_FCS_VPORT_IS_INITIATOR_MODE(port) \
167 (port->port_cfg.roles & BFA_LPORT_ROLE_FCP_IM)
214 #define bfa_fcs_fabric_npiv_capable(__f) ((__f)->is_npiv)
215 #define bfa_fcs_fabric_is_switched(__f) \
216 ((__f)->fab_type == BFA_FCS_FABRIC_SWITCHED)
221 #define bfa_fcs_vf_t struct bfa_fcs_fabric_s
234 #define BFA_FCS_MAX_RPORTS_SUPP 256
236 #define bfa_fcs_lport_t struct bfa_fcs_lport_s
253 #define BFA_FCS_PORT_SYMBNAME_SEPARATOR " | "
255 #define BFA_FCS_PORT_SYMBNAME_MODEL_SZ 12
256 #define BFA_FCS_PORT_SYMBNAME_VERSION_SZ 10
257 #define BFA_FCS_PORT_SYMBNAME_MACHINENAME_SZ 30
258 #define BFA_FCS_PORT_SYMBNAME_OSINFO_SZ 48
259 #define BFA_FCS_PORT_SYMBNAME_OSPATCH_SZ 16
262 #define BFA_FCS_PORT_DEF_BB_SCN 3
267 #define bfa_fcs_lport_get_fcid(_lport) ((_lport)->pid)
268 #define bfa_fcs_lport_get_pwwn(_lport) ((_lport)->port_cfg.pwwn)
269 #define bfa_fcs_lport_get_nwwn(_lport) ((_lport)->port_cfg.nwwn)
270 #define bfa_fcs_lport_get_psym_name(_lport) ((_lport)->port_cfg.sym_name)
271 #define bfa_fcs_lport_get_nsym_name(_lport) ((_lport)->port_cfg.node_sym_name)
272 #define bfa_fcs_lport_is_initiator(_lport) \
273 ((_lport)->port_cfg.roles & BFA_LPORT_ROLE_FCP_IM)
274 #define bfa_fcs_lport_get_nrports(_lport) \
275 ((_lport) ? (_lport)->num_rports : 0)
283 #define bfa_fcs_lport_get_opertype(_lport) ((_lport)->fabric->oper_type)
284 #define bfa_fcs_lport_get_fabric_name(_lport) ((_lport)->fabric->fabric_name)
285 #define bfa_fcs_lport_get_fabric_ipaddr(_lport) \
286 ((_lport)->fabric->fabric_ip_addr)
370 #define bfa_fcs_vport_get_port(vport) \
371 ((struct bfa_fcs_lport_s *)(&vport->port))
400 #define BFA_FCS_RPORT_DEF_DEL_TIMEOUT 90
401 #define BFA_FCS_RPORT_MAX_RETRIES (5)
409 struct bfa_fcs_tin_s;
410 struct bfa_fcs_iprp_s;
448 struct bfa_fcs_tin_s *
tin;
523 #define bfa_fcs_fcxp_alloc(__fcs, __req) \
524 bfa_fcxp_req_rsp_alloc(NULL, (__fcs)->bfa, 0, 0, \
525 NULL, NULL, NULL, NULL, __req)
526 #define bfa_fcs_fcxp_alloc_wait(__bfa, __wqe, __alloc_cbfn, \
527 __alloc_cbarg, __req) \
528 bfa_fcxp_req_rsp_alloc_wait(__bfa, __wqe, __alloc_cbfn, \
529 __alloc_cbarg, NULL, 0, 0, NULL, NULL, NULL, NULL, __req)
534 return itnim->
rport->port->bfad_port;
541 return itnim->
rport->port;
548 return itnim->
rport->nwwn;
555 return itnim->
rport->pwwn;
562 return itnim->
rport->pid;
569 return itnim->
rport->maxfrsize;
576 return itnim->
rport->fc_cos;
617 #define BFA_FCS_FDMI_SUPP_SPEEDS_4G (FDMI_TRANS_SPEED_1G | \
618 FDMI_TRANS_SPEED_2G | \
621 #define BFA_FCS_FDMI_SUPP_SPEEDS_8G (FDMI_TRANS_SPEED_1G | \
622 FDMI_TRANS_SPEED_2G | \
623 FDMI_TRANS_SPEED_4G | \
626 #define BFA_FCS_FDMI_SUPP_SPEEDS_16G (FDMI_TRANS_SPEED_2G | \
627 FDMI_TRANS_SPEED_4G | \
628 FDMI_TRANS_SPEED_8G | \
629 FDMI_TRANS_SPEED_16G)
631 #define BFA_FCS_FDMI_SUPP_SPEEDS_10G FDMI_TRANS_SPEED_10G