Emulex Logo
OneCoreā„¢ Storage SDK Release 11.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
SLI-4 FC/FCoE APIs

Functions

int32_t sli_cmd_fcoe_wq_create (sli4_t *sli4, void *buf, size_t size, ocs_dma_t *qmem, uint16_t cq_id, uint16_t ulp)
 Write an FCOE_WQ_CREATE command. More...
 
int32_t sli_cmd_fcoe_wq_create_v1 (sli4_t *sli4, void *buf, size_t size, ocs_dma_t *qmem, uint16_t cq_id, uint16_t ignored)
 Write an FCOE_WQ_CREATE_V1 command. More...
 
int32_t sli_cmd_fcoe_wq_destroy (sli4_t *sli4, void *buf, size_t size, uint16_t wq_id)
 Write an FCOE_WQ_DESTROY command. More...
 
int32_t sli_cmd_fcoe_post_sgl_pages (sli4_t *sli4, void *buf, size_t size, uint16_t xri, uint32_t xri_count, ocs_dma_t *page0[], ocs_dma_t *page1[], ocs_dma_t *dma)
 Write an FCOE_POST_SGL_PAGES command. More...
 
int32_t sli_cmd_fcoe_rq_create (sli4_t *sli4, void *buf, size_t size, ocs_dma_t *qmem, uint16_t cq_id, uint16_t ulp, uint16_t buffer_size)
 Write an FCOE_RQ_CREATE command. More...
 
int32_t sli_cmd_fcoe_rq_create_v1 (sli4_t *sli4, void *buf, size_t size, ocs_dma_t *qmem, uint16_t cq_id, uint16_t ulp, uint16_t buffer_size)
 Write an FCOE_RQ_CREATE_V1 command. More...
 
int32_t sli_cmd_fcoe_rq_destroy (sli4_t *sli4, void *buf, size_t size, uint16_t rq_id)
 Write an FCOE_RQ_DESTROY command. More...
 
int32_t sli_cmd_fcoe_read_fcf_table (sli4_t *sli4, void *buf, size_t size, ocs_dma_t *dma, uint16_t index)
 Write an FCOE_READ_FCF_TABLE command. More...
 
int32_t sli_cmd_fcoe_post_hdr_templates (sli4_t *sli4, void *buf, size_t size, ocs_dma_t *dma, uint16_t rpi, ocs_dma_t *payload_dma)
 Write an FCOE_POST_HDR_TEMPLATES command. More...
 
int32_t sli_abort_wqe (sli4_t *sli4, void *buf, size_t size, sli4_abort_type_e type, uint32_t send_abts, uint32_t ids, uint32_t mask, uint16_t tag, uint16_t cq_id)
 Write an ABORT_WQE work queue entry. More...
 
int32_t sli_els_request64_wqe (sli4_t *sli4, void *buf, size_t size, ocs_dma_t *sgl, uint8_t req_type, uint32_t req_len, uint32_t max_rsp_len, uint8_t timeout, uint16_t xri, uint16_t tag, uint16_t cq_id, ocs_remote_node_t *rnode)
 Write an ELS_REQUEST64_WQE work queue entry. More...
 
int32_t sli_fcp_icmnd64_wqe (sli4_t *sli4, void *buf, size_t size, ocs_dma_t *sgl, uint16_t xri, uint16_t tag, uint16_t cq_id, uint32_t rpi, ocs_remote_node_t *rnode, uint8_t timeout)
 Write an FCP_ICMND64_WQE work queue entry. More...
 
int32_t sli_fcp_iread64_wqe (sli4_t *sli4, void *buf, size_t size, ocs_dma_t *sgl, uint32_t first_data_sge, uint32_t xfer_len, uint16_t xri, uint16_t tag, uint16_t cq_id, uint32_t rpi, ocs_remote_node_t *rnode, uint8_t dif, uint8_t bs, uint8_t timeout)
 Write an FCP_IREAD64_WQE work queue entry. More...
 
int32_t sli_fcp_iwrite64_wqe (sli4_t *sli4, void *buf, size_t size, ocs_dma_t *sgl, uint32_t first_data_sge, uint32_t xfer_len, uint32_t first_burst, uint16_t xri, uint16_t tag, uint16_t cq_id, uint32_t rpi, ocs_remote_node_t *rnode, uint8_t dif, uint8_t bs, uint8_t timeout)
 Write an FCP_IWRITE64_WQE work queue entry. More...
 
int32_t sli_fcp_treceive64_wqe (sli4_t *sli4, void *buf, size_t size, ocs_dma_t *sgl, uint32_t first_data_sge, uint32_t relative_off, uint32_t xfer_len, uint16_t xri, uint16_t tag, uint16_t cq_id, uint16_t xid, uint32_t rpi, ocs_remote_node_t *rnode, uint32_t flags, uint8_t dif, uint8_t bs, uint8_t csctl, uint32_t app_id, uint8_t timer)
 Write an FCP_TRECEIVE64_WQE work queue entry. More...
 
