Emulex Logo
OneCoreā„¢ Storage SDK Release 11.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ocs_xport.h File Reference

Go to the source code of this file.

Data Structures

struct  ocs_xport_fcfi_t
 FCFI lookup/pending frames. More...
 
struct  ocs_xport_rq_thread_info_t
 Structure to hold the information related to an RQ processing thread used to increase 40G performance. More...
 
struct  ocs_xport_link_stats_t
 
struct  ocs_xport_host_stats_t
 
struct  ocs_xport_fcp_statistics_t
 
struct  ocs_xport_host_statistics_t
 
union  ocs_xport_stats_t
 
struct  ocs_xport_t
 Transport private values. More...
 

Enumerations

enum  ocs_xport_ctrl_e {
  OCS_XPORT_PORT_ONLINE =1, OCS_XPORT_PORT_OFFLINE, OCS_XPORT_SHUTDOWN, OCS_XPORT_POST_NODE_EVENT,
  OCS_XPORT_WWNN_SET, OCS_XPORT_WWPN_SET
}
 
enum  ocs_xport_status_e {
  OCS_XPORT_PORT_STATUS, OCS_XPORT_CONFIG_PORT_STATUS, OCS_XPORT_LINK_SPEED, OCS_XPORT_LOGICAL_LINK_SPEED,
  OCS_XPORT_IS_SUPPORTED_LINK_SPEED, OCS_XPORT_LINK_STATISTICS, OCS_XPORT_LINK_STAT_RESET, OCS_XPORT_IS_QUIESCED
}
 

Functions

ocs_xport_t * ocs_xport_alloc (ocs_t *ocs)
 Allocate a transport object. More...
 
int32_t ocs_xport_attach (ocs_xport_t *xport)
 Do as much allocation as possible, but do not initialization the device. More...
 
int32_t ocs_xport_initialize (ocs_xport_t *xport)
 Initializes the device. More...
 
int32_t ocs_xport_detach (ocs_xport_t *xport)
 Detaches the transport from the device. More...
 
int32_t ocs_xport_control (ocs_xport_t *xport, ocs_xport_ctrl_e cmd,...)
 Perform transport attach function. More...
 
int32_t ocs_xport_status (ocs_xport_t *xport, ocs_xport_status_e cmd, ocs_xport_stats_t *result)
 Return status on a link. More...
 
void ocs_xport_free (ocs_xport_t *xport)
 Free a transport object. More...
 
void ocs_xport_config_stats_timer (void *arg)
 Get FC link and host Statistics periodically. More...
 
void ocs_device_stop_stats_timers (ocs_t *ocs)
 
int32_t ocs_xport_cb (void *arg, ocs_hal_xport_event_e event)
 callback function for xport from HAL. More...
 

Enumeration Details

Enumerator
OCS_XPORT_PORT_ONLINE 
OCS_XPORT_PORT_OFFLINE 
OCS_XPORT_SHUTDOWN 
OCS_XPORT_POST_NODE_EVENT 
OCS_XPORT_WWNN_SET 
OCS_XPORT_WWPN_SET 

Definition at line 63 of file ocs_xport.h.

Enumerator
OCS_XPORT_PORT_STATUS 
OCS_XPORT_CONFIG_PORT_STATUS 
OCS_XPORT_LINK_SPEED 
OCS_XPORT_LOGICAL_LINK_SPEED 
OCS_XPORT_IS_SUPPORTED_LINK_SPEED 
OCS_XPORT_LINK_STATISTICS 
OCS_XPORT_LINK_STAT_RESET 
OCS_XPORT_IS_QUIESCED 

Definition at line 72 of file ocs_xport.h.

Function Details

void ocs_device_stop_stats_timers ( ocs_t *  ocs)

Definition at line 1319 of file ocs_xport.c.

ocs_xport_t* ocs_xport_alloc ( ocs_t *  ocs)

Allocate a transport object.

