Emulex Logo
OneCoreā„¢ Storage SDK Release 11.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ELS/BLS/CT Command and Response Functions

Functions

static void ocs_io_transition (ocs_io_t *els, ocs_sm_function_t state, void *data)
 ELS state machine transition wrapper. More...
 
void ocs_els_post_event (ocs_io_t *els, ocs_sm_event_t evt, void *data)
 ELS state machine post event wrapper. More...
 
ocs_io_t * ocs_els_io_alloc (ocs_node_t *node, uint32_t reqlen, ocs_els_role_e role)
 Allocate an IO structure for an ELS IO context. More...
 
ocs_io_t * ocs_els_io_alloc_size (ocs_node_t *node, uint32_t reqlen, uint32_t rsplen, ocs_els_role_e role)
 Allocate an IO structure for an ELS IO context. More...
 
void ocs_els_io_free (ocs_io_t *els)
 Free IO structure for an ELS IO context. More...
 
static void _ocs_els_io_free (void *arg)
 Free IO structure for an ELS IO context. More...
 
static void ocs_els_make_active (ocs_io_t *els)
 Make ELS IO active. More...
 
static int32_t ocs_els_send (ocs_io_t *els, uint32_t reqlen, uint32_t timeout_sec, ocs_hal_srrs_cb_t cb)
 Send the ELS command. More...
 
static int32_t ocs_els_send_rsp (ocs_io_t *els, uint32_t rsplen)
 Send the ELS response. More...
 
static int32_t ocs_els_req_cb (ocs_hal_io_t *hio, ocs_remote_node_t *rnode, uint32_t length, int32_t status, uint32_t ext_status, void *arg)
 Handle ELS IO request completions. More...
 
static int32_t ocs_els_acc_cb (ocs_hal_io_t *hio, ocs_remote_node_t *rnode, uint32_t length, int32_t status, uint32_t ext_status, void *arg)
 Handle ELS IO accept/response completions. More...
 
ocs_io_t * ocs_send_plogi (ocs_node_t *node, uint32_t timeout_sec, uint32_t retries, void(*cb)(ocs_node_t *node, ocs_node_cb_t *cbdata, void *arg), void *cbarg)
 Format and send a PLOGI ELS command. More...
 
ocs_io_t * ocs_send_flogi (ocs_node_t *node, uint32_t timeout_sec, uint32_t retries, els_cb_t cb, void *cbarg)
 Format and send a FLOGI ELS command. More...
 
ocs_io_t * ocs_send_fdisc (ocs_node_t *node, uint32_t timeout_sec, uint32_t retries, els_cb_t cb, void *cbarg)
 Format and send a FDISC ELS command. More...
 
ocs_io_t * ocs_send_prli (ocs_node_t *node, uint32_t timeout_sec, uint32_t retries, els_cb_t cb, void *cbarg)
 Send a PRLI ELS command. More...
 
ocs_io_t * ocs_send_prlo (ocs_node_t *node, uint32_t timeout_sec, uint32_t retries, els_cb_t cb, void *cbarg)
 Send a PRLO ELS command. More...
 
ocs_io_t * ocs_send_logo (ocs_node_t *node, uint32_t timeout_sec, uint32_t retries, els_cb_t cb, void *cbarg)
 Send a LOGO ELS command. More...
 
ocs_io_t * ocs_send_adisc (ocs_node_t *node, uint32_t timeout_sec, uint32_t retries, els_cb_t cb, void *cbarg)
 Send an ADISC ELS command. More...
 
ocs_io_t * ocs_send_pdisc (ocs_node_t *node, uint32_t timeout_sec, uint32_t retries, els_cb_t cb, void *cbarg)
 Send a PDISC ELS command. More...
 
ocs_io_t * ocs_send_scr (ocs_node_t *node, uint32_t timeout_sec, uint32_t retries, els_cb_t cb, void *cbarg)
 Send an SCR ELS command. More...
 
