Functions | |
| void | ocs_node_abort_all_els (ocs_node_t *node) |
| Device node state machine wait for all ELS's to complete. More... | |
| int32_t | ocs_remote_node_cb (void *arg, ocs_hal_remote_node_event_e event, void *data) |
| Handle remote node events from HAL. More... | |
| int32_t | ocs_node_attach (ocs_node_t *node) |
| Perform HAL call to attach a remote node. More... | |
| void | ocs_node_fcid_display (uint32_t fc_id, char *buffer, uint32_t buffer_length) |
| Generate text for a node's fc_id. More... | |
| void * | __ocs_node_shutdown (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| state: shutdown a node More... | |
| void * | __ocs_node_wait_els_shutdown (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| Node state machine: Wait for all ELSs to complete. More... | |
| void * | __ocs_node_wait_ios_shutdown (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| state: initiate node shutdown More... | |
| void * | __ocs_node_common (const char *funcname, ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| state: common node event handler More... | |
| void | ocs_node_save_sparms (ocs_node_t *node, void *payload) |
| save node service parameters More... | |
| void | ocs_node_post_event (ocs_node_t *node, ocs_sm_event_t evt, void *arg) |
| Post event to node state machine context. More... | |
| void | ocs_node_transition (ocs_node_t *node, ocs_sm_function_t state, void *data) |
| transition state of a node More... | |
| void | ocs_node_build_eui_name (char *buffer, uint32_t buffer_len, uint64_t eui_name) |
| build EUI formatted WWN More... | |
| uint64_t | ocs_node_get_wwpn (ocs_node_t *node) |
| return nodes' WWPN as a uint64_t More... | |
| uint64_t | ocs_node_get_wwnn (ocs_node_t *node) |
| return nodes' WWNN as a uint64_t More... | |
| int32_t | ocs_node_recv_els_frame (ocs_node_t *node, ocs_hal_sequence_t *seq) |
| Dispatch a ELS frame. More... | |
| int32_t | ocs_node_recv_abts_frame (ocs_node_t *node, ocs_hal_sequence_t *seq) |
| Dispatch a ABTS frame (RQ Pair/sequence coalescing). More... | |
| int32_t | ocs_node_recv_ct_frame (ocs_node_t *node, ocs_hal_sequence_t *seq) |
| Dispatch a CT frame. More... | |
| int32_t | ocs_node_recv_fcp_cmd (ocs_node_t *node, ocs_hal_sequence_t *seq) |
| Dispatch a FCP command frame when the node is not ready. More... | |
| int32_t | ocs_node_recv_bls_no_sit (ocs_node_t *node, ocs_hal_sequence_t *seq) |
| Stub handler for non-ABTS BLS frames. More... | |
| int32_t | ocs_node_suppress_resp (ocs_remote_node_t *rnode) |
| Return node suppress_rsp state. More... | |
| void* __ocs_node_common | ( | const char * | funcname, |
| ocs_sm_ctx_t * | ctx, | ||
| ocs_sm_event_t | evt, | ||
| void * | arg | ||
| ) |
state: common node event handler
Handle common/shared node events
| funcname | calling function's name |
| ctx | remote node sm context |
| evt | event to process |
| arg | per event optional argument |
Definition at line 1317 of file ocs_node.c.
| void* __ocs_node_shutdown | ( | ocs_sm_ctx_t * | ctx, |
| ocs_sm_event_t | evt, | ||
| void * | arg | ||
| ) |
state: shutdown a node
A node is shutdown,
| ctx | remote node sm context |
| evt | event to process |
| arg | per event optional argument |
Definition at line 841 of file ocs_node.c.
| void* __ocs_node_wait_els_shutdown | ( | ocs_sm_ctx_t * | ctx, |
| ocs_sm_event_t | evt, | ||
| void * | arg | ||
| ) |
Node state machine: Wait for all ELSs to complete.
State waits for all ELSs to complete after aborting all outstanding .
| ctx | Remote node state machine context. |
| evt | Event to process. |
| arg | Per event optional argument. |
Definition at line 1102 of file ocs_node.c.
| void* __ocs_node_wait_ios_shutdown | ( | ocs_sm_ctx_t * | ctx, |
| ocs_sm_event_t | evt, | ||
| void * | arg | ||
| ) |
state: initiate node shutdown
State is entered when a node receives a shutdown event, and it's waiting for all the active IOs and ELS IOs associated with the node to complete.
| ctx | remote node sm context |
| evt | event to process |
| arg | per event optional argument |
Definition at line 1252 of file ocs_node.c.
| void ocs_node_abort_all_els | ( | ocs_node_t * | node | ) |
Device node state machine wait for all ELS's to complete.
Abort all ELS's for given node.
| node | node for which ELS's will be aborted |
Definition at line 83 of file ocs_node.c.
| int32_t ocs_node_attach | ( | ocs_node_t * | node | ) |
Perform HAL call to attach a remote node.
| node | pointer to node object |
Definition at line 671 of file ocs_node.c.
| void ocs_node_build_eui_name | ( | char * | buffer, |
| uint32_t | buffer_len, | ||
| uint64_t | eui_name | ||
| ) |
build EUI formatted WWN
Build a WWN given the somewhat transport agnostic iScsi naming specification, for FC use the eui. format, an ascii string such as: "eui.10000000C9A19501"
| buffer | buffer to place formatted name into |
| buffer_len | length in bytes of the buffer |
| eui_name | cpu endian 64 bit WWN value |
Definition at line 1577 of file ocs_node.c.
| void ocs_node_fcid_display | ( | uint32_t | fc_id, |
| char * | buffer, | ||
| uint32_t | buffer_length | ||
| ) |
Generate text for a node's fc_id.
The text for a nodes fc_id is generated, either as a well known name, or a 6 digit hex value.
| fc_id | fc_id |
| buffer | text buffer |
| buffer_length | text buffer length in bytes |
Definition at line 719 of file ocs_node.c.
| uint64_t ocs_node_get_wwnn | ( | ocs_node_t * | node | ) |
return nodes' WWNN as a uint64_t
The WWNN is computed from service parameters and returned as a uint64_t
| node | pointer to node structure |
Definition at line 1617 of file ocs_node.c.
| uint64_t ocs_node_get_wwpn | ( | ocs_node_t * | node | ) |
return nodes' WWPN as a uint64_t
The WWPN is computed from service parameters and returned as a uint64_t
| node | pointer to node structure |
Definition at line 1597 of file ocs_node.c.
| void ocs_node_post_event | ( | ocs_node_t * | node, |
| ocs_sm_event_t | evt, | ||
| void * | arg | ||
| ) |
Post event to node state machine context.
This is used by the node state machine code to post events to the nodes. Upon completion of the event posting, if the nesting depth is zero and we're not holding inbound frames, then the pending frames are processed.
| node | pointer to node |
| evt | event to post |
| arg | event posting argument |
Definition at line 1498 of file ocs_node.c.
| int32_t ocs_node_recv_abts_frame | ( | ocs_node_t * | node, |
| ocs_hal_sequence_t * | seq | ||
| ) |
Dispatch a ABTS frame (RQ Pair/sequence coalescing).
An ABTS frame is dispatched to the node state machine. This function is used for both RQ Pair and sequence coalescing.
| node | Node that originated the frame. |
| seq | Header/payload sequence buffers |
Definition at line 2342 of file ocs_node.c.
| int32_t ocs_node_recv_bls_no_sit | ( | ocs_node_t * | node, |
| ocs_hal_sequence_t * | seq | ||
| ) |
Stub handler for non-ABTS BLS frames.
Log message and drop. Customer can plumb it to their back-end as needed
| node | Node that originated the frame. |
| seq | header/payload sequence buffers |
Definition at line 2549 of file ocs_node.c.
| int32_t ocs_node_recv_ct_frame | ( | ocs_node_t * | node, |
| ocs_hal_sequence_t * | seq | ||
| ) |
Dispatch a CT frame.
A CT frame is dispatched to the node state machine. RQ Pair mode: this function is always called with a NULL hal io.
| node | Node that originated the frame. |
| seq | header/payload sequence buffers |
Definition at line 2420 of file ocs_node.c.
| int32_t ocs_node_recv_els_frame | ( | ocs_node_t * | node, |
| ocs_hal_sequence_t * | seq | ||
| ) |
Dispatch a ELS frame.
An ELS frame is dispatched to the node state machine. RQ Pair mode: this function is always called with a NULL hal io.
| node | Node that originated the frame. |
| seq | header/payload sequence buffers |
Definition at line 2231 of file ocs_node.c.
| int32_t ocs_node_recv_fcp_cmd | ( | ocs_node_t * | node, |
| ocs_hal_sequence_t * | seq | ||
| ) |
Dispatch a FCP command frame when the node is not ready.
A frame is dispatched to the node state machine.
| node | Node that originated the frame. |
| seq | header/payload sequence buffers |
Definition at line 2522 of file ocs_node.c.
| void ocs_node_save_sparms | ( | ocs_node_t * | node, |
| void * | payload | ||
| ) |
save node service parameters
Service parameters are copyed into the node structure
| node | pointer to node structure |
| payload | pointer to service paramters to save |
Definition at line 1467 of file ocs_node.c.
|
inline |
Return node suppress_rsp state.
Definition at line 2584 of file ocs_node.c.
| void ocs_node_transition | ( | ocs_node_t * | node, |
| ocs_sm_function_t | state, | ||
| void * | data | ||
| ) |
transition state of a node
The node's state is transitioned to the requested state. Entry/Exit events are posted as needed.
| node | pointer to node |
| state | state to transition to |
| data | transition data |
Definition at line 1547 of file ocs_node.c.
| int32_t ocs_remote_node_cb | ( | void * | arg, |
| ocs_hal_remote_node_event_e | event, | ||
| void * | data | ||
| ) |
Handle remote node events from HAL.
Handle remote node events from HAL. Essentially the HAL event is translated into a node state machine event that is posted to the affected node.
| arg | pointer to ocs |
| event | HAL event to proceoss |
| data | application specific data (pointer to the affected node) |
Definition at line 115 of file ocs_node.c.