Go to the source code of this file.
Handles the domain object callback from the HAL.
Definition in file ocs_domain.c.
Macros | |
| #define | domain_sm_trace(domain) |
| #define | domain_trace(domain, fmt,...) |
| #define | domain_printf(domain, fmt,...) |
| #define | std_domain_state_decl(...) |
Functions | |
| void | ocs_mgmt_domain_list (ocs_textbuf_t *textbuf, void *domain) |
| void | ocs_mgmt_domain_get_all (ocs_textbuf_t *textbuf, void *domain) |
| int | ocs_mgmt_domain_get (ocs_textbuf_t *textbuf, char *parent, char *name, void *domain) |
| int | ocs_mgmt_domain_set (char *parent, char *name, char *value, void *domain) |
| int | ocs_mgmt_domain_exec (char *parent, char *action, void *arg_in, uint32_t arg_in_length, void *arg_out, uint32_t arg_out_length, void *object) |
| int32_t | ocs_domain_cb (void *arg, ocs_hal_domain_event_e event, void *data) |
| Accept domain callback events from the HAL. More... | |
| ocs_domain_t * | ocs_domain_find (ocs_t *ocs, uint64_t fcf_wwn) |
| Find the domain, given its FCF_WWN. More... | |
| ocs_domain_t * | ocs_domain_alloc (ocs_t *ocs, uint64_t fcf_wwn) |
| Allocate a domain object. More... | |
| void | ocs_domain_free (ocs_domain_t *domain) |
| Free a domain object. More... | |
| void | ocs_domain_force_free (ocs_domain_t *domain) |
| Free memory resources of a domain object. More... | |
| void | ocs_unregister_domain_list_empty_cb (ocs_t *ocs) |
| Unregister a callback for the domain_list empty cb. More... | |
| void | ocs_register_domain_list_empty_cb (ocs_t *ocs) |
| Register a callback when the domain_list goes empty. More... | |
| ocs_domain_t * | ocs_domain_get_instance (ocs_t *ocs, uint32_t index) |
| Return a pointer to the domain, given the instance index. More... | |
| static void * | __ocs_domain_common (const char *funcname, ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| Domain state machine: Common event handler. More... | |
| static void * | __ocs_domain_common_shutdown (const char *funcname, ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| Domain state machine: Common shutdown. More... | |
| void * | __ocs_domain_init (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| Domain state machine: Initial state. More... | |
| void * | __ocs_domain_wait_alloc (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| Domain state machine: Wait for the domain allocation to complete. More... | |
| void * | __ocs_domain_allocated (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| Domain state machine: Wait for the domain attach request. More... | |
| void * | __ocs_domain_wait_attach (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| Domain state machine: Wait for the HAL domain attach to complete. More... | |
| void * | __ocs_domain_ready (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| Domain state machine: Ready state. More... | |
| void * | __ocs_domain_wait_sports_free (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| Domain state machine: Wait for nodes to free prior to the domain shutdown. More... | |
| void * | __ocs_domain_wait_shutdown (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| Domain state machine: Complete the domain shutdown. More... | |
| void * | __ocs_domain_wait_domain_lost (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| Domain state machine: Wait for the domain alloc/attach completion after receiving a domain lost. More... | |
| void | ocs_domain_save_sparms (ocs_domain_t *domain, void *payload) |
| Save the port's service parameters. More... | |
| void | __ocs_domain_attach_internal (ocs_domain_t *domain, uint32_t s_id) |
| Initiator domain attach. (internal call only) More... | |
| void | ocs_domain_attach (ocs_domain_t *domain, uint32_t s_id) |
| Initiator domain attach. More... | |
| int | ocs_domain_post_event (ocs_domain_t *domain, ocs_sm_event_t event, void *arg) |
| uint64_t | ocs_get_wwn (ocs_hal_t *hal, ocs_hal_property_e prop) |
| Return the WWN as a uint64_t. More... | |
| int | ocs_ddump_domain (ocs_textbuf_t *textbuf, ocs_domain_t *domain) |
| Generate a domain ddump. More... | |
| void | ocs_mgmt_domain_exec_cb (ocs_domain_t *domain, void *arg_in) |
Variables | |
| static ocs_mgmt_functions_t | domain_mgmt_functions |
| #define domain_printf | ( | domain, | |
| fmt, | |||
| ... | |||
| ) |
Definition at line 60 of file ocs_domain.c.
| #define domain_sm_trace | ( | domain | ) |
Definition at line 48 of file ocs_domain.c.
| #define domain_trace | ( | domain, | |
| fmt, | |||
| ... | |||
| ) |
Definition at line 54 of file ocs_domain.c.
| #define std_domain_state_decl | ( | ... | ) |
Definition at line 511 of file ocs_domain.c.
| void __ocs_domain_attach_internal | ( | ocs_domain_t * | domain, |
| uint32_t | s_id | ||
| ) |
Initiator domain attach. (internal call only)
Assumes that the domain SM lock is already locked
The HAL domain attach function is started.
| domain | Pointer to the domain object. |
| s_id | FC_ID of which to register this domain. |
Definition at line 1280 of file ocs_domain.c.
| int ocs_ddump_domain | ( | ocs_textbuf_t * | textbuf, |
| ocs_domain_t * | domain | ||
| ) |
Generate a domain ddump.
Generates a domain ddump.
| textbuf | Pointer to the text buffer. |
| domain | Pointer to the domain context. |
Definition at line 1376 of file ocs_domain.c.
| ocs_domain_t* ocs_domain_alloc | ( | ocs_t * | ocs, |
| uint64_t | fcf_wwn | ||
| ) |
Allocate a domain object.
A domain object is allocated and initialized. It is associated with the ocs argument.
| ocs | Pointer to the OCS device. |
| fcf_wwn | FCF WWN of the domain. |
Definition at line 218 of file ocs_domain.c.
| void ocs_domain_attach | ( | ocs_domain_t * | domain, |
| uint32_t | s_id | ||
| ) |
Initiator domain attach.
The HAL domain attach function is started.
| domain | Pointer to the domain object. |
| s_id | FC_ID of which to register this domain. |
Definition at line 1299 of file ocs_domain.c.
| int32_t ocs_domain_cb | ( | void * | arg, |
| ocs_hal_domain_event_e | event, | ||
| void * | data | ||
| ) |
Accept domain callback events from the HAL.
HAL calls this function with various domain-related events.
| arg | Application-specified argument. |
| event | Domain event. |
| data | Event specific data. |
Definition at line 94 of file ocs_domain.c.
| ocs_domain_t* ocs_domain_find | ( | ocs_t * | ocs, |
| uint64_t | fcf_wwn | ||
| ) |
Find the domain, given its FCF_WWN.
Search the domain_list to find a matching domain object.
| ocs | Pointer to the OCS device. |
| fcf_wwn | FCF WWN to find. |
Definition at line 189 of file ocs_domain.c.
| void ocs_domain_force_free | ( | ocs_domain_t * | domain | ) |
Free memory resources of a domain object.
After the domain object is freed, its child objects are also freed.
| domain | Pointer to a domain object. |
Definition at line 341 of file ocs_domain.c.
| void ocs_domain_free | ( | ocs_domain_t * | domain | ) |
Free a domain object.
The domain object is freed.
| domain | Domain object to free. |
Definition at line 279 of file ocs_domain.c.
| ocs_domain_t* ocs_domain_get_instance | ( | ocs_t * | ocs, |
| uint32_t | index | ||
| ) |
Return a pointer to the domain, given the instance index.
A pointer to the domain context, given by the index, is returned.
| ocs | Pointer to the driver instance context. |
| index | Instance index. |
Definition at line 414 of file ocs_domain.c.
| int ocs_domain_post_event | ( | ocs_domain_t * | domain, |
| ocs_sm_event_t | event, | ||
| void * | arg | ||
| ) |
Definition at line 1307 of file ocs_domain.c.
| void ocs_domain_save_sparms | ( | ocs_domain_t * | domain, |
| void * | payload | ||
| ) |
Save the port's service parameters.
Service parameters from the fabric FLOGI are saved in the domain's flogi_service_params array.
| domain | Pointer to the domain. |
| payload | Service parameters to save. |
Definition at line 1261 of file ocs_domain.c.
| uint64_t ocs_get_wwn | ( | ocs_hal_t * | hal, |
| ocs_hal_property_e | prop | ||
| ) |
Return the WWN as a uint64_t.
Calls the HAL property function for the WWNN or WWPN, and returns the value as a uint64_t.
| hal | Pointer to the HAL object. |
| prop | HAL property. |
Definition at line 1349 of file ocs_domain.c.
| int ocs_mgmt_domain_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 1617 of file ocs_domain.c.
| void ocs_mgmt_domain_exec_cb | ( | ocs_domain_t * | domain, |
| void * | arg_in | ||
| ) |
Definition at line 1603 of file ocs_domain.c.
| int ocs_mgmt_domain_get | ( | ocs_textbuf_t * | textbuf, |
| char * | parent, | ||
| char * | name, | ||
| void * | domain | ||
| ) |
Definition at line 1457 of file ocs_domain.c.
| void ocs_mgmt_domain_get_all | ( | ocs_textbuf_t * | textbuf, |
| void * | domain | ||
| ) |
Definition at line 1531 of file ocs_domain.c.
| void ocs_mgmt_domain_list | ( | ocs_textbuf_t * | textbuf, |
| void * | domain | ||
| ) |
Definition at line 1421 of file ocs_domain.c.
| int ocs_mgmt_domain_set | ( | char * | parent, |
| char * | name, | ||
| char * | value, | ||
| void * | domain | ||
| ) |
Definition at line 1565 of file ocs_domain.c.
| void ocs_register_domain_list_empty_cb | ( | ocs_t * | ocs | ) |
Register a callback when the domain_list goes empty.
A function callback may be registered when the domain_list goes empty.
| ocs | Pointer to a device object. |
Definition at line 389 of file ocs_domain.c.
| void ocs_unregister_domain_list_empty_cb | ( | ocs_t * | ocs | ) |
Unregister a callback for the domain_list empty cb.
A function callback may be unregistered when the domain_list goes empty.
| ocs | Pointer to a device object. |
Definition at line 370 of file ocs_domain.c.
|
static |
Definition at line 72 of file ocs_domain.c.