int32_t sli_fcp_cont_treceive64_wqe (sli4_t *sli4, void *buf, size_t size, ocs_dma_t *sgl, uint32_t first_data_sge, uint32_t relative_off, uint32_t xfer_len, uint16_t xri, uint16_t sec_xri, uint16_t tag, uint16_t cq_id, uint16_t xid, uint32_t rpi, ocs_remote_node_t *rnode, uint32_t flags, uint8_t dif, uint8_t bs, uint8_t csctl, uint32_t app_id, uint8_t timer)
 Write an FCP_CONT_TRECEIVE64_WQE work queue entry. More...
 
int32_t sli_fcp_trsp64_wqe (sli4_t *sli4, void *buf, size_t size, ocs_dma_t *sgl, uint32_t rsp_len, uint16_t xri, uint16_t tag, uint16_t cq_id, uint16_t xid, uint32_t rpi, ocs_remote_node_t *rnode, uint32_t flags, uint8_t csctl, uint8_t port_owned, uint32_t app_id)
 Write an FCP_TRSP64_WQE work queue entry. More...
 
int32_t sli_fcp_tsend64_wqe (sli4_t *sli4, void *buf, size_t size, ocs_dma_t *sgl, uint32_t first_data_sge, uint32_t relative_off, uint32_t xfer_len, uint16_t xri, uint16_t tag, uint16_t cq_id, uint16_t xid, uint32_t rpi, ocs_remote_node_t *rnode, uint32_t flags, uint8_t dif, uint8_t bs, uint8_t csctl, uint32_t app_id)
 Write an FCP_TSEND64_WQE work queue entry. More...
 
int32_t sli_gen_request64_wqe (sli4_t *sli4, void *buf, size_t size, ocs_dma_t *sgl, uint32_t req_len, uint32_t max_rsp_len, uint8_t timeout, uint16_t xri, uint16_t tag, uint16_t cq_id, ocs_remote_node_t *rnode, uint8_t r_ctl, uint8_t type, uint8_t df_ctl)
 Write a GEN_REQUEST64 work queue entry. More...
 
int32_t sli_send_frame_wqe (sli4_t *sli4, void *buf, size_t size, uint8_t sof, uint8_t eof, uint32_t *hdr, ocs_dma_t *payload, uint32_t req_len, uint8_t timeout, uint16_t xri, uint16_t req_tag)
 Write a SEND_FRAME work queue entry. More...
 
int32_t sli_xmit_sequence64_wqe (sli4_t *sli4, void *buf, size_t size, ocs_dma_t *payload, uint32_t payload_len, uint8_t timeout, uint16_t ox_id, uint16_t xri, uint16_t tag, ocs_remote_node_t *rnode, uint8_t r_ctl, uint8_t type, uint8_t df_ctl)
 Write a XMIT_SEQUENCE64 work queue entry. More...
 
int32_t sli_requeue_xri_wqe (sli4_t *sli4, void *buf, size_t size, uint16_t xri, uint16_t tag, uint16_t cq_id)
 Write a REQUEUE_XRI_WQE work queue entry. More...
 
int32_t sli_xmit_bls_rsp64_wqe (sli4_t *sli4, void *buf, size_t size, sli_bls_payload_t *payload, uint16_t xri, uint16_t tag, uint16_t cq_id, ocs_remote_node_t *rnode, uint32_t s_id)
 Write an XMIT_BLS_RSP64_WQE work queue entry. More...
 
int32_t sli_xmit_els_rsp64_wqe (sli4_t *sli4, void *buf, size_t size, ocs_dma_t *rsp, uint32_t rsp_len, uint16_t xri, uint16_t tag, uint16_t cq_id, uint16_t ox_id, ocs_remote_node_t *rnode, uint32_t flags, uint32_t s_id)
 Write a XMIT_ELS_RSP64_WQE work queue entry. More...
 
int32_t sli_fc_process_link_state (sli4_t *sli4, void *acqe)
 Process an asynchronous Link State event entry. More...
 
int32_t sli_fc_process_sli_port_event (sli4_t *sli4, void *acqe)
 Process an asynchronous sli port event. More...
 
int32_t sli_fc_process_link_attention (sli4_t *sli4, void *acqe)
 Process an asynchronous Link Attention event entry. More...
 
int32_t sli_fc_cqe_parse (sli4_t *sli4, sli4_queue_t *cq, uint8_t *cqe, sli4_qentry_e *etype, uint16_t *r_id)
 Parse an FC/FCoE work queue CQ entry. More...
 
uint32_t sli_fc_response_length (sli4_t *sli4, uint8_t *cqe)
 Return the ELS/CT response length. More...
 
uint32_t sli_fc_io_length (sli4_t *sli4, uint8_t *cqe)
 Return the FCP IO length. More...
 
int32_t sli_fc_els_did (sli4_t *sli4, uint8_t *cqe, uint32_t *d_id)
 Retrieve the D_ID from the completion. More...
 
int32_t sli_fc_rqe_rqid_and_index (sli4_t *sli4, uint8_t *cqe, uint16_t *rq_id, uint32_t *index)
 Retrieve the RQ index from the completion. More...
 
int32_t sli_fc_process_fcoe (sli4_t *sli4, void *acqe)
 Process an asynchronous FCoE event entry. More...
 
int32_t sli_fc_rq_alloc (sli4_t *sli4, sli4_queue_t *q, uint32_t n_entries, uint32_t buffer_size, sli4_queue_t *cq, uint16_t ulp, uint8_t is_hdr)
 Allocate a receive queue. More...
 