ocs_io_t * ocs_send_rrq (ocs_node_t *node, uint32_t timeout_sec, uint32_t retries, els_cb_t cb, void *cbarg)
 Send an RRQ ELS command. More...
 
ocs_io_t * ocs_send_rscn (ocs_node_t *node, uint32_t timeout_sec, uint32_t retries, void *port_ids, uint32_t port_ids_count, els_cb_t cb, void *cbarg)
 Send an RSCN ELS command. More...
 
ocs_io_t * ocs_send_plogi_acc (ocs_io_t *io, uint32_t ox_id, els_cb_t cb, void *cbarg)
 Send a PLOGI accept response. More...
 
ocs_io_t * ocs_send_flogi_p2p_acc (ocs_io_t *io, uint32_t ox_id, uint32_t s_id, els_cb_t cb, void *cbarg)
 Send an FLOGI accept response for point-to-point negotiation. More...
 
ocs_io_t * ocs_send_prli_acc (ocs_io_t *io, uint32_t ox_id, uint8_t fc_type, els_cb_t cb, void *cbarg)
 Send a PRLI accept response. More...
 
ocs_io_t * ocs_send_prlo_acc (ocs_io_t *io, uint32_t ox_id, uint8_t fc_type, els_cb_t cb, void *cbarg)
 Send a PRLO accept response. More...
 
ocs_io_t * ocs_send_ls_acc (ocs_io_t *io, uint32_t ox_id, els_cb_t cb, void *cbarg)
 Send a generic LS_ACC response without a payload. More...
 
ocs_io_t * ocs_send_logo_acc (ocs_io_t *io, uint32_t ox_id, els_cb_t cb, void *cbarg)
 Send a LOGO accept response. More...
 
ocs_io_t * ocs_send_adisc_acc (ocs_io_t *io, uint32_t ox_id, els_cb_t cb, void *cbarg)
 Send an ADISC accept response. More...
 
ocs_io_t * ocs_ns_send_rftid (ocs_node_t *node, uint32_t timeout_sec, uint32_t retries, els_cb_t cb, void *cbarg)
 Send a RFTID CT request. More...
 
ocs_io_t * ocs_ns_send_rffid (ocs_node_t *node, uint8_t fc_type, uint32_t timeout_sec, uint32_t retries, els_cb_t cb, void *cbarg)
 Send a RFFID CT request. More...
 
ocs_io_t * ocs_ns_send_gidpt (ocs_node_t *node, uint32_t timeout_sec, uint32_t retries, els_cb_t cb, void *cbarg)
 Send a GIDPT CT request. More...
 
ocs_io_t * ocs_ns_send_ganxt (ocs_node_t *node, uint32_t timeout_sec, uint32_t retries, els_cb_t cb, void *cbarg, uint32_t port_id)
 Send a GA_NEXT CT request. More...
 
ocs_io_t * ocs_fdmi_send_rhba (ocs_node_t *node, uint32_t timeout_sec, uint32_t retries, els_cb_t cb, void *cbarg)
 Send a RHBA CT request. More...
 
ocs_io_t * ocs_fdmi_send_dereg_cmd (ocs_node_t *node, uint16_t dereg_code, uint32_t timeout_sec, uint32_t retries, els_cb_t cb, void *cbarg)
 Send a FDMI dereg CT request. More...
 
ocs_io_t * ocs_fdmi_send_reg_port (ocs_node_t *node, int req_code, uint32_t timeout_sec, uint32_t retries, els_cb_t cb, void *cbarg)
 Send a RPRT/RPA CT request. More...
 
ocs_io_t * ocs_fdmi_send_get_cmd (ocs_node_t *node, uint32_t timeout_sec, uint32_t retries, els_cb_t cb, void *cbarg, ocs_fdmi_get_cmd_req_info_t *req_info)
 Send a GHRL CT request. More...
 
ocs_io_t * ocs_bls_send_acc_hdr (ocs_io_t *io, fc_header_t *hdr)
 Send a BA_ACC given the request's FC header. More...
 