Description
A transport object is allocated, and associated with a device instance.
Parameters
ocsPointer to device instance.
Returns
Returns the pointer to the allocated transport object, or NULL if failed.

Definition at line 71 of file ocs_xport.c.

int32_t ocs_xport_attach ( ocs_xport_t *  xport)

Do as much allocation as possible, but do not initialization the device.

Description
Performs the functions required to get a device ready to run.
Parameters
xportPointer to transport object.
Returns
Returns 0 on success, or a non-zero value on failure.

Definition at line 193 of file ocs_xport.c.

int32_t ocs_xport_cb ( void *  arg,
ocs_hal_xport_event_e  event 
)

callback function for xport from HAL.

Description
Handling XPORT event
Parameters
OCScontext.
Returns
status.

Definition at line 1428 of file ocs_xport.c.

void ocs_xport_config_stats_timer ( void *  arg)

Get FC link and host Statistics periodically.

Parameters
halHardware context.
Returns
NONE.

Definition at line 1354 of file ocs_xport.c.

int32_t ocs_xport_control ( ocs_xport_t *  xport,
ocs_xport_ctrl_e  cmd,
  ... 
)

Perform transport attach function.

Description
Perform the attach function, which for the FC transport makes a HAL call to bring up the link.
Parameters
xportpointer to transport object.
cmdcommand to execute.

ocs_xport_control(ocs_xport_t *xport, OCS_XPORT_PORT_ONLINE) ocs_xport_control(ocs_xport_t *xport, OCS_XPORT_PORT_OFFLINE) ocs_xport_control(ocs_xport_t *xport, OCS_XPORT_PORT_SHUTDOWN) ocs_xport_control(ocs_xport_t *xport, OCS_XPORT_POST_NODE_EVENT, ocs_node_t *node, ocs_sm_event_t, void *context)

Returns
Returns 0 on success, or a negative error code value on failure.

Definition at line 866 of file ocs_xport.c.

int32_t ocs_xport_detach ( ocs_xport_t *  xport)

Detaches the transport from the device.

Description
Performs the functions required to shut down a device.
Parameters
xportPointer to transport object.
Returns
Returns 0 on success or a non-zero value on failure.

Definition at line 735 of file ocs_xport.c.

void ocs_xport_free ( ocs_xport_t *  xport)

Free a transport object.

Description
The transport object is freed.
Parameters
xportPointer to transport object.
Returns
None.

Definition at line 1394 of file ocs_xport.c.

int32_t ocs_xport_initialize ( ocs_xport_t *  xport)

Initializes the device.

Description
Performs the functions required to make a device functional.
Parameters
xportPointer to transport object.
Returns
Returns 0 on success, or a non-zero value on failure.

Definition at line 509 of file ocs_xport.c.

int32_t ocs_xport_status ( ocs_xport_t *  xport,
ocs_xport_status_e  cmd,
ocs_xport_stats_t *  result 
)

Return status on a link.

Description
Returns status information about a link.
Parameters
xportPointer to transport object.
cmdCommand to execute.
resultPointer to result value.

ocs_xport_status(ocs_xport_t *xport, OCS_XPORT_PORT_STATUS) ocs_xport_status(ocs_xport_t *xport, OCS_XPORT_LINK_SPEED, ocs_xport_stats_t *result) return link speed in MB/sec ocs_xport_status(ocs_xport_t *xport, OCS_XPORT_IS_SUPPORTED_LINK_SPEED, ocs_xport_stats_t *result) [in] *result is speed to check in MB/s returns 1 if supported, 0 if not ocs_xport_status(ocs_xport_t *xport, OCS_XPORT_LINK_STATISTICS, ocs_xport_stats_t *result) return link/host port stats ocs_xport_status(ocs_xport_t *xport, OCS_XPORT_LINK_STAT_RESET, ocs_xport_stats_t *result) resets link/host stats

Returns
Returns 0 on success, or a negative error code value on failure.

Definition at line 1073 of file ocs_xport.c.