int32_t sli_fc_rq_set_alloc (sli4_t *sli4, uint32_t num_rq_pairs, sli4_queue_t *qs[], uint32_t base_cq_id, uint32_t n_entries, uint32_t header_buffer_size, uint32_t payload_buffer_size, uint16_t ulp)
 Allocate a receive queue set. More...
 
uint32_t sli_fc_get_rpi_requirements (sli4_t *sli4, uint32_t n_rpi)
 Get the RPI resource requirements. More...
 
const char * sli_fc_get_status_string (uint32_t status)
 Return a text string corresponding to a CQE status value. More...
 
static int32_t sli_fc_rqe_length (sli4_t *sli4, void *cqe, uint32_t *len_hdr, uint32_t *len_data)
 Retrieve the received header and payload length. More...
 
static uint8_t sli_fc_rqe_fcfi (sli4_t *sli4, void *cqe)
 Retrieve the received FCFI. More...
 

Function Details

int32_t sli_abort_wqe ( sli4_t *  sli4,
void *  buf,
size_t  size,
sli4_abort_type_e  type,
uint32_t  send_abts,
uint32_t  ids,
uint32_t  mask,
uint16_t  tag,
uint16_t  cq_id 
)

Write an ABORT_WQE work queue entry.

Parameters
sli4SLI context.
bufDestination buffer for the WQE.
sizeBuffer size, in bytes.
typeAbort type, such as XRI, abort tag, and request tag.
send_abtsBoolean to cause the hardware to automatically generate an ABTS.
idsID of IOs to abort.
maskMask applied to the ID values to abort.
tagTag value associated with this abort.
cq_idThe id of the completion queue where the WQE response is sent.
dnrxWhen set to 1, this field indicates that the SLI Port must not return the associated XRI to the SLI Port's optimized write XRI pool.
Returns
Returns 0 on success, or a non-zero value on failure.

Definition at line 682 of file sli4_fc.c.

int32_t sli_cmd_fcoe_post_hdr_templates ( sli4_t *  sli4,
void *  buf,
size_t  size,
ocs_dma_t *  dma,
uint16_t  rpi,
ocs_dma_t *  payload_dma 
)

Write an FCOE_POST_HDR_TEMPLATES command.

Parameters
sli4SLI context.
bufDestination buffer for the command.
sizeBuffer size, in bytes.
dmaPointer to DMA memory structure. This is allocated by the caller.
rpiStarting RPI index for the header templates.
payload_dmaPointer to DMA memory used to hold larger descriptor counts.
Returns
Returns the number of bytes written.

Definition at line 585 of file sli4_fc.c.

int32_t sli_cmd_fcoe_post_sgl_pages ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint16_t  xri,
uint32_t  xri_count,
ocs_dma_t *  page0[],
ocs_dma_t *  page1[],
ocs_dma_t *  dma 
)

Write an FCOE_POST_SGL_PAGES command.

Parameters
sli4SLI context.
bufDestination buffer for the command.
sizeBuffer size, in bytes.
xristarting XRI
xri_countXRI
page0First SGL memory page.
page1Second SGL memory page (optional).
dmaDMA buffer for non-embedded mailbox command (options)

if non-embedded mbx command is used, dma buffer must be at least (32 + xri_count*16) in length

Returns
Returns the number of bytes written.

Definition at line 276 of file sli4_fc.c.

int32_t sli_cmd_fcoe_read_fcf_table ( sli4_t *  sli4,
void *  buf,
size_t  size,
ocs_dma_t *  dma,
uint16_t  index 
)

Write an FCOE_READ_FCF_TABLE command.

Note
The response of this command exceeds the size of an embedded command and requires an external buffer with DMA capability to hold the results. The caller should allocate the ocs_dma_t structure / memory.
Parameters
sli4SLI context.
bufDestination buffer for the command.
sizeBuffer size, in bytes.
dmaPointer to DMA memory structure. This is allocated by the caller.
indexFCF table index to retrieve.
Returns
Returns the number of bytes written.

Definition at line 549 of file sli4_fc.c.

int32_t sli_cmd_fcoe_rq_create ( sli4_t *  sli4,
void *  buf,
size_t  size,
ocs_dma_t *  qmem,
uint16_t  cq_id,
uint16_t  ulp,
uint16_t  buffer_size 
)

Write an FCOE_RQ_CREATE command.

Parameters
sli4SLI context.
bufDestination buffer for the command.
sizeBuffer size, in bytes.
qmemDMA memory for the queue.
cq_idAssociated CQ_ID.
ulpThis parameter carries the ULP for the RQ
buffer_sizeBuffer size pointed to by each RQE.
Note
This creates a Version 0 message.
Returns
Returns the number of bytes written.

Definition at line 345 of file sli4_fc.c.

int32_t sli_cmd_fcoe_rq_create_v1 ( sli4_t *  sli4,
void *  buf,
size_t  size,
ocs_dma_t *  qmem,
uint16_t  cq_id,
uint16_t  ulp,
uint16_t  buffer_size 
)

Write an FCOE_RQ_CREATE_V1 command.