static ocs_io_t * ocs_bls_send_acc (ocs_io_t *io, uint32_t s_id, uint16_t ox_id, uint16_t rx_id)
 Send a BLS BA_ACC response. More...
 
static ocs_io_t * ocs_bls_send_rjt (ocs_io_t *io, uint32_t s_id, uint16_t ox_id, uint16_t rx_id)
 Send a BLS BA_RJT response. More...
 

Function Details

static void _ocs_els_io_free ( void *  arg)
static

Free IO structure for an ELS IO context.

Description

Free IO for an ELS IO context

Parameters
argELS IO structure for which IO is allocated
Returns
None

Definition at line 348 of file ocs_els.c.

static ocs_io_t * ocs_bls_send_acc ( ocs_io_t *  io,
uint32_t  s_id,
uint16_t  ox_id,
uint16_t  rx_id 
)
static

Send a BLS BA_ACC response.

Description

Construct a BLS BA_ACC response, and send to the node.

Parameters
ioPointer to a SCSI IO object.
s_idS_ID to use for the response. If UINT32_MAX, then use our SLI port (sport) S_ID.
ox_idOriginator exchange ID.
rx_idResponder exchange ID.
Returns
Returns pointer to IO object, or NULL if error.

Definition at line 2599 of file ocs_els.c.

ocs_io_t* ocs_bls_send_acc_hdr ( ocs_io_t *  io,
fc_header_t *  hdr 
)

Send a BA_ACC given the request's FC header.

Description

Using the S_ID/D_ID from the request's FC header, generate a BA_ACC.

Parameters
ioPointer to a SCSI IO object.
hdrPointer to the FC header.
Returns
Returns pointer to IO object, or NULL if error.

Definition at line 2573 of file ocs_els.c.

static ocs_io_t * ocs_bls_send_rjt ( ocs_io_t *  io,
uint32_t  s_id,
uint16_t  ox_id,
uint16_t  rx_id 
)
static

Send a BLS BA_RJT response.

Description

Construct a BLS BA_RJT response, and send to the node.

Parameters
ioPointer to a SCSI IO object.
s_idS_ID to use for the response. If UINT32_MAX, then use our SLI port (sport) S_ID.
ox_idOriginator exchange ID.
rx_idResponder exchange ID.
Returns
Returns pointer to IO object, or NULL if error.

Definition at line 2709 of file ocs_els.c.

static int32_t ocs_els_acc_cb ( ocs_hal_io_t *  hio,
ocs_remote_node_t *  rnode,
uint32_t  length,
int32_t  status,
uint32_t  ext_status,
void *  arg 
)
static

Handle ELS IO accept/response completions.

Description

This callback is used for several ELS send operations.

Parameters
hioPointer to the HAL IO context that completed.
rnodePointer to the remote node.
lengthLength of the returned payload data.
statusStatus of the completion.
ext_statusExtended status of the completion.
argApplication-specific argument (generally a pointer to the ELS IO context).
Returns
Returns 0 on success; or a negative error value on failure.

Definition at line 629 of file ocs_els.c.

ocs_io_t* ocs_els_io_alloc ( ocs_node_t *  node,
uint32_t  reqlen,
ocs_els_role_e  role 
)

Allocate an IO structure for an ELS IO context.

Description

Allocate an IO for an ELS context. Uses OCS_ELS_RSP_LEN as response size.

Parameters
nodenode to associate ELS IO with
reqlenLength of ELS request
roleRole of ELS (originator/responder)
Returns
pointer to IO structure allocated

Definition at line 197 of file ocs_els.c.

ocs_io_t* ocs_els_io_alloc_size ( ocs_node_t *  node,
uint32_t  reqlen,
uint32_t  rsplen,
ocs_els_role_e  role 
)

Allocate an IO structure for an ELS IO context.

Description

Allocate an IO for an ELS context, allowing the caller to specify the size of the response.

Parameters
nodenode to associate ELS IO with
reqlenLength of ELS request
rsplenLength of ELS response
roleRole of ELS (originator/responder)
Returns
pointer to IO structure allocated

