Emulex Logo
OneCoreā„¢ Storage SDK Release 11.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ocs_fabric.c File Reference
#include "ocs.h"
#include "ocs_fabric.h"
#include "ocs_els.h"
#include "ocs_device.h"

Go to the source code of this file.

Detailed Description

This file implements remote node state machines for:

  • Fabric logins.
  • Fabric controller events.
  • Name/directory services interaction.
  • Point-to-point logins.

Definition in file ocs_fabric.c.

Macros

#define FDMI_ATTR_TYPE_LEN_SIZE   4
 
#define OCS_MAX_CT_SIZE   (60 * 4096)
 
#define OCS_PORTSPEED_1GFC   0x00000001 /* 1G FC */
 
#define OCS_PORTSPEED_2GFC   0x00000002 /* 2G FC */
 
#define OCS_PORTSPEED_4GFC   0x00000008 /* 4G FC */
 
#define OCS_PORTSPEED_8GFC   0x00000010 /* 8G FC */
 
#define OCS_PORTSPEED_16GFC   0x00000020 /* 16G FC */
 
#define OCS_PORTSPEED_32GFC   0x00000040 /* 32G FC */
 
#define OCS_PORTSPEED_64GFC   0x00000400 /* 64G FC */
 
#define OCS_PORTSPEED_128GFC   0x00000200 /* 128G FC*/
 
#define OCS_PORTSPEED_UNKNOWN   0x00008000 /* Unknown*/
 
#define OCS_FDMI_PORTTYPE_UNKNOWN   0
 
#define OCS_FDMI_PORTTYPE_NPORT   1
 
#define OCS_FDMI_PORTTYPE_NLPORT   2
 
#define OCS_FDMI_PORTSTATE_OFFLINE   1
 
#define OCS_FDMI_PORTSTATE_ONLINE   2
 

Functions

static void ocs_fabric_initiate_shutdown (ocs_node_t *node)
 Initiate fabric node shutdown. More...
 