Parameters
sli4SLI context.
bufDestination buffer for the command.
sizeBuffer size, in bytes.
qmemDMA memory for the queue.
cq_idAssociated CQ_ID.
ulpThis parameter carries the ULP for RQ (ignored for V1)
buffer_sizeBuffer size pointed to by each RQE.
Note
This creates a Version 0 message
Returns
Returns the number of bytes written.

Definition at line 426 of file sli4_fc.c.

int32_t sli_cmd_fcoe_rq_destroy ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint16_t  rq_id 
)

Write an FCOE_RQ_DESTROY command.

Parameters
sli4SLI context.
bufDestination buffer for the command.
sizeBuffer size, in bytes.
rq_idRQ_ID.
Returns
Returns the number of bytes written.

Definition at line 504 of file sli4_fc.c.

int32_t sli_cmd_fcoe_wq_create ( sli4_t *  sli4,
void *  buf,
size_t  size,
ocs_dma_t *  qmem,
uint16_t  cq_id,
uint16_t  ulp 
)

Write an FCOE_WQ_CREATE command.

Parameters
sli4SLI context.
bufDestination buffer for the command.
sizeBuffer size, in bytes.
qmemDMA memory for the queue.
cq_idAssociated CQ_ID.
ulpThe ULP to bind
Note
This creates a Version 0 message.
Returns
Returns the number of bytes written.

Definition at line 68 of file sli4_fc.c.

int32_t sli_cmd_fcoe_wq_create_v1 ( sli4_t *  sli4,
void *  buf,
size_t  size,
ocs_dma_t *  qmem,
uint16_t  cq_id,
uint16_t  ignored 
)

Write an FCOE_WQ_CREATE_V1 command.

Parameters
sli4SLI context.
bufDestination buffer for the command.
sizeBuffer size, in bytes.
qmemDMA memory for the queue.
cq_idAssociated CQ_ID.
ignoredThis parameter carries the ULP for WQ (ignored for V1)
Returns
Returns the number of bytes written.

Definition at line 131 of file sli4_fc.c.

int32_t sli_cmd_fcoe_wq_destroy ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint16_t  wq_id 
)

Write an FCOE_WQ_DESTROY command.

Parameters
sli4SLI context.
bufDestination buffer for the command.
sizeBuffer size, in bytes.
wq_idWQ_ID.
Returns
Returns the number of bytes written.

Definition at line 231 of file sli4_fc.c.

int32_t sli_els_request64_wqe ( sli4_t *  sli4,
void *  buf,
size_t  size,
ocs_dma_t *  sgl,
uint8_t  req_type,
uint32_t  req_len,
uint32_t  max_rsp_len,
uint8_t  timeout,
uint16_t  xri,
uint16_t  tag,
uint16_t  cq_id,
ocs_remote_node_t *  rnode 
)

Write an ELS_REQUEST64_WQE work queue entry.

Parameters
sli4SLI context.
bufDestination buffer for the WQE.
sizeBuffer size, in bytes.
sglDMA memory for the ELS request.
req_typeELS request type.
req_lenLength of ELS request in bytes.
max_rsp_lenMax length of ELS response in bytes.
timeoutTime, in seconds, before an IO times out. Zero means 2 * R_A_TOV.
xriXRI for this exchange.
tagIO tag value.
cq_idThe id of the completion queue where the WQE response is sent.
rnodeDestination of ELS request (that is, the remote node).
Returns
Returns 0 on success, or a non-zero value on failure.

Definition at line 744 of file sli4_fc.c.

int32_t sli_fc_cqe_parse ( sli4_t *  sli4,
sli4_queue_t *  cq,
uint8_t *  cqe,
sli4_qentry_e *  etype,
uint16_t *  r_id 
)

Parse an FC/FCoE work queue CQ entry.

Parameters
sli4SLI context.
cqCQ to process.
cqePointer to the CQ entry.
etypeCQ event type.
r_idResource ID associated with this completion message (such as the IO tag).
Returns
Returns 0 on success, or a non-zero value on failure.

Definition at line 2551 of file sli4_fc.c.

int32_t sli_fc_els_did ( sli4_t *  sli4,
uint8_t *  cqe,
uint32_t *  d_id 
)

Retrieve the D_ID from the completion.

Parameters
sli4SLI context.
cqePointer to the CQ entry.
d_idPointer where the D_ID is written.
Returns
Returns 0 on success, or a non-zero value on failure.

Definition at line 2711 of file sli4_fc.c.

uint32_t sli_fc_get_rpi_requirements ( sli4_t *  sli4,
uint32_t  n_rpi 
)

Get the RPI resource requirements.

Parameters
sli4SLI context.
n_rpiNumber of RPIs desired.
Returns
Returns the number of bytes needed. This value may be zero.

Definition at line 3131 of file sli4_fc.c.

const char* sli_fc_get_status_string ( uint32_t  status)

Return a text string corresponding to a CQE status value.

Parameters
statusStatus value
Returns
Returns corresponding string, otherwise "unknown"

Definition at line 3153 of file sli4_fc.c.

uint32_t sli_fc_io_length ( sli4_t *  sli4,
uint8_t *  cqe 
)

Return the FCP IO length.