Definition at line 218 of file ocs_els.c.

void ocs_els_io_free ( ocs_io_t *  els)

Free IO structure for an ELS IO context.

Description

Free IO for an ELS IO context

Parameters
elsELS IO structure for which IO is allocated
Returns
None

Definition at line 330 of file ocs_els.c.

static void ocs_els_make_active ( ocs_io_t *  els)
static

Make ELS IO active.

Parameters
elsPointer to the IO context to make active.
Returns
Returns 0 on success; or a negative error code value on failure.

Definition at line 410 of file ocs_els.c.

void ocs_els_post_event ( ocs_io_t *  els,
ocs_sm_event_t  evt,
void *  data 
)

ELS state machine post event wrapper.

Description

Post an event wrapper for the ELS state machine. This function grabs the node lock prior to posting the event.

Parameters
elsPointer to the IO context.
evtEvent to process.
dataData to pass in with the transition.
Returns
None.

Definition at line 168 of file ocs_els.c.

static int32_t ocs_els_req_cb ( ocs_hal_io_t *  hio,
ocs_remote_node_t *  rnode,
uint32_t  length,
int32_t  status,
uint32_t  ext_status,
void *  arg 
)
static

Handle ELS IO request completions.

Description

This callback is used for several ELS send operations.

Parameters
hioPointer to the HAL IO context that completed.
rnodePointer to the remote node.
lengthLength of the returned payload data.
statusStatus of the completion.
ext_statusExtended status of the completion.
argApplication-specific argument (generally a pointer to the ELS IO context).
Returns
Returns 0 on success; or a negative error value on failure.

For ELS WQE completions, we seem to acquire the sport and node locks in a different order when compared to other code paths. So, acquire the sport lock here to avoid the deadlock.

FW returns the number of bytes received on the link in the WCQE, not the amount placed in the buffer. So, use this info to check if there was an overrun.

Definition at line 520 of file ocs_els.c.

static int32_t ocs_els_send ( ocs_io_t *  els,
uint32_t  reqlen,
uint32_t  timeout_sec,
ocs_hal_srrs_cb_t  cb 
)
static

Send the ELS command.

Description

The command, given by the els IO context, is sent to the node that the IO was configured with, using ocs_hal_srrs_send(). Upon completion, the cb callback is invoked, with the application-specific argument set to the els IO context.

Parameters
elsPointer to the IO context.
reqlenByte count in the payload to send.
timeout_secCommand timeout, in seconds (0 -> 2*R_A_TOV).
cbCompletion callback.
Returns
Returns 0 on success; or a negative error code value on failure.

Definition at line 459 of file ocs_els.c.

static int32_t ocs_els_send_rsp ( ocs_io_t *  els,
uint32_t  rsplen 
)
static

Send the ELS response.

Description

The ELS response, given by the els IO context, is sent to the node that the IO was configured with, using ocs_hal_srrs_send().

Parameters
elsPointer to the IO context.
rsplenByte count in the payload to send.
Returns
Returns 0 on success; or a negative error value on failure.

Definition at line 488 of file ocs_els.c.

ocs_io_t* ocs_fdmi_send_dereg_cmd ( ocs_node_t *  node,
uint16_t  dereg_code,
uint32_t  timeout_sec,
uint32_t  retries,
els_cb_t  cb,
void *  cbarg 
)

Send a FDMI dereg CT request.

Description

Construct an DHBA/DPRT CT request, and send to the node.

Parameters
nodeNode to which the dereg request is sent.
timeout_secTime, in seconds, to wait before timing out the ELS.
retriesNumber of times to retry errors before reporting a failure.
cbCallback function.
cbargCallback function argument.
Returns
Returns pointer to IO object, or NULL if error.

Definition at line 2332 of file ocs_els.c.

