Emulex Logo
OneCoreā„¢ Storage SDK Release 11.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Node allocation

Functions

ocs_node_t * ocs_node_find (ocs_sport_t *sport, uint32_t port_id)
 Find an FC node structure given the FC port ID. More...
 
ocs_node_t * ocs_node_find_wwpn (ocs_sport_t *sport, uint64_t wwpn)
 Find an FC node structure given the WWPN. More...
 
ocs_node_t * ocs_node_find_wwnn (ocs_sport_t *sport, uint64_t wwnn)
 Find an FC node structure given the WWNN. More...
 
int32_t ocs_node_create_pool (ocs_t *ocs, uint32_t node_count)
 allocate node object pool More...
 
void ocs_node_free_pool (ocs_t *ocs)
 free node object pool More...
 
ocs_node_t * ocs_node_get_instance (ocs_t *ocs, uint32_t index)
 return pointer to node object given instance index More...
 
ocs_node_t * ocs_node_alloc (ocs_sport_t *sport, uint32_t port_id, uint8_t init, uint8_t targ)
 Allocate an fc node structure and add to node list. More...
 
int32_t ocs_node_free (ocs_node_t *node)
 free a node structure More...
 

Function Details

ocs_node_t* ocs_node_alloc ( ocs_sport_t *  sport,
uint32_t  port_id,
uint8_t  init,
uint8_t  targ 
)

Allocate an fc node structure and add to node list.

Parameters
sportpointer to the SPORT from which this node is allocated
port_idFC port ID of new node
initPort is an inititiator (sent a plogi)
targPort is potentially a target
Returns
pointer to the object or NULL if none available

Definition at line 415 of file ocs_node.c.

int32_t ocs_node_create_pool ( ocs_t *  ocs,
uint32_t  node_count 
)

allocate node object pool

A pool of ocs_node_t objects is allocated.

Parameters
ocspointer to driver instance context
node_countcount of nodes to allocate
Returns
returns 0 for success, a negative error code value for failure.

Definition at line 281 of file ocs_node.c.

ocs_node_t* ocs_node_find ( ocs_sport_t *  sport,
uint32_t  port_id 
)

Find an FC node structure given the FC port ID.

Parameters
sportthe SPORT to search
port_idFC port ID
Returns
pointer to the object or NULL if not found

Definition at line 202 of file ocs_node.c.

ocs_node_t* ocs_node_find_wwnn ( ocs_sport_t *  sport,
uint64_t  wwnn 
)

Find an FC node structure given the WWNN.

Parameters
sportthe SPORT to search
wwnnthe WWNN to search for (host endian)
Returns
pointer to the object or NULL if not found

Definition at line 250 of file ocs_node.c.

ocs_node_t* ocs_node_find_wwpn ( ocs_sport_t *  sport,
uint64_t  wwpn 
)

Find an FC node structure given the WWPN.

Parameters
sportthe SPORT to search
wwpnthe WWPN to search for (host endian)
Returns
pointer to the object or NULL if not found

Definition at line 223 of file ocs_node.c.

int32_t ocs_node_free ( ocs_node_t *  node)

free a node structure

The node structure given by 'node' is free'd

Parameters
nodethe node to free
Returns
returns 0 for success, a negative error code value for failure.

Definition at line 510 of file ocs_node.c.

void ocs_node_free_pool ( ocs_t *  ocs)

free node object pool

The pool of previously allocated node objects is freed

Parameters
ocspointer to driver instance context
Returns
none

Definition at line 350 of file ocs_node.c.

ocs_node_t* ocs_node_get_instance ( ocs_t *  ocs,
uint32_t  index 
)

return pointer to node object given instance index

A pointer to the node object given by an instance index is returned.

Parameters
ocspointer to driver instance context
indexinstance index
Returns
returns pointer to node object, or NULL

Definition at line 389 of file ocs_node.c.