Parameters
sli4SLI context.
cqePointer to the CQ entry.
Returns
Returns the length, in bytes.

Definition at line 2693 of file sli4_fc.c.

int32_t sli_fc_process_fcoe ( sli4_t *  sli4,
void *  acqe 
)

Process an asynchronous FCoE event entry.

Description
Parses Asynchronous Completion Queue Entry (ACQE), creates an abstracted event, and calls the registered callback functions.
Parameters
sli4SLI context.
acqePointer to the ACQE.
Returns
Returns 0 on success, or a non-zero value on failure.

Definition at line 2880 of file sli4_fc.c.

int32_t sli_fc_process_link_attention ( sli4_t *  sli4,
void *  acqe 
)

Process an asynchronous Link Attention event entry.

Description
Parses Asynchronous Completion Queue Entry (ACQE), creates an abstracted event, and calls the registered callback functions.
Parameters
sli4SLI context.
acqePointer to the ACQE.
Returns
Returns 0 on success, or a non-zero value on failure.

Definition at line 2485 of file sli4_fc.c.

int32_t sli_fc_process_link_state ( sli4_t *  sli4,
void *  acqe 
)

Process an asynchronous Link State event entry.

Description
Parses Asynchronous Completion Queue Entry (ACQE), creates an abstracted event, and calls registered callback functions.
Parameters
sli4SLI context.
acqePointer to the ACQE.
Returns
Returns 0 on success, or a non-zero value on failure.

Definition at line 2145 of file sli4_fc.c.

int32_t sli_fc_process_sli_port_event ( sli4_t *  sli4,
void *  acqe 
)

Process an asynchronous sli port event.

Description
Parses Asynchronous Completion Queue Entry (ACQE) and logs driver debug messages for correct SFP link status
Parameters
sli4SLI context.
acqePointer to the ACQE.
Returns
Returns 0 on success, or a non-zero value on failure.

Definition at line 2295 of file sli4_fc.c.

uint32_t sli_fc_response_length ( sli4_t *  sli4,
uint8_t *  cqe 
)

Return the ELS/CT response length.

Parameters
sli4SLI context.
cqePointer to the CQ entry.
Returns
Returns the length, in bytes.

Definition at line 2676 of file sli4_fc.c.

int32_t sli_fc_rq_alloc ( sli4_t *  sli4,
sli4_queue_t *  q,
uint32_t  n_entries,
uint32_t  buffer_size,
sli4_queue_t *  cq,
uint16_t  ulp,
uint8_t  is_hdr 
)

Allocate a receive queue.

Description
Allocates DMA memory and configures the requested queue type.
Parameters
sli4SLI context.
qPointer to the queue object for the header.
n_entriesNumber of entries to allocate.
buffer_sizebuffer size for the queue.
cqAssociated CQ.
ulpThe ULP to bind
is_hdrUsed to validate the rq_id and set the type of queue
Returns
Returns 0 on success, or -1 on failure.

Definition at line 2948 of file sli4_fc.c.

int32_t sli_fc_rq_set_alloc ( sli4_t *  sli4,
uint32_t  num_rq_pairs,
sli4_queue_t *  qs[],
uint32_t  base_cq_id,
uint32_t  n_entries,
uint32_t  header_buffer_size,
uint32_t  payload_buffer_size,
uint16_t  ulp 
)

Allocate a receive queue set.

Parameters
sli4SLI context.
num_rq_pairsto create
qsPointers to the queue objects for both header and data. Length of this arrays should be 2 * num_rq_pairs
base_cq_id.Assumes base_cq_id : (base_cq_id + num_rq_pairs) cqs as allotted.
n_entriesnumber of entries in each RQ queue.
header_buffer_size
payload_buffer_size
ulpThe ULP to bind
Returns
Returns 0 on success, or -1 on failure.

Definition at line 3015 of file sli4_fc.c.

static uint8_t sli_fc_rqe_fcfi ( sli4_t *  sli4,
void *  cqe 
)
inlinestatic

Retrieve the received FCFI.

Parameters
sli4SLI context.
cqePointer to the CQ entry.
Returns
Returns the FCFI in the CQE. or UINT8_MAX if invalid CQE code.

Definition at line 1984 of file sli4_fc.h.

static int32_t sli_fc_rqe_length ( sli4_t *  sli4,
void *  cqe,
uint32_t *  len_hdr,
uint32_t *  len_data 
)
inlinestatic

Retrieve the received header and payload length.

Parameters
sli4SLI context.
cqePointer to the CQ entry.
len_hdrPointer where the header length is written.
len_dataPointer where the payload length is written.
Returns
Returns 0 on success, or a non-zero value on failure.

Definition at line 1959 of file sli4_fc.h.

int32_t sli_fc_rqe_rqid_and_index ( sli4_t *  sli4,
uint8_t *  cqe,
uint16_t *  rq_id,
uint32_t *  index 
)

Retrieve the RQ index from the completion.

Parameters
sli4SLI context.
cqePointer to the CQ entry.
rq_idPointer where the rq_id is written.
indexPointer where the index is written.
Returns
Returns 0 on success, or a non-zero value on failure.

Definition at line 2768 of file sli4_fc.c.