ocs_io_t* ocs_fdmi_send_get_cmd ( ocs_node_t *  node,
uint32_t  timeout_sec,
uint32_t  retries,
els_cb_t  cb,
void *  cbarg,
ocs_fdmi_get_cmd_req_info_t *  req_info 
)

Send a GHRL CT request.

Description

Construct a GHRL CT request, and send to the node.

Parameters
nodeNode to which the GHRL request is sent.
timeout_secTime, in seconds, to wait before timing out the ELS.
retriesNumber of times to retry errors before reporting a failure.
cbCallback function.
cbargCallback function argument.
Returns
Returns pointer to IO object, or NULL if error.

Definition at line 2492 of file ocs_els.c.

ocs_io_t* ocs_fdmi_send_reg_port ( ocs_node_t *  node,
int  req_code,
uint32_t  timeout_sec,
uint32_t  retries,
els_cb_t  cb,
void *  cbarg 
)

Send a RPRT/RPA CT request.

Description

Construct an RPRT/RPA CT request, and send to the node.

Parameters
nodeNode to which the RPRT/RPA request is sent. command code(RPRT/RPA)
timeout_secTime, in seconds, to wait before timing out the ELS.
retriesNumber of times to retry errors before reporting a failure.
cbCallback function.
cbargCallback function argument.
Returns
Returns pointer to IO object, or NULL if error.

Definition at line 2388 of file ocs_els.c.

ocs_io_t* ocs_fdmi_send_rhba ( ocs_node_t *  node,
uint32_t  timeout_sec,
uint32_t  retries,
els_cb_t  cb,
void *  cbarg 
)

Send a RHBA CT request.

Description

Construct an RHBA CT request, and send to the node.

Parameters
nodeNode to which the RHBA request is sent.
timeout_secTime, in seconds, to wait before timing out the ELS.
retriesNumber of times to retry errors before reporting a failure.
cbCallback function.
cbargCallback function argument.
Returns
Returns pointer to IO object, or NULL if error.

Definition at line 2246 of file ocs_els.c.

static void ocs_io_transition ( ocs_io_t *  els,
ocs_sm_function_t  state,
void *  data 
)
static

ELS state machine transition wrapper.

Description

This function is the transition wrapper for the ELS state machine. It grabs the node lock prior to making the transition to protect against multiple threads accessing a particular ELS. For example, one thread transitioning from __els_init to __ocs_els_wait_resp and another thread (tasklet) handling the completion of that ELS request.

Parameters
elsPointer to the IO context.
stateState to transition to.
dataData to pass in with the transition.
Returns
None.

Definition at line 144 of file ocs_els.c.

ocs_io_t* ocs_ns_send_ganxt ( ocs_node_t *  node,
uint32_t  timeout_sec,
uint32_t  retries,
els_cb_t  cb,
void *  cbarg,
uint32_t  port_id 
)

Send a GA_NEXT CT request.

Description

Construct a GA_NEXT CT request, and send to the node.

Parameters
nodeNode to which the GIDFT request is sent.
timeout_secTime, in seconds, to wait before timing out the ELS.
retriesNumber of times to retry errors before reporting a failure.
cbCallback function.
cbargCallback function argument.
Returns
Returns pointer to IO object, or NULL if error.

Definition at line 2187 of file ocs_els.c.

ocs_io_t* ocs_ns_send_gidpt ( ocs_node_t *  node,
uint32_t  timeout_sec,
uint32_t  retries,
els_cb_t  cb,
void *  cbarg 
)

Send a GIDPT CT request.

Description

Construct a GIDPT CT request, and send to the node.

Parameters
nodeNode to which the GIDPT request is sent.
timeout_secTime, in seconds, to wait before timing out the ELS.
retriesNumber of times to retry errors before reporting a failure.
cbCallback function.
cbargCallback function argument.
Returns
Returns pointer to IO object, or NULL if error.

Definition at line 2076 of file ocs_els.c.

ocs_io_t* ocs_ns_send_rffid ( ocs_node_t *  node,
uint8_t  fc_type,
uint32_t  timeout_sec,
uint32_t  retries,
els_cb_t  cb,
void *  cbarg 
)