static void * __ocs_fabric_common (const char *funcname, ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Fabric node state machine: Handle the common fabric node events. More...
 
static int32_t ocs_start_ns_node (ocs_sport_t *sport)
 Start up the name services node. More...
 
static int32_t ocs_start_fdmi_node (ocs_sport_t *sport)
 Start up the FDMI node. More...
 
static int32_t ocs_start_fabctl_node (ocs_sport_t *sport)
 Start up the fabric controller node. More...
 
static int32_t ocs_process_gidpt_payload (ocs_node_t *node, fcct_gidpt_acc_t *gidpt, uint32_t gidpt_len)
 Process the GIDPT payload. More...
 
static void ocs_process_rscn (ocs_node_t *node, ocs_node_cb_t *cbdata)
 Process the FABCTL node RSCN. More...
 
static uint64_t ocs_get_wwpn (fc_plogi_payload_t *sp)
 Return the node's WWPN as an uint64_t. More...
 
static void gidpt_delay_timer_cb (void *arg)
 Handle GIDPT delay timer callback. More...
 
static void * __ocs_fdmi_get_cmd_wait_rsp (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Fabric node state machine: Wait for FDMI response event. More...
 
void * __ocs_fabric_init (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Fabric node state machine: Initial state. More...
 
void ocs_fabric_set_topology (ocs_node_t *node, ocs_sport_topology_e topology)
 Set sport topology. More...
 
void ocs_fabric_notify_topology (ocs_node_t *node)
 Notify sport topology. More...
 
void * __ocs_fabric_flogi_wait_rsp (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Fabric node state machine: Wait for an FLOGI response. More...
 
void * __ocs_vport_fabric_init (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Fabric node state machine: Initial state for a virtual port. More...
 
void * __ocs_fabric_fdisc_wait_rsp (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Fabric node state machine: Wait for an FDISC response. More...
 
void * __ocs_fabric_wait_domain_attach (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Fabric node state machine: Wait for a domain/sport attach event. More...
 
void * __ocs_fabric_idle (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Fabric node state machine: Fabric node is idle. More...
 
void * __ocs_ns_init (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Name services node state machine: Initialize. More...
 
void * __ocs_ns_plogi_wait_rsp (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Name services node state machine: Wait for a PLOGI response. More...
 
void * __ocs_ns_wait_node_attach (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Name services node state machine: Wait for a node attach completion. More...
 
void * __ocs_fdmi_init (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 FDMI node state machine: Initialize. More...
 
void * __ocs_fdmi_plogi_wait_rsp (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 FDMI node state machine: Wait for a PLOGI response. More...
 
void * __ocs_fdmi_wait_node_attach (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 FDMI node state machine: Wait for a node attach completion. More...
 
void * __ocs_fabric_wait_attach_evt_shutdown (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Wait for a domain/sport/node attach completion, then shutdown. More...
 
void * __ocs_ns_rftid_wait_rsp (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Name services node state machine: Wait for an RFTID response event. More...
 
void * __ocs_ns_nvme_rffid_wait_rsp (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 
void * __ocs_ns_rffid_wait_rsp (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Fabric node state machine: Wait for RFFID response event. More...
 
void * __ocs_ns_gidpt_wait_rsp (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Name services node state machine: Wait for a GIDPT response. More...
 
void * __ocs_ns_ganxt_wait_rsp (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 
void * __ocs_ns_idle (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Name services node state machine: Idle state. More...
 
void * __ocs_fdmi_idle (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 FDMI node state machine: FDMI node is idle. More...
 
void * __ocs_ns_gidpt_delay (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Name services node state machine: Delayed GIDPT. More...
 
void * __ocs_fabctl_init (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Fabric controller node state machine: Initial state. More...
 
void * __ocs_fabctl_wait_node_attach (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Fabric controller node state machine: Wait for a node attach request to complete. More...
 
void * __ocs_fabctl_wait_scr_rsp (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Fabric controller node state machine: Wait for an SCR response from the fabric controller. More...
 
void * __ocs_fabctl_ready (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Fabric controller node state machine: Ready. More...
 
void * __ocs_fabctl_wait_ls_acc_cmpl (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Fabric controller node state machine: Wait for LS_ACC. More...
 
int32_t ocs_rnode_is_nport (fc_plogi_payload_t *remote_sparms)
 Return TRUE if the remote node is an NPORT. More...
 
static int32_t ocs_rnode_is_winner (ocs_sport_t *sport)
 Return TRUE if the remote node is the point-to-point winner. More...
 
void * __ocs_p2p_wait_domain_attach (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Point-to-point state machine: Wait for the domain attach to complete. More...
 
void * __ocs_p2p_rnode_init (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Point-to-point state machine: Remote node initialization state. More...
 
void * __ocs_p2p_wait_flogi_acc_cmpl (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Point-to-point node state machine: Wait for the FLOGI accept completion. More...
 
void * __ocs_p2p_wait_plogi_rsp (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Point-to-point node state machine: Wait for a PLOGI response as a point-to-point winner. More...
 
void * __ocs_p2p_wait_plogi_rsp_recvd_prli (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Point-to-point node state machine: Waiting on a response for a sent PLOGI. More...
 
void * __ocs_p2p_wait_node_attach (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Point-to-point node state machine: Wait for a point-to-point node attach to complete. More...
 
int32_t ocs_process_fdmi_grhl_payload (ocs_node_t *node, fcct_fdmi_grhl_rsp_t *grhl, uint32_t grhl_len, void *buf)
 Process the GRHL acc payload. More...
 
int32_t ocs_process_fdmi_grpl_payload (ocs_node_t *node, fcct_fdmi_grpl_rsp_t *grpl, uint32_t grpl_len, void *buf)
 Process the GRPL acc payload. More...
 
int32_t ocs_process_fdmi_ghat_payload (ocs_node_t *node, fcct_fdmi_ghat_rsp_t *ghat, uint32_t ghat_len, void *buf)
 Process the GHAT acc payload. More...
 
int32_t ocs_process_fdmi_gpat_payload (ocs_node_t *node, fcct_fdmi_gpat_rsp_t *gpat, uint32_t gpat_len, void *buf)
 Process the GPAT acc payload. More...
 
int32_t ocs_p2p_setup (ocs_sport_t *sport)
 Set up the domain point-to-point parameters. More...
 
int ocs_fdmi_hba_attr_wwnn (ocs_sport_t *sport, ocs_fdmi_attr_def_t *ad)
 
int ocs_fdmi_hba_attr_manufacturer (ocs_sport_t *sport, ocs_fdmi_attr_def_t *ad)
 
int ocs_fdmi_hba_attr_sn (ocs_sport_t *sport, ocs_fdmi_attr_def_t *ad)
 
int ocs_fdmi_hba_attr_model (ocs_sport_t *sport, ocs_fdmi_attr_def_t *ad)
 
int ocs_fdmi_hba_attr_description (ocs_sport_t *sport, ocs_fdmi_attr_def_t *ad)
 
int ocs_fdmi_hba_attr_drvr_ver (ocs_sport_t *sport, ocs_fdmi_attr_def_t *ad)
 
int ocs_fdmi_hba_attr_rom_ver (ocs_sport_t *sport, ocs_fdmi_attr_def_t *ad)
 
int ocs_fdmi_hba_attr_fmw_ver (ocs_sport_t *sport, ocs_fdmi_attr_def_t *ad)
 
int ocs_fdmi_hba_attr_os_ver (ocs_sport_t *sport, ocs_fdmi_attr_def_t *ad)
 
int ocs_fdmi_hba_attr_ct_len (ocs_sport_t *sport, ocs_fdmi_attr_def_t *ad)
 
int ocs_fdmi_hba_attr_symbolic_name (ocs_sport_t *sport, ocs_fdmi_attr_def_t *ad)
 
int ocs_fdmi_hba_attr_vendor_info (ocs_sport_t *sport, ocs_fdmi_attr_def_t *ad)
 
int ocs_fdmi_hba_attr_num_ports (ocs_sport_t *sport, ocs_fdmi_attr_def_t *ad)
 
int ocs_fdmi_hba_attr_fabric_wwnn (ocs_sport_t *sport, ocs_fdmi_attr_def_t *ad)
 
int ocs_fdmi_hba_attr_bios_ver (ocs_sport_t *sport, ocs_fdmi_attr_def_t *ad)
 
int ocs_fdmi_hba_attr_bios_state (ocs_sport_t *sport, ocs_fdmi_attr_def_t *ad)
 
int ocs_fdmi_hba_attr_vendor_id (ocs_sport_t *sport, ocs_fdmi_attr_def_t *ad)
 
void * __ocs_fdmi_rhba_wait_rsp (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Fabric node state machine: Wait for RHBA response event. More...
 
void * __ocs_fdmi_dhba_wait_rsp (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Fabric node state machine: Wait for DHBA response event. More...
 
void * __ocs_fdmi_reg_port_wait_rsp (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 
void * __ocs_fdmi_dprt_wait_rsp (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Fabric node state machine: Wait for DPRT response event. More...
 
int ocs_fdmi_port_attr_fc4type (ocs_sport_t *sport, ocs_fdmi_attr_def_t *ad)
 
int ocs_fdmi_port_attr_support_speed (ocs_sport_t *sport, ocs_fdmi_attr_def_t *ad)
 
int ocs_fdmi_port_attr_speed (ocs_sport_t *sport, ocs_fdmi_attr_def_t *ad)
 
int ocs_fdmi_port_attr_max_frame (ocs_sport_t *sport, ocs_fdmi_attr_def_t *ad)
 
int ocs_fdmi_port_attr_os_devname (ocs_sport_t *sport, ocs_fdmi_attr_def_t *ad)
 
int ocs_fdmi_port_attr_host_name (ocs_sport_t *sport, ocs_fdmi_attr_def_t *ad)
 
int ocs_fdmi_port_attr_wwnn (ocs_sport_t *sport, ocs_fdmi_attr_def_t *ad)
 
int ocs_fdmi_port_attr_wwpn (ocs_sport_t *sport, ocs_fdmi_attr_def_t *ad)
 
int ocs_fdmi_port_attr_symbolic_name (ocs_sport_t *sport, ocs_fdmi_attr_def_t *ad)
 
int ocs_fdmi_port_attr_port_type (ocs_sport_t *sport, ocs_fdmi_attr_def_t *ad)
 
int ocs_fdmi_port_attr_class (ocs_sport_t *sport, ocs_fdmi_attr_def_t *ad)
 
int ocs_fdmi_port_attr_fabric_wwpn (ocs_sport_t *sport, ocs_fdmi_attr_def_t *ad)
 
int ocs_fdmi_port_attr_active_fc4type (ocs_sport_t *sport, ocs_fdmi_attr_def_t *ad)
 
int ocs_fdmi_port_attr_port_state (ocs_sport_t *sport, ocs_fdmi_attr_def_t *ad)
 
int ocs_fdmi_port_attr_nportid (ocs_sport_t *sport, ocs_fdmi_attr_def_t *ad)
 
int ocs_fdmi_get_cmd (ocs_sport_t *sport, els_cb_t cb, void *cb_arg, ocs_fdmi_get_cmd_req_info_t *fdmi_cmd_req)
 

Macro Details

#define FDMI_ATTR_TYPE_LEN_SIZE   4

Definition at line 66 of file ocs_fabric.c.

#define OCS_FDMI_PORTSTATE_OFFLINE   1

Definition at line 86 of file ocs_fabric.c.

#define OCS_FDMI_PORTSTATE_ONLINE   2

Definition at line 87 of file ocs_fabric.c.

#define OCS_FDMI_PORTTYPE_NLPORT   2

Definition at line 83 of file ocs_fabric.c.

#define OCS_FDMI_PORTTYPE_NPORT   1

Definition at line 82 of file ocs_fabric.c.

#define OCS_FDMI_PORTTYPE_UNKNOWN   0

Definition at line 81 of file ocs_fabric.c.

#define OCS_MAX_CT_SIZE   (60 * 4096)

Definition at line 67 of file ocs_fabric.c.

#define OCS_PORTSPEED_128GFC   0x00000200 /* 128G FC*/

Definition at line 77 of file ocs_fabric.c.

#define OCS_PORTSPEED_16GFC   0x00000020 /* 16G FC */

Definition at line 74 of file ocs_fabric.c.

#define OCS_PORTSPEED_1GFC   0x00000001 /* 1G FC */

Definition at line 70 of file ocs_fabric.c.

#define OCS_PORTSPEED_2GFC   0x00000002 /* 2G FC */

Definition at line 71 of file ocs_fabric.c.

#define OCS_PORTSPEED_32GFC   0x00000040 /* 32G FC */

Definition at line 75 of file ocs_fabric.c.

#define OCS_PORTSPEED_4GFC   0x00000008 /* 4G FC */

Definition at line 72 of file ocs_fabric.c.

#define OCS_PORTSPEED_64GFC   0x00000400 /* 64G FC */

Definition at line 76 of file ocs_fabric.c.

#define OCS_PORTSPEED_8GFC   0x00000010 /* 8G FC */

Definition at line 73 of file ocs_fabric.c.

#define OCS_PORTSPEED_UNKNOWN   0x00008000 /* Unknown*/

Definition at line 78 of file ocs_fabric.c.

Function Details

void* __ocs_fdmi_idle ( ocs_sm_ctx_t *  ctx,
ocs_sm_event_t  evt,
void *  arg 
)

FDMI node state machine: FDMI node is idle.

Description
Wait for fdmi node events.
Parameters
ctxRemote node state machine context.
evtEvent to process.
argPer event optional argument.
Returns
Returns NULL.

Definition at line 1144 of file ocs_fabric.c.

void* __ocs_fdmi_init ( ocs_sm_ctx_t *  ctx,
ocs_sm_event_t  evt,
void *  arg 
)

FDMI node state machine: Initialize.

Description
A PLOGI is sent to the well-known FDMI node.
Parameters
ctxRemote node state machine context.
evtEvent to process.
argPer event optional argument.
Returns
Returns NULL.

Definition at line 625 of file ocs_fabric.c.

void * __ocs_fdmi_plogi_wait_rsp ( ocs_sm_ctx_t *  ctx,
ocs_sm_event_t  evt,
void *  arg 
)

FDMI node state machine: Wait for a PLOGI response.

Description
Waits for a response from PLOGI to name services node, then issues a node attach request to the HAL.
Parameters
ctxRemote node state machine context.
evtEvent to process.
argPer event optional argument.
Returns
Returns NULL.

Definition at line 660 of file ocs_fabric.c.

void* __ocs_fdmi_reg_port_wait_rsp ( ocs_sm_ctx_t *  ctx,
ocs_sm_event_t  evt,
void *  arg 
)

Definition at line 3220 of file ocs_fabric.c.

void* __ocs_ns_ganxt_wait_rsp ( ocs_sm_ctx_t *  ctx,
ocs_sm_event_t  evt,
void *  arg 
)

Definition at line 1037 of file ocs_fabric.c.

void* __ocs_ns_nvme_rffid_wait_rsp ( ocs_sm_ctx_t *  ctx,
ocs_sm_event_t  evt,
void *  arg 
)

Definition at line 880 of file ocs_fabric.c.

static void gidpt_delay_timer_cb ( void *  arg)
static

Handle GIDPT delay timer callback.

Description
Post an OCS_EVT_GIDPT_DEIALY_EXPIRED event to the passed in node.
Parameters
argPointer to node.
Returns
None.

Definition at line 1172 of file ocs_fabric.c.

int ocs_fdmi_get_cmd ( ocs_sport_t *  sport,
els_cb_t  cb,
void *  cb_arg,
ocs_fdmi_get_cmd_req_info_t *  fdmi_cmd_req 
)

Definition at line 3700 of file ocs_fabric.c.

int ocs_fdmi_hba_attr_bios_state ( ocs_sport_t *  sport,
ocs_fdmi_attr_def_t *  ad 
)

Definition at line 3082 of file ocs_fabric.c.

int ocs_fdmi_hba_attr_bios_ver ( ocs_sport_t *  sport,
ocs_fdmi_attr_def_t *  ad 
)

Definition at line 3063 of file ocs_fabric.c.

int ocs_fdmi_hba_attr_ct_len ( ocs_sport_t *  sport,
ocs_fdmi_attr_def_t *  ad 
)

Definition at line 2979 of file ocs_fabric.c.

int ocs_fdmi_hba_attr_description ( ocs_sport_t *  sport,
ocs_fdmi_attr_def_t *  ad 
)

Definition at line 2878 of file ocs_fabric.c.

int ocs_fdmi_hba_attr_drvr_ver ( ocs_sport_t *  sport,
ocs_fdmi_attr_def_t *  ad 
)

Definition at line 2899 of file ocs_fabric.c.

int ocs_fdmi_hba_attr_fabric_wwnn ( ocs_sport_t *  sport,
ocs_fdmi_attr_def_t *  ad 
)

Definition at line 3046 of file ocs_fabric.c.

int ocs_fdmi_hba_attr_fmw_ver ( ocs_sport_t *  sport,
ocs_fdmi_attr_def_t *  ad 
)

Definition at line 2940 of file ocs_fabric.c.

int ocs_fdmi_hba_attr_manufacturer ( ocs_sport_t *  sport,
ocs_fdmi_attr_def_t *  ad 
)

Definition at line 2814 of file ocs_fabric.c.

int ocs_fdmi_hba_attr_model ( ocs_sport_t *  sport,
ocs_fdmi_attr_def_t *  ad 
)

Definition at line 2858 of file ocs_fabric.c.

int ocs_fdmi_hba_attr_num_ports ( ocs_sport_t *  sport,
ocs_fdmi_attr_def_t *  ad 
)

Definition at line 3030 of file ocs_fabric.c.

int ocs_fdmi_hba_attr_os_ver ( ocs_sport_t *  sport,
ocs_fdmi_attr_def_t *  ad 
)

Definition at line 2959 of file ocs_fabric.c.

int ocs_fdmi_hba_attr_rom_ver ( ocs_sport_t *  sport,
ocs_fdmi_attr_def_t *  ad 
)

Definition at line 2920 of file ocs_fabric.c.

int ocs_fdmi_hba_attr_sn ( ocs_sport_t *  sport,
ocs_fdmi_attr_def_t *  ad 
)

Definition at line 2834 of file ocs_fabric.c.

int ocs_fdmi_hba_attr_symbolic_name ( ocs_sport_t *  sport,
ocs_fdmi_attr_def_t *  ad 
)

Definition at line 2994 of file ocs_fabric.c.

int ocs_fdmi_hba_attr_vendor_id ( ocs_sport_t *  sport,
ocs_fdmi_attr_def_t *  ad 
)

Definition at line 3098 of file ocs_fabric.c.

int ocs_fdmi_hba_attr_vendor_info ( ocs_sport_t *  sport,
ocs_fdmi_attr_def_t *  ad 
)

Definition at line 3016 of file ocs_fabric.c.

int ocs_fdmi_hba_attr_wwnn ( ocs_sport_t *  sport,
ocs_fdmi_attr_def_t *  ad 
)

Definition at line 2797 of file ocs_fabric.c.

int ocs_fdmi_port_attr_active_fc4type ( ocs_sport_t *  sport,
ocs_fdmi_attr_def_t *  ad 
)

Definition at line 3608 of file ocs_fabric.c.

int ocs_fdmi_port_attr_class ( ocs_sport_t *  sport,
ocs_fdmi_attr_def_t *  ad 
)

Definition at line 3570 of file ocs_fabric.c.

int ocs_fdmi_port_attr_fabric_wwpn ( ocs_sport_t *  sport,
ocs_fdmi_attr_def_t *  ad 
)

Definition at line 3584 of file ocs_fabric.c.

int ocs_fdmi_port_attr_fc4type ( ocs_sport_t *  sport,
ocs_fdmi_attr_def_t *  ad 
)

Definition at line 3315 of file ocs_fabric.c.

int ocs_fdmi_port_attr_host_name ( ocs_sport_t *  sport,
ocs_fdmi_attr_def_t *  ad 
)

Definition at line 3478 of file ocs_fabric.c.

int ocs_fdmi_port_attr_max_frame ( ocs_sport_t *  sport,
ocs_fdmi_attr_def_t *  ad 
)

Definition at line 3432 of file ocs_fabric.c.

int ocs_fdmi_port_attr_nportid ( ocs_sport_t *  sport,
ocs_fdmi_attr_def_t *  ad 
)

Definition at line 3650 of file ocs_fabric.c.

int ocs_fdmi_port_attr_os_devname ( ocs_sport_t *  sport,
ocs_fdmi_attr_def_t *  ad 
)

Definition at line 3457 of file ocs_fabric.c.

int ocs_fdmi_port_attr_port_state ( ocs_sport_t *  sport,
ocs_fdmi_attr_def_t *  ad 
)

Definition at line 3626 of file ocs_fabric.c.

int ocs_fdmi_port_attr_port_type ( ocs_sport_t *  sport,
ocs_fdmi_attr_def_t *  ad 
)

Definition at line 3549 of file ocs_fabric.c.

int ocs_fdmi_port_attr_speed ( ocs_sport_t *  sport,
ocs_fdmi_attr_def_t *  ad 
)

Definition at line 3384 of file ocs_fabric.c.

int ocs_fdmi_port_attr_support_speed ( ocs_sport_t *  sport,
ocs_fdmi_attr_def_t *  ad 
)

Definition at line 3334 of file ocs_fabric.c.

int ocs_fdmi_port_attr_symbolic_name ( ocs_sport_t *  sport,
ocs_fdmi_attr_def_t *  ad 
)

Definition at line 3532 of file ocs_fabric.c.

int ocs_fdmi_port_attr_wwnn ( ocs_sport_t *  sport,
ocs_fdmi_attr_def_t *  ad 
)

Definition at line 3497 of file ocs_fabric.c.

int ocs_fdmi_port_attr_wwpn ( ocs_sport_t *  sport,
ocs_fdmi_attr_def_t *  ad 
)

Definition at line 3515 of file ocs_fabric.c.

static uint64_t ocs_get_wwpn ( fc_plogi_payload_t *  sp)
static

Return the node's WWPN as an uint64_t.

Description
The WWPN is computed from service parameters, and returned as a uint64_t.
Parameters
spPointer to service parameters.
Returns
Returns WWPN.

Definition at line 1575 of file ocs_fabric.c.

int32_t ocs_p2p_setup ( ocs_sport_t *  sport)

Set up the domain point-to-point parameters.

Description
The remote node service parameters are examined, and various point-to-point variables are set.
Parameters
sportPointer to the sport object.
Returns
Returns 0 on success, or a negative error value on failure.

Definition at line 2733 of file ocs_fabric.c.

int32_t ocs_process_fdmi_ghat_payload ( ocs_node_t *  node,
fcct_fdmi_ghat_rsp_t *  ghat,
uint32_t  ghat_len,
void *  buf 
)

Process the GHAT acc payload.

Description
The GHAT payload is parsed, and new nodes are created, as needed.
Parameters
nodePointer to the node structure.
ghatPointer to the GHAT payload.
ghat_lenPayload length
bufdestination buffer to copy the HBA attributes info
Returns
Returns 0 on success, or a negative error value on failure.

Definition at line 2423 of file ocs_fabric.c.

int32_t ocs_process_fdmi_gpat_payload ( ocs_node_t *  node,
fcct_fdmi_gpat_rsp_t *  gpat,
uint32_t  gpat_len,
void *  buf 
)

Process the GPAT acc payload.

Description
The GPAT payload is parsed, and new nodes are created, as needed.
Parameters
nodePointer to the node structure.
gpatPointer to the GPAT payload.
gpat_lenPayload length
bufdestination buffer to copy the Port attributes info
Returns
Returns 0 on success, or a negative error value on failure.

Definition at line 2599 of file ocs_fabric.c.

int32_t ocs_process_fdmi_grhl_payload ( ocs_node_t *  node,
fcct_fdmi_grhl_rsp_t *  grhl,
uint32_t  grhl_len,
void *  buf 
)

Process the GRHL acc payload.

Description
The GRHL payload is parsed, and new nodes are created, as needed.
Parameters
nodePointer to the node structure.
grhlPointer to the GRHL payload.
grhl_lenPayload length
bufdestination buffer to copy the HBA list info
Returns
Returns 0 on success, or a negative error value on failure.

Definition at line 2322 of file ocs_fabric.c.

int32_t ocs_process_fdmi_grpl_payload ( ocs_node_t *  node,
fcct_fdmi_grpl_rsp_t *  grpl,
uint32_t  grpl_len,
void *  buf 
)

Process the GRPL acc payload.

Description
The GRPL payload is parsed, and new nodes are created, as needed.
Parameters
nodePointer to the node structure.
grplPointer to the GRPL payload.
grpl_lenPayload length
bufdestination buffer to copy the Port list info
Returns
Returns 0 on success, or a negative error value on failure.

Definition at line 2372 of file ocs_fabric.c.

static int32_t ocs_process_gidpt_payload ( ocs_node_t *  node,
fcct_gidpt_acc_t *  gidpt,
uint32_t  gidpt_len 
)
static

Process the GIDPT payload.

Description
The GIDPT payload is parsed, and new nodes are created, as needed.
Parameters
nodePointer to the node structure.
gidptPointer to the GIDPT payload.
gidpt_lenPayload length
Returns
Returns 0 on success, or a negative error value on failure.

Definition at line 2180 of file ocs_fabric.c.

static void ocs_process_rscn ( ocs_node_t *  node,
ocs_node_cb_t *  cbdata 
)
static

Process the FABCTL node RSCN.

Description

Processes the FABCTL node RSCN payload, simply passes the event to the name server.

Parameters
nodePointer to the node structure.
cbdataCallback data to pass forward.
Returns
None.

Definition at line 2780 of file ocs_fabric.c.

int32_t ocs_rnode_is_nport ( fc_plogi_payload_t *  remote_sparms)

Return TRUE if the remote node is an NPORT.

Description
Examines the service parameters. Returns TRUE if the node reports itself as an NPORT.
Parameters
remote_sparmsRemote node service parameters.
Returns
Returns TRUE if NPORT.

Definition at line 1557 of file ocs_fabric.c.

static int32_t ocs_rnode_is_winner ( ocs_sport_t *  sport)
static

Return TRUE if the remote node is the point-to-point winner.

Description
Compares WWPNs. Returns TRUE if the remote node's WWPN is numerically higher than the local node's WWPN.
Parameters
sportPointer to the sport object.
Returns
  • 0, if the remote node is the loser.
  • 1, if the remote node is the winner.
  • (-1), if remote node is neither the loser nor the winner (WWPNs match)

Definition at line 1597 of file ocs_fabric.c.

static int32_t ocs_start_fabctl_node ( ocs_sport_t *  sport)
static

Start up the fabric controller node.

Description
Allocates and starts up the fabric controller node.
Parameters
sportPointer to the sport structure.
Returns
Returns 0 on success, or a negative error value on failure.

Definition at line 2148 of file ocs_fabric.c.

static int32_t ocs_start_fdmi_node ( ocs_sport_t *  sport)
static

Start up the FDMI node.

Description
Allocates and starts up the FDMI node.
Parameters
sportPointer to the sport structure.
Returns
Returns 0 on success, or a negative error value on failure.

Definition at line 2120 of file ocs_fabric.c.

static int32_t ocs_start_ns_node ( ocs_sport_t *  sport)
static

Start up the name services node.

Description
Allocates and starts up the name services node.
Parameters
sportPointer to the sport structure.
Returns
Returns 0 on success, or a negative error value on failure.

Definition at line 2085 of file ocs_fabric.c.