int32_t sli_fcp_cont_treceive64_wqe ( sli4_t *  sli4,
void *  buf,
size_t  size,
ocs_dma_t *  sgl,
uint32_t  first_data_sge,
uint32_t  relative_off,
uint32_t  xfer_len,
uint16_t  xri,
uint16_t  sec_xri,
uint16_t  tag,
uint16_t  cq_id,
uint16_t  xid,
uint32_t  rpi,
ocs_remote_node_t *  rnode,
uint32_t  flags,
uint8_t  dif,
uint8_t  bs,
uint8_t  csctl,
uint32_t  app_id,
uint8_t  timer 
)

Write an FCP_CONT_TRECEIVE64_WQE work queue entry.

Parameters
sli4SLI context.
bufDestination buffer for the WQE.
sizeBuffer size, in bytes.
sglDMA memory for the Scatter-Gather List.
first_data_sgeIndex of first data sge (used if perf hints are enabled)
relative_offRelative offset of the IO (if any).
xfer_lenData transfer length.
xriXRI for this exchange.
sec_xriSecondary XRI for this exchange. (BZ 161832 workaround)
tagIO tag value.
xidOX_ID for the exchange.
cq_idThe id of the completion queue where the WQE response is sent.
rpiremote node indicator (RPI)
rnodeDestination request (i.e. remote node).
flagsOptional attributes, including:
  • ACTIVE - IO is already active.
  • AUTO RSP - Automatically generate a good FCP_RSP.
difT10 DIF operation, or 0 to disable.
bsT10 DIF block size, or 0 if DIF is disabled.
csctlvalue of csctl field.
app_idvalue for VM application header.
Returns
Returns 0 on success, or a non-zero value on failure.

Definition at line 1357 of file sli4_fc.c.

int32_t sli_fcp_icmnd64_wqe ( sli4_t *  sli4,
void *  buf,
size_t  size,
ocs_dma_t *  sgl,
uint16_t  xri,
uint16_t  tag,
uint16_t  cq_id,
uint32_t  rpi,
ocs_remote_node_t *  rnode,
uint8_t  timeout 
)

Write an FCP_ICMND64_WQE work queue entry.

Parameters
sli4SLI context.
bufDestination buffer for the WQE.
sizeBuffer size, in bytes.
sglDMA memory for the scatter gather list.
xriXRI for this exchange.
tagIO tag value.
cq_idThe id of the completion queue where the WQE response is sent.
rpiremote node indicator (RPI)
rnodeDestination request (that is, the remote node).
timeoutTime, in seconds, before an IO times out. Zero means no timeout.
Returns
Returns 0 on success, or a non-zero value on failure.

Definition at line 915 of file sli4_fc.c.

int32_t sli_fcp_iread64_wqe ( sli4_t *  sli4,
void *  buf,
size_t  size,
ocs_dma_t *  sgl,
uint32_t  first_data_sge,
uint32_t  xfer_len,
uint16_t  xri,
uint16_t  tag,
uint16_t  cq_id,
uint32_t  rpi,
ocs_remote_node_t *  rnode,
uint8_t  dif,
uint8_t  bs,
uint8_t  timeout 
)

Write an FCP_IREAD64_WQE work queue entry.

Parameters
sli4SLI context.
bufDestination buffer for the WQE.
sizeBuffer size, in bytes.
sglDMA memory for the scatter gather list.
first_data_sgeIndex of first data sge (used if perf hints are enabled)
xfer_lenData transfer length.
xriXRI for this exchange.
tagIO tag value.
cq_idThe id of the completion queue where the WQE response is sent.
rpiremote node indicator (RPI)
rnodeDestination request (i.e. remote node).
difT10 DIF operation, or 0 to disable.
bsT10 DIF block size, or 0 if DIF is disabled.
timeoutTime, in seconds, before an IO times out. Zero means no timeout.
Returns
Returns 0 on success, or a non-zero value on failure.

Definition at line 996 of file sli4_fc.c.

int32_t sli_fcp_iwrite64_wqe ( sli4_t *  sli4,
void *  buf,
size_t  size,
ocs_dma_t *  sgl,
uint32_t  first_data_sge,
uint32_t  xfer_len,
uint32_t  first_burst,
uint16_t  xri,
uint16_t  tag,
uint16_t  cq_id,
uint32_t  rpi,
ocs_remote_node_t *  rnode,
uint8_t  dif,
uint8_t  bs,
uint8_t  timeout 
)

Write an FCP_IWRITE64_WQE work queue entry.

Parameters
sli4SLI context.
bufDestination buffer for the WQE.
sizeBuffer size, in bytes.
sglDMA memory for the scatter gather list.
first_data_sgeIndex of first data sge (used if perf hints are enabled)
xfer_lenData transfer length.
first_burstThe number of first burst bytes
xriXRI for this exchange.
tagIO tag value.
cq_idThe id of the completion queue where the WQE response is sent.
rpiremote node indicator (RPI)
rnodeDestination request (i.e. remote node)
difT10 DIF operation, or 0 to disable
bsT10 DIF block size, or 0 if DIF is disabled
timeoutTime, in seconds, before an IO times out. Zero means no timeout.
Returns
Returns 0 on success, or a non-zero value on failure.

Definition at line 1098 of file sli4_fc.c.