Send a RFFID CT request.

Description

Construct an RFFID CT request, and send to the node.

Parameters
nodeNode to which the RFFID request is sent.
timeout_secTime, in seconds, to wait before timing out the ELS.
retriesNumber of times to retry errors before reporting a failure.
cbCallback function
cbargCallback function argument.
Returns
Returns pointer to IO object, or NULL if error.

Definition at line 2005 of file ocs_els.c.

ocs_io_t* ocs_ns_send_rftid ( ocs_node_t *  node,
uint32_t  timeout_sec,
uint32_t  retries,
els_cb_t  cb,
void *  cbarg 
)

Send a RFTID CT request.

Description

Construct an RFTID CT request, and send to the node.

Parameters
nodeNode to which the RFTID request is sent.
timeout_secTime, in seconds, to wait before timing out the ELS.
retriesNumber of times to retry errors before reporting a failure.
cbCallback function.
cbargCallback function argument.
Returns
Returns pointer to IO object, or NULL if error.

Definition at line 1942 of file ocs_els.c.

ocs_io_t* ocs_send_adisc ( ocs_node_t *  node,
uint32_t  timeout_sec,
uint32_t  retries,
els_cb_t  cb,
void *  cbarg 
)

Send an ADISC ELS command.

Description

Construct an ADISC ELS command, and send to the node.

Parameters
nodeNode to which the ADISC is sent.
timeout_secCommand timeout, in seconds.
retriesNumber of times to retry errors before reporting a failure.
cbCallback function.
cbargCallback function argument.
Returns
Returns pointer to IO object, or NULL if error.

Definition at line 1081 of file ocs_els.c.

ocs_io_t* ocs_send_adisc_acc ( ocs_io_t *  io,
uint32_t  ox_id,
els_cb_t  cb,
void *  cbarg 
)

Send an ADISC accept response.

Description

Construct an ADISC LS__ACC, and send to the node, using the originator exchange id ox_id.

Parameters
ioPointer to a SCSI IO object.
ox_idOriginator exchange ID.
cbCallback function.
cbargCallback function argument.
Returns
Returns pointer to IO object, or NULL if error.

Definition at line 1883 of file ocs_els.c.

ocs_io_t* ocs_send_fdisc ( ocs_node_t *  node,
uint32_t  timeout_sec,
uint32_t  retries,
els_cb_t  cb,
void *  cbarg 
)

Format and send a FDISC ELS command.

Description

Construct an FDISC payload, and send to the node.

Parameters
nodeNode to which the FDISC is sent.
timeout_secCommand timeout, in seconds.
retriesNumber of times to retry errors before reporting a failure.
cbCallback function.
cbargCallback function argument.
Returns
Returns pointer to IO object, or NULL if error.

Definition at line 842 of file ocs_els.c.

ocs_io_t* ocs_send_flogi ( ocs_node_t *  node,
uint32_t  timeout_sec,
uint32_t  retries,
els_cb_t  cb,
void *  cbarg 
)

Format and send a FLOGI ELS command.

Description

Construct an FLOGI payload, and send to the node.

Parameters
nodeNode to which the FLOGI is sent.
timeout_secCommand timeout, in seconds.
retriesNumber of times to retry errors before reporting a failure.
cbCallback function.
cbargCallback function argument.
Returns
Returns pointer to IO object, or NULL if error.

Definition at line 773 of file ocs_els.c.

ocs_io_t* ocs_send_flogi_p2p_acc ( ocs_io_t *  io,
uint32_t  ox_id,
uint32_t  s_id,
els_cb_t  cb,
void *  cbarg 
)

Send an FLOGI accept response for point-to-point negotiation.

Description

Construct an FLOGI accept response, and send to the node using the originator exchange id ox_id. The s_id is used for the response frame source FC ID.

Parameters
ioPointer to a SCSI IO object.
ox_idOriginator exchange ID for the response.
s_idSource FC ID to be used in the response frame.
cbCallback function.
cbargCallback function argument.
Returns
Returns pointer to IO object, or NULL if error.

