Go to the source code of this file.
Details SLI port (sport) functions.
Definition in file ocs_sport.c.
Data Structures | |
| struct | ocs_fdmi_get_cmd_results_t |
Macros | |
| #define | std_sport_state_decl() |
| Common SLI port state machine declarations and initialization. More... | |
| #define | sport_sm_trace(sport) |
| Common SLI port state machine trace logging. More... | |
Functions | |
| static void | ocs_vport_update_spec (ocs_sport_t *sport) |
| Save the virtual port's parameters. More... | |
| static void | ocs_vport_link_down (ocs_sport_t *sport) |
| Clear the sport reference in the vport specification. More... | |
| static void | _ocs_sport_free (void *arg) |
| Free a SLI port object. More... | |
| void | ocs_mgmt_sport_list (ocs_textbuf_t *textbuf, void *sport) |
| void | ocs_mgmt_sport_get_all (ocs_textbuf_t *textbuf, void *sport) |
| int | ocs_mgmt_sport_get (ocs_textbuf_t *textbuf, char *parent, char *name, void *sport) |
| int | ocs_mgmt_sport_set (char *parent, char *name, char *value, void *sport) |
| int | ocs_mgmt_sport_exec (char *parent, char *action, void *arg_in, uint32_t arg_in_length, void *arg_out, uint32_t arg_out_length, void *object) |
| static int32_t | ocs_sport_fdmi_get_cmd (ocs_sport_t *sport, ocs_sport_exec_arg_t *sport_exec_args, uint32_t fdmi_cmd_code) |
| send FDMI get command. More... | |
| static void | ocs_fdmi_get_cmd_cb (ocs_node_t *node, ocs_node_cb_t *node_data, void *cb_data) |
| int32_t | ocs_port_cb (void *arg, ocs_hal_port_event_e event, void *data) |
| SLI port HAL callback. More... | |
| ocs_sport_t * | ocs_sport_alloc (ocs_domain_t *domain, uint64_t wwpn, uint64_t wwnn, uint32_t fc_id, uint8_t enable_ini, uint8_t enable_tgt) |
| Allocate a SLI port object. More... | |
| void | ocs_sport_free (ocs_sport_t *sport) |
| void | ocs_sport_force_free (ocs_sport_t *sport) |
| Free memory resources of a SLI port object. More... | |
| ocs_sport_t * | ocs_sport_get_instance (ocs_domain_t *domain, uint32_t index) |
| Return a SLI port object, given an instance index. More... | |
| ocs_sport_t * | ocs_sport_find (ocs_domain_t *domain, uint32_t d_id) |
| Find a SLI port object, given an FC_ID. More... | |
| ocs_sport_t * | ocs_sport_find_wwn (ocs_domain_t *domain, uint64_t wwnn, uint64_t wwpn) |
| Find a SLI port, given the WWNN and WWPN. More... | |
| int32_t | ocs_sport_attach (ocs_sport_t *sport, uint32_t fc_id) |
| Request a SLI port attach. More... | |
| static void * | __ocs_sport_common (const char *funcname, ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| SLI port state machine: Common event handler. More... | |
| void * | __ocs_sport_allocated (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| SLI port state machine: Physical sport allocated. More... | |
| void * | __ocs_sport_vport_init (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| SLI port state machine: Handle initial virtual port events. More... | |
| void * | __ocs_sport_vport_wait_alloc (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| SLI port state machine: Wait for the HAL SLI port allocation to complete. More... | |
| void * | __ocs_sport_vport_allocated (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| SLI port state machine: virtual sport allocated. More... | |
| void * | __ocs_sport_attached (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| SLI port state machine: Attached. More... | |
| void * | __ocs_sport_wait_shutdown (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| SLI port state machine: Wait for the node shutdowns to complete. More... | |
| void * | __ocs_sport_wait_port_free (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| SLI port state machine: Wait for the HAL's port free to complete. More... | |
| int32_t | ocs_vport_start (ocs_domain_t *domain) |
| Start the vports on a domain. More... | |
| int32_t | ocs_sport_vport_new (ocs_domain_t *domain, uint64_t wwpn, uint64_t wwnn, uint32_t fc_id, uint8_t ini, uint8_t tgt, void *tgt_data, void *ini_data, uint8_t restore_vport) |
| Allocate a new virtual SLI port. More... | |
| int32_t | ocs_sport_vport_del (ocs_t *ocs, ocs_domain_t *domain, uint64_t wwpn, uint64_t wwnn) |
| Remove a previously-allocated virtual port. More... | |
| void | ocs_vport_del_all (ocs_t *ocs) |
| Force free all saved vports. More... | |
| int | ocs_ddump_sport (ocs_textbuf_t *textbuf, ocs_sli_port_t *sport) |
| Generate a SLI port ddump. More... | |
| void | ocs_mgmt_sport_exec_cb (ocs_sport_t *sport, void *arg_in) |
| int8_t | ocs_vport_create_spec (ocs_t *ocs, uint64_t wwnn, uint64_t wwpn, uint32_t fc_id, uint32_t enable_ini, uint32_t enable_tgt, void *tgt_data, void *ini_data) |
| Create a saved vport entry. More... | |
| static void | and8 (uint8_t *a, uint8_t *b, uint8_t *c, uint32_t n) |
| Perform the AND operation on source vectors. More... | |
| int | ocs_sparm_cmp (uint8_t *sp1, uint8_t *sp2) |
| Compare service parameters. More... | |
| ocs_node_group_dir_t * | ocs_node_group_dir_alloc (ocs_sport_t *sport, uint8_t *sparms) |
| Allocate a node group directory entry. More... | |
| void | ocs_node_group_dir_free (ocs_node_group_dir_t *node_group_dir) |
| Free a node group directory entry. More... | |
| ocs_node_group_dir_t * | ocs_node_group_dir_find (ocs_sport_t *sport, uint8_t *sparms) |
| Find a matching node group directory entry. More... | |
| ocs_remote_node_group_t * | ocs_remote_node_group_alloc (ocs_node_group_dir_t *node_group_dir) |
| Allocate a remote node group object. More... | |
| void | ocs_remote_node_group_free (ocs_remote_node_group_t *node_group) |
| Free a remote node group object. More... | |
| int | ocs_node_group_init (ocs_node_t *node) |
| Initialize a node for high login mode. More... | |
| void | ocs_sport_nodes_shutdown (ocs_t *ocs, ocs_sport_t *sport) |
| Shutdown all remote nodes of sport. More... | |
Variables | |
| static ocs_mgmt_functions_t | sport_mgmt_functions |
| static fc_sparms_t | sparms_cmp_mask |
| Service parameters mask data. More... | |
| #define sport_sm_trace | ( | sport | ) |
Common SLI port state machine trace logging.
Definition at line 473 of file ocs_sport.c.
| #define std_sport_state_decl | ( | ) |
Common SLI port state machine declarations and initialization.
Definition at line 456 of file ocs_sport.c.
|
static |
SLI port state machine: Common event handler.
| funcname | Function name to display. |
| ctx | Sport state machine context. |
| evt | Event to process. |
| arg | Per event optional argument. |
Definition at line 495 of file ocs_sport.c.
|
static |
Perform the AND operation on source vectors.
b and c. The resulting value is stored in a.| a | Destination-byte vector. |
| b | Source-byte vector. |
| c | Source-byte vector. |
| n | Byte count. |
Definition at line 1770 of file ocs_sport.c.
|
static |
Definition at line 1459 of file ocs_sport.c.
| int ocs_mgmt_sport_exec | ( | char * | parent, |
| char * | action, | ||
| void * | arg_in, | ||
| uint32_t | arg_in_length, | ||
| void * | arg_out, | ||
| uint32_t | arg_out_length, | ||
| void * | object | ||
| ) |
Definition at line 1620 of file ocs_sport.c.
| void ocs_mgmt_sport_exec_cb | ( | ocs_sport_t * | sport, |
| void * | arg_in | ||
| ) |
Definition at line 1608 of file ocs_sport.c.
| int ocs_mgmt_sport_get | ( | ocs_textbuf_t * | textbuf, |
| char * | parent, | ||
| char * | name, | ||
| void * | sport | ||
| ) |
Definition at line 1314 of file ocs_sport.c.
| void ocs_mgmt_sport_get_all | ( | ocs_textbuf_t * | textbuf, |
| void * | sport | ||
| ) |
Definition at line 1388 of file ocs_sport.c.
| void ocs_mgmt_sport_list | ( | ocs_textbuf_t * | textbuf, |
| void * | sport | ||
| ) |
Definition at line 1276 of file ocs_sport.c.
| int ocs_mgmt_sport_set | ( | char * | parent, |
| char * | name, | ||
| char * | value, | ||
| void * | sport | ||
| ) |
Definition at line 1420 of file ocs_sport.c.
| ocs_node_group_dir_t* ocs_node_group_dir_alloc | ( | ocs_sport_t * | sport, |
| uint8_t * | sparms | ||
| ) |
Allocate a node group directory entry.
| sport | Pointer to the sport object. |
| sparms | Pointer to the service parameters. |
Definition at line 1843 of file ocs_sport.c.
| ocs_node_group_dir_t* ocs_node_group_dir_find | ( | ocs_sport_t * | sport, |
| uint8_t * | sparms | ||
| ) |
Find a matching node group directory entry.
| sport | Pointer to the sport object. |
| sparms | Pointer to the sparams to match. |
Definition at line 1912 of file ocs_sport.c.
| void ocs_node_group_dir_free | ( | ocs_node_group_dir_t * | node_group_dir | ) |
Free a node group directory entry.
node_group_dir is removed from the sport's node group directory list and freed.| node_group_dir | Pointer to the node group directory entry. |
Definition at line 1880 of file ocs_sport.c.
| int ocs_node_group_init | ( | ocs_node_t * | node | ) |
Initialize a node for high login mode.
node is initialized for high login mode. The following steps are performed:hlm_group_size number of remote node group objects is present in the node group directory, a new remote node group object is allocated and added to the list.| node | Pointer to the node. |
Definition at line 2042 of file ocs_sport.c.
| ocs_remote_node_group_t* ocs_remote_node_group_alloc | ( | ocs_node_group_dir_t * | node_group_dir | ) |
Allocate a remote node group object.
node_group_dir. The HAL remote node group alloc function is called.| node_group_dir | Pointer to the node group directory. |
Definition at line 1940 of file ocs_sport.c.
| void ocs_remote_node_group_free | ( | ocs_remote_node_group_t * | node_group | ) |
Free a remote node group object.
node_group is removed from its node group directory entry and freed.| node_group | Pointer to the remote node group object. |
Definition at line 1995 of file ocs_sport.c.
| int ocs_sparm_cmp | ( | uint8_t * | sp1, |
| uint8_t * | sp2 | ||
| ) |
Compare service parameters.
| sp1 | Pointer to service parameters 1. |
| sp2 | Pointer to service parameters 2. |
Definition at line 1814 of file ocs_sport.c.
|
static |
send FDMI get command.
| sport | : Pointer to sport |
| in_buf,: | input buffer |
| in_buf_len,: | input buffer length |
| buf,: | User provided buffer to copy HBA lists info |
| buf_len,: | user buffer length |
| fdmi_cmd_code,: | FDMI command code |
Definition at line 1520 of file ocs_sport.c.
| void ocs_sport_free | ( | ocs_sport_t * | sport | ) |
Definition at line 280 of file ocs_sport.c.
| void ocs_sport_nodes_shutdown | ( | ocs_t * | ocs, |
| ocs_sport_t * | sport | ||
| ) |
Shutdown all remote nodes of sport.
Definition at line 2124 of file ocs_sport.c.
| int8_t ocs_vport_create_spec | ( | ocs_t * | ocs, |
| uint64_t | wwnn, | ||
| uint64_t | wwpn, | ||
| uint32_t | fc_id, | ||
| uint32_t | enable_ini, | ||
| uint32_t | enable_tgt, | ||
| void * | tgt_data, | ||
| void * | ini_data | ||
| ) |
Create a saved vport entry.
A saved vport entry is added to the vport list, which is restored following a link up. This function is used to allow vports to be created the first time the link comes up without having to go through the ioctl() API.
| ocs | Pointer to device context. |
| wwnn | World wide node name (may be zero for auto-select). |
| wwpn | World wide port name (may be zero for auto-select). |
| fc_id | Requested port ID (used in fabric emulation mode). |
| enable_ini | TRUE if vport is to be an initiator port. |
| enable_tgt | TRUE if vport is to be a target port. |
| tgt_data | Pointer to target specific data. |
| ini_data | Pointer to initiator specific data. |
Definition at line 1716 of file ocs_sport.c.
| void ocs_vport_del_all | ( | ocs_t * | ocs | ) |
Force free all saved vports.
| ocs | Pointer to the device object. |
Definition at line 1175 of file ocs_sport.c.
|
static |
Save the virtual port's parameters.
| sport | Pointer to the sport context. |
Definition at line 1677 of file ocs_sport.c.
|
static |
Service parameters mask data.
Definition at line 1785 of file ocs_sport.c.
|
static |
Definition at line 60 of file ocs_sport.c.