int32_t sli_fcp_treceive64_wqe ( sli4_t *  sli4,
void *  buf,
size_t  size,
ocs_dma_t *  sgl,
uint32_t  first_data_sge,
uint32_t  relative_off,
uint32_t  xfer_len,
uint16_t  xri,
uint16_t  tag,
uint16_t  cq_id,
uint16_t  xid,
uint32_t  rpi,
ocs_remote_node_t *  rnode,
uint32_t  flags,
uint8_t  dif,
uint8_t  bs,
uint8_t  csctl,
uint32_t  app_id,
uint8_t  timer 
)

Write an FCP_TRECEIVE64_WQE work queue entry.

Parameters
sli4SLI context.
bufDestination buffer for the WQE.
sizeBuffer size, in bytes.
sglDMA memory for the Scatter-Gather List.
first_data_sgeIndex of first data sge (used if perf hints are enabled)
relative_offRelative offset of the IO (if any).
xfer_lenData transfer length.
xriXRI for this exchange.
tagIO tag value.
xidOX_ID for the exchange.
cq_idThe id of the completion queue where the WQE response is sent.
rpiremote node indicator (RPI)
rnodeDestination request (i.e. remote node).
flagsOptional attributes, including:
  • ACTIVE - IO is already active.
  • AUTO RSP - Automatically generate a good FCP_RSP.
difT10 DIF operation, or 0 to disable.
bsT10 DIF block size, or 0 if DIF is disabled.
csctlvalue of csctl field.
app_idvalue for VM application header.
Returns
Returns 0 on success, or a non-zero value on failure.

Definition at line 1204 of file sli4_fc.c.

int32_t sli_fcp_trsp64_wqe ( sli4_t *  sli4,
void *  buf,
size_t  size,
ocs_dma_t *  sgl,
uint32_t  rsp_len,
uint16_t  xri,
uint16_t  tag,
uint16_t  cq_id,
uint16_t  xid,
uint32_t  rpi,
ocs_remote_node_t *  rnode,
uint32_t  flags,
uint8_t  csctl,
uint8_t  port_owned,
uint32_t  app_id 
)

Write an FCP_TRSP64_WQE work queue entry.

Parameters
sli4SLI context.
bufDestination buffer for the WQE.
sizeBuffer size, in bytes.
sglDMA memory for the Scatter-Gather List.
rsp_lenResponse data length.
xriXRI for this exchange.
tagIO tag value.
cq_idThe id of the completion queue where the WQE response is sent.
xidOX_ID for the exchange.
rpiremote node indicator (RPI)
rnodeDestination request (i.e. remote node).
flagsOptional attributes, including:
  • ACTIVE - IO is already active
  • AUTO RSP - Automatically generate a good FCP_RSP.
csctlvalue of csctl field.
port_owned0/1 to indicate if the XRI is port owned (used to set XBL=0)
app_idvalue for VM application header.
Returns
Returns 0 on success, or a non-zero value on failure.

Definition at line 1400 of file sli4_fc.c.

int32_t sli_fcp_tsend64_wqe ( sli4_t *  sli4,
void *  buf,
size_t  size,
ocs_dma_t *  sgl,
uint32_t  first_data_sge,
uint32_t  relative_off,
uint32_t  xfer_len,
uint16_t  xri,
uint16_t  tag,
uint16_t  cq_id,
uint16_t  xid,
uint32_t  rpi,
ocs_remote_node_t *  rnode,
uint32_t  flags,
uint8_t  dif,
uint8_t  bs,
uint8_t  csctl,
uint32_t  app_id 
)

Write an FCP_TSEND64_WQE work queue entry.

Parameters
sli4SLI context.
bufDestination buffer for the WQE.
sizeBuffer size, in bytes.
sglDMA memory for the scatter gather list.
first_data_sgeIndex of first data sge (used if perf hints are enabled)
relative_offRelative offset of the IO (if any).
xfer_lenData transfer length.
xriXRI for this exchange.
tagIO tag value.
cq_idThe id of the completion queue where the WQE response is sent.
xidOX_ID for the exchange.
rpiremote node indicator (RPI)
rnodeDestination request (i.e. remote node).
flagsOptional attributes, including:
  • ACTIVE - IO is already active.
  • AUTO RSP - Automatically generate a good FCP_RSP.
difT10 DIF operation, or 0 to disable.
bsT10 DIF block size, or 0 if DIF is disabled.
csctlvalue of csctl field.
app_idvalue for VM application header.
Returns
Returns 0 on success, or a non-zero value on failure.

Definition at line 1500 of file sli4_fc.c.

int32_t sli_gen_request64_wqe ( sli4_t *  sli4,
void *  buf,
size_t  size,
ocs_dma_t *  sgl,
uint32_t  req_len,
uint32_t  max_rsp_len,
uint8_t  timeout,
uint16_t  xri,
uint16_t  tag,
uint16_t  cq_id,
ocs_remote_node_t *  rnode,
uint8_t  r_ctl,
uint8_t  type,
uint8_t  df_ctl 
)

Write a GEN_REQUEST64 work queue entry.