Definition at line 1491 of file ocs_els.c.

ocs_io_t* ocs_send_logo ( ocs_node_t *  node,
uint32_t  timeout_sec,
uint32_t  retries,
els_cb_t  cb,
void *  cbarg 
)

Send a LOGO ELS command.

Description

Format a LOGO, and send to the node.

Parameters
nodeNode to which the LOGO is sent.
timeout_secCommand timeout, in seconds.
retriesNumber of times to retry errors before reporting a failure.
cbCallback function.
cbargCallback function argument.
Returns
Returns pointer to IO object, or NULL if error.

Definition at line 1021 of file ocs_els.c.

ocs_io_t* ocs_send_logo_acc ( ocs_io_t *  io,
uint32_t  ox_id,
els_cb_t  cb,
void *  cbarg 
)

Send a LOGO accept response.

Description

Construct a LOGO LS_ACC response, and send to the node, using the originator exchange ID ox_id.

Parameters
ioPointer to a SCSI IO object.
ox_idOriginator exchange ID.
cbCallback function.
cbargCallback function argument.
Returns
Returns pointer to IO object, or NULL if error.

Definition at line 1834 of file ocs_els.c.

ocs_io_t* ocs_send_ls_acc ( ocs_io_t *  io,
uint32_t  ox_id,
els_cb_t  cb,
void *  cbarg 
)

Send a generic LS_ACC response without a payload.

Description

A generic LS_ACC response is sent to the node using the originator exchange ID ox_id.

Parameters
ioPointer to a SCSI IO object.
ox_idOriginator exchange id.
cbCallback function.
cbargCallback function argument.
Returns
Returns pointer to IO object, or NULL if error.

Definition at line 1787 of file ocs_els.c.

ocs_io_t* ocs_send_pdisc ( ocs_node_t *  node,
uint32_t  timeout_sec,
uint32_t  retries,
els_cb_t  cb,
void *  cbarg 
)

Send a PDISC ELS command.

Description

Construct a PDISC ELS command, and send to the node.

Parameters
nodeNode to which the PDISC is sent.
timeout_secCommand timeout, in seconds.
retriesNumber of times to retry errors before reporting a failure.
cbCallback function.
cbargCallback function argument.
Returns
Returns pointer to IO object, or NULL if error.

Definition at line 1143 of file ocs_els.c.

ocs_io_t* ocs_send_plogi ( ocs_node_t *  node,
uint32_t  timeout_sec,
uint32_t  retries,
void(*)(ocs_node_t *node, ocs_node_cb_t *cbdata, void *arg)  cb,
void *  cbarg 
)

Format and send a PLOGI ELS command.

Description

Construct a PLOGI payload using the domain SLI port service parameters, and send to the node.

Parameters
nodeNode to which the PLOGI is sent.
timeout_secCommand timeout, in seconds.
retriesNumber of times to retry errors before reporting a failure.
cbCallback function.
cbargCallback function argument.
Returns
Returns pointer to IO object, or NULL if error.

Definition at line 696 of file ocs_els.c.

ocs_io_t* ocs_send_plogi_acc ( ocs_io_t *  io,
uint32_t  ox_id,
els_cb_t  cb,
void *  cbarg 
)

Send a PLOGI accept response.

Description

Construct a PLOGI LS_ACC, and send to the node, using the originator exchange ID ox_id.

Parameters
ioPointer to a SCSI IO object.
ox_idOriginator exchange ID being responsed to.
cbCallback function.
cbargCallback function argument.
Returns
Returns pointer to IO object, or NULL if error.

Definition at line 1403 of file ocs_els.c.

ocs_io_t* ocs_send_prli ( ocs_node_t *  node,
uint32_t  timeout_sec,
uint32_t  retries,
els_cb_t  cb,
void *  cbarg 
)

Send a PRLI ELS command.

Description

Construct a PRLI ELS command, and send to the node.

Parameters
nodeNode to which the PRLI is sent.
timeout_secCommand timeout, in seconds.
retriesNumber of times to retry errors before reporting a failure.
cbCallback function.
cbargCallback function argument.
Returns
Returns pointer to IO object, or NULL if error.

Definition at line 909 of file ocs_els.c.

ocs_io_t* ocs_send_prli_acc ( ocs_io_t *  io,
uint32_t  ox_id,
uint8_t  fc_type,
els_cb_t  cb,
void *  cbarg 
)

Send a PRLI accept response.

Description

Construct a PRLI LS_ACC response, and send to the node, using the originator ox_id exchange ID.

Parameters
ioPointer to a SCSI IO object.
ox_idOriginator exchange ID.
fc_typeFC4 type: FCP or NVME.
cbCallback function.
cbargCallback function argument.
Returns
Returns pointer to IO object, or NULL if error.

Definition at line 1686 of file ocs_els.c.

ocs_io_t* ocs_send_prlo ( ocs_node_t *  node,
uint32_t  timeout_sec,
uint32_t  retries,
els_cb_t  cb,
void *  cbarg 
)

Send a PRLO ELS command.

Description

Construct a PRLO ELS command, and send to the node.

Parameters
nodeNode to which the PRLO is sent.
timeout_secCommand timeout, in seconds.
retriesNumber of times to retry errors before reporting a failure.
cbCallback function.
cbargCallback function argument.
Returns
Returns pointer to IO object, or NULL if error.

Definition at line 968 of file ocs_els.c.

ocs_io_t* ocs_send_prlo_acc ( ocs_io_t *  io,
uint32_t  ox_id,
uint8_t  fc_type,
els_cb_t  cb,
void *  cbarg 
)

Send a PRLO accept response.

Description

Construct a PRLO LS_ACC response, and send to the node, using the originator exchange ID ox_id.

Parameters
ioPointer to a SCSI IO object.
ox_idOriginator exchange ID.
cbCallback function.
cbargCallback function argument.
Returns
Returns pointer to IO object, or NULL if error.

Definition at line 1731 of file ocs_els.c.

ocs_io_t* ocs_send_rrq ( ocs_node_t *  node,
uint32_t  timeout_sec,
uint32_t  retries,
els_cb_t  cb,
void *  cbarg 
)

Send an RRQ ELS command.

Description

Format an RRQ, and send to the node.

Parameters
nodeNode to which the RRQ is sent.
timeout_secCommand timeout, in seconds.
retriesNumber of times to retry errors before reporting a failure.
cbCallback function
cbargCallback function arg
Returns
Returns pointer to IO object, or NULL if error.

Definition at line 1245 of file ocs_els.c.

ocs_io_t* ocs_send_rscn ( ocs_node_t *  node,
uint32_t  timeout_sec,
uint32_t  retries,
void *  port_ids,
uint32_t  port_ids_count,
els_cb_t  cb,
void *  cbarg 
)

Send an RSCN ELS command.

Description

Format an RSCN, and send to the node.

Parameters
nodeNode to which the RRQ is sent.
timeout_secCommand timeout, in seconds.
retriesNumber of times to retry errors before reporting a failure.
port_idsPointer to port IDs
port_ids_countCount of port IDs
cbCallback function
cbargCallback function arg
Returns
Returns pointer to IO object, or NULL if error.

Definition at line 1295 of file ocs_els.c.

ocs_io_t* ocs_send_scr ( ocs_node_t *  node,
uint32_t  timeout_sec,
uint32_t  retries,
els_cb_t  cb,
void *  cbarg 
)

Send an SCR ELS command.

Description

Format an SCR, and send to the node.

Parameters
nodeNode to which the SCR is sent.
timeout_secCommand timeout, in seconds.
retriesNumber of times to retry errors before reporting a failure.
cbCallback function
cbargCallback function arg
Returns
Returns pointer to IO object, or NULL if error.

Definition at line 1196 of file ocs_els.c.