Note
This WQE is only used to send FC-CT commands.
Parameters
sli4SLI context.
bufDestination buffer for the WQE.
sizeBuffer size, in bytes.
sglDMA memory for the request.
req_lenLength of request.
max_rsp_lenMax length of response.
timeoutTime, in seconds, before an IO times out. Zero means infinite.
xriXRI for this exchange.
tagIO tag value.
cq_idThe id of the completion queue where the WQE response is sent.
rnodeDestination of request (that is, the remote node).
r_ctlR_CTL value for sequence.
typeTYPE value for sequence.
df_ctlDF_CTL value for sequence.
Returns
Returns 0 on success, or a non-zero value on failure.

Definition at line 1633 of file sli4_fc.c.

int32_t sli_requeue_xri_wqe ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint16_t  xri,
uint16_t  tag,
uint16_t  cq_id 
)

Write a REQUEUE_XRI_WQE work queue entry.

Parameters
sli4SLI context.
bufDestination buffer for the WQE.
sizeBuffer size, in bytes.
xriXRI for this exchange.
tagIO tag value.
cq_idThe id of the completion queue where the WQE response is sent.
Returns
Returns 0 on success, or a non-zero value on failure.

Definition at line 1885 of file sli4_fc.c.

int32_t sli_send_frame_wqe ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint8_t  sof,
uint8_t  eof,
uint32_t *  hdr,
ocs_dma_t *  payload,
uint32_t  req_len,
uint8_t  timeout,
uint16_t  xri,
uint16_t  req_tag 
)

Write a SEND_FRAME work queue entry.

Parameters
sli4SLI context.
bufDestination buffer for the WQE.
sizeBuffer size, in bytes.
sofStart of frame value
eofEnd of frame value
hdrPointer to FC header data
payloadDMA memory for the payload.
req_lenLength of payload.
timeoutTime, in seconds, before an IO times out. Zero means infinite.
xriXRI for this exchange.
req_tagIO tag value.
Returns
Returns 0 on success, or a non-zero value on failure.

Definition at line 1724 of file sli4_fc.c.

int32_t sli_xmit_bls_rsp64_wqe ( sli4_t *  sli4,
void *  buf,
size_t  size,
sli_bls_payload_t *  payload,
uint16_t  xri,
uint16_t  tag,
uint16_t  cq_id,
ocs_remote_node_t *  rnode,
uint32_t  s_id 
)

Write an XMIT_BLS_RSP64_WQE work queue entry.

Parameters
sli4SLI context.
bufDestination buffer for the WQE.
sizeBuffer size, in bytes.
payloadContents of the BLS payload to be sent.
xriXRI for this exchange.
tagIO tag value.
cq_idThe id of the completion queue where the WQE response is sent.
rnodeDestination of request (that is, the remote node).
s_idSource ID to use in the response. If UINT32_MAX, use SLI Port's ID.
Returns
Returns 0 on success, or a non-zero value on failure.

Definition at line 1973 of file sli4_fc.c.

int32_t sli_xmit_els_rsp64_wqe ( sli4_t *  sli4,
void *  buf,
size_t  size,
ocs_dma_t *  rsp,
uint32_t  rsp_len,
uint16_t  xri,
uint16_t  tag,
uint16_t  cq_id,
uint16_t  ox_id,
ocs_remote_node_t *  rnode,
uint32_t  flags,
uint32_t  s_id 
)

Write a XMIT_ELS_RSP64_WQE work queue entry.

Parameters
sli4SLI context.
bufDestination buffer for the WQE.
sizeBuffer size, in bytes.
rspDMA memory for the ELS response.
rsp_lenLength of ELS response, in bytes.
xriXRI for this exchange.
tagIO tag value.
cq_idThe id of the completion queue where the WQE response is sent.
ox_idOX_ID of the exchange containing the request.
rnodeDestination of the ELS response (that is, the remote node).
flagsOptional attributes, including:
  • SLI4_IO_CONTINUATION - IO is already active.
s_idS_ID used for special responses.
Returns
Returns 0 on success, or a non-zero value on failure.

Definition at line 2066 of file sli4_fc.c.

int32_t sli_xmit_sequence64_wqe ( sli4_t *  sli4,
void *  buf,
size_t  size,
ocs_dma_t *  payload,
uint32_t  payload_len,
uint8_t  timeout,
uint16_t  ox_id,
uint16_t  xri,
uint16_t  tag,
ocs_remote_node_t *  rnode,
uint8_t  r_ctl,
uint8_t  type,
uint8_t  df_ctl 
)

Write a XMIT_SEQUENCE64 work queue entry.

This WQE is used to send FC-CT response frames.

Note
This API implements a restricted use for this WQE, a TODO: would include passing in sequence initiative, and full SGL's
Parameters
sli4SLI context.
bufDestination buffer for the WQE.
sizeBuffer size, in bytes.
payloadDMA memory for the request.
payload_lenLength of request.
timeoutTime, in seconds, before an IO times out. Zero means infinite.
ox_idoriginator exchange ID
xriXRI for this exchange.
tagIO tag value.
rnodeDestination of request (that is, the remote node).
r_ctlR_CTL value for sequence.
typeTYPE value for sequence.
df_ctlDF_CTL value for sequence.
Returns
Returns 0 on success, or a non-zero value on failure.

Definition at line 1799 of file sli4_fc.c.