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

Functions

static int32_t sli_be3_wqe_ini_write (sli4_t *sli4, void *buf, size_t size, uint16_t lun, uint32_t exp_xfer_len, uint32_t cmdsn, uint16_t icd_index, ocs_hal_dif_info_t *dif_info, sli4_sge_t *sgl, uint32_t n_sge)
 Write an INITIATOR_WRITE_COMMAND WQE work queue entry. More...
 
static int32_t sli_be3_wqe_ini_tmf (sli4_t *sli4, void *buf, size_t size, uint16_t lun, uint32_t cmdsn, uint16_t icd_index, sli4_sge_t *sgl, uint32_t n_sge)
 Write an INITIATOR_TMF WQE work queue entry. More...
 
static int32_t sli_be3_wqe_ini_nop (sli4_t *sli4, void *buf, size_t size, uint8_t dm, uint32_t cmdsn, ocs_dma_t *bhs, ocs_dma_t *payload1, ocs_dma_t *payload2, uint32_t exp_xfer_len, uint16_t icd_index)
 Write an INITIATOR_NOP_OUT_COMMAND WQE work queue entry. More...
 
static int32_t sli_be3_wqe_ini_read (sli4_t *sli4, void *buf, size_t size, uint16_t lun, uint32_t exp_xfer_len, uint32_t cmdsn, uint16_t icd_index, ocs_hal_dif_info_t *dif_info, sli4_sge_t *sgl, uint32_t n_sge)
 Write an INITIATOR_READ WQE work queue entry. More...
 
static int32_t sli_be3_wqe_tgt_sts (sli4_t *sli4, void *buf, size_t size, ocs_dma_t *bhs, uint16_t lun, uint32_t exp_xfer_len, uint32_t exp_data_sn, uint32_t itt, uint16_t icd_index, uint16_t ref_icd_index, ocs_hal_dif_info_t *dif_info, uint32_t r2t_offset, sli4_sge_t *sgl, uint32_t n_sge)
 Write an TGT_STS_WQE work queue entry. More...
 
static int32_t sli_be3_wqe_tgt_datain (sli4_t *sli4, void *buf, size_t size, ocs_dma_t *bhs, uint16_t lun, uint8_t dm, uint8_t underrun, uint8_t overrun, uint32_t exp_xfer_len, uint16_t icd_index, uint16_t ref_icd_index, uint32_t data_sn, uint8_t piggy_back_status, ocs_hal_dif_info_t *dif_info, sli4_sge_t *sgl, uint32_t n_sge)
 Write a TGT_DATAIN_WQE work queue entry. More...
 
static int32_t sli_be3_wqe_tgt_sos (sli4_t *sli4, void *buf, size_t size, ocs_dma_t *bhs, ocs_dma_t *payload1, ocs_dma_t *payload2, uint16_t lun, uint8_t dm, uint32_t exp_xfer_len, uint16_t icd_index)
 Write a TGT_SOS_WQE work queue entry. More...
 
static int32_t sli_be3_wqe_unassisted (sli4_t *sli4, void *buf, size_t size, uint8_t set_dm, uint8_t incr_statsn, uint8_t is_login, ocs_dma_t *bhs, ocs_dma_t *payload1, ocs_dma_t *payload2, uint32_t exp_xfer_len, uint16_t icd_index)
 Write an DM_CMD_WQE work queue entry. More...
 
static int32_t sli_be3_queue_iscsi_wq_write (sli4_t *sli4, sli4_queue_t *q, uint8_t *entry, void *io)
 Write an WQE entry to the queue object. More...
 
static int32_t sli_be3_queue_iscsi_wqe_invalidate (sli4_t *sli4, sli4_queue_t *q, void *io, uint8_t is_for_tm)
 Writes a 1 to the invalidate bit of the WQE. More...
 

Function Details

static int32_t sli_be3_queue_iscsi_wq_write ( sli4_t *  sli4,
sli4_queue_t *  q,
uint8_t *  entry,
void *  io 
)
static

Write an WQE entry to the queue object.

Parameters
sli4SLI context.
qPointer to the queue object.
entryPointer to the entry contents.
ioPointer to the IO object.
Returns
Returns 0 on success, or a non-zero value otherwise.

Definition at line 714 of file sli4_be3_iscsi.c.

static int32_t sli_be3_queue_iscsi_wqe_invalidate ( sli4_t *  sli4,
sli4_queue_t *  q,
void *  io,
uint8_t  is_for_tm 
)
static

Writes a 1 to the invalidate bit of the WQE.

Parameters
sli4SLI context.
qPointer to queue object.
ioPointer to the IO object.
is_for_tmTRUE if the IO is being aborted for task management, otherwise FALSE.
Returns
Returns 0 on success, or a non-zero value otherwise.

Definition at line 833 of file sli4_be3_iscsi.c.

static int32_t sli_be3_wqe_ini_nop ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint8_t  dm,
uint32_t  cmdsn,
ocs_dma_t *  bhs,
ocs_dma_t *  payload1,
ocs_dma_t *  payload2,
uint32_t  exp_xfer_len,
uint16_t  icd_index 
)
static

Write an INITIATOR_NOP_OUT_COMMAND WQE work queue entry.

Parameters
sli4SLI context.
bufDestination buffer for the WQE.
sizeBuffer size in bytes.
dmDetermines whether a dmsg CQE is generated.
cmdsnThe iSCSI cmdsn for the command.
bhsPointer to the basic header segment.
payload1Optional pointer to payload memory.
payload2Optional pointer to payload memory.
exp_xfer_lenTotal number of payload bytes.
icd_indexICD index for this request.
Returns
Returns 0 on success, or a non-zero value otherwise.

Definition at line 280 of file sli4_be3_iscsi.c.

static int32_t sli_be3_wqe_ini_read ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint16_t  lun,
uint32_t  exp_xfer_len,
uint32_t  cmdsn,
uint16_t  icd_index,
ocs_hal_dif_info_t *  dif_info,
sli4_sge_t *  sgl,
uint32_t  n_sge 
)
static

Write an INITIATOR_READ WQE work queue entry.

Description
  • sgl[0] - points to the BHS.
  • sgl[1] - must be empty.
  • sgl[2] - starts the data SGEs.
Parameters
sli4SLI context.
bufDestination buffer for the WQE.
sizeBuffer size in bytes.
lunThe LUN value for the command.
exp_xfer_lenTotal number of payload bytes.
cmdsniSCSI cmdsn for the command.
icd_indexICD index for this request.
dif_infoPointer to the DIF fields (may be NULL).
sglPointer to the SGEs for this IO.
n_sgeNumber of SGEs present.
Returns
Returns 0 on success, or a non-zero value otherwise.

Definition at line 344 of file sli4_be3_iscsi.c.

static int32_t sli_be3_wqe_ini_tmf ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint16_t  lun,
uint32_t  cmdsn,
uint16_t  icd_index,
sli4_sge_t *  sgl,
uint32_t  n_sge 
)
static

Write an INITIATOR_TMF WQE work queue entry.

Description
  • sgl[0] - points to the BHS.
Parameters
sli4SLI context.
bufDestination buffer for the WQE.
sizeBuffer size in bytes.
lunLUN value for the command.
cmdsniSCSI cmdsn for the command.
icd_indexICD index for this request.
sglPointer to the SGEs for this IO.
n_sgeNumber of SGEs present.
Returns
Returns 0 on success, or a non-zero value otherwise.

Definition at line 240 of file sli4_be3_iscsi.c.

static int32_t sli_be3_wqe_ini_write ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint16_t  lun,
uint32_t  exp_xfer_len,
uint32_t  cmdsn,
uint16_t  icd_index,
ocs_hal_dif_info_t *  dif_info,
sli4_sge_t *  sgl,
uint32_t  n_sge 
)
static

Write an INITIATOR_WRITE_COMMAND WQE work queue entry.

Description
  • sgl[0] - points to the BHS.
  • sgl[1] - must be empty. sgl[2] - starts the data SGEs.
Parameters
sli4SLI context.
bufDestination buffer for the WQE.
sizeBuffer size in bytes.
lunLUN value for the command.
exp_xfer_lenTotal number of payload bytes.
cmdsnThe iSCSI cmdsn for the command.
icd_indexICD index for this request.
dif_infoPointer to the DIF fields (may be NULL).
sglPointer to the SGEs for this IO.
n_sgeNumber of SGEs present.
Returns
Returns 0 on success, or a non-zero value otherwise.

Definition at line 176 of file sli4_be3_iscsi.c.

static int32_t sli_be3_wqe_tgt_datain ( sli4_t *  sli4,
void *  buf,
size_t  size,
ocs_dma_t *  bhs,
uint16_t  lun,
uint8_t  dm,
uint8_t  underrun,
uint8_t  overrun,
uint32_t  exp_xfer_len,
uint16_t  icd_index,
uint16_t  ref_icd_index,
uint32_t  data_sn,
uint8_t  piggy_back_status,
ocs_hal_dif_info_t *  dif_info,
sli4_sge_t *  sgl,
uint32_t  n_sge 
)
static

Write a TGT_DATAIN_WQE work queue entry.

Description
The SGE entries in this WQE are used if all the entries fit in the WQE for a performance increase.
Parameters
sli4SLI context.
bufDestination buffer for the WQE.
sizeBuffer size in bytes.
bhsPointer to the basic header segment.
lunThe LUN value for the command.
dmDetermines whether a dmsg CQE is generated.
underrunSets the underrun bit in the auto response.
overrunSets the overrun bit in the auto response.
exp_xfer_lenTotal number of payload bytes.
icd_indexICD index fr this request.
ref_icd_indexReference ICD Index.
data_snStarting data sequence number.
piggy_back_statusIf true, a good status is sent to the initiator.
dif_infoPointer to the DIF fields (may be NULL).
sglPointer to the SGEs for this IO.
n_sgeNumber of SGEs present.
Returns
Returns 0 on success, or a non-zero value otherwise.

Definition at line 508 of file sli4_be3_iscsi.c.

static int32_t sli_be3_wqe_tgt_sos ( sli4_t *  sli4,
void *  buf,
size_t  size,
ocs_dma_t *  bhs,
ocs_dma_t *  payload1,
ocs_dma_t *  payload2,
uint16_t  lun,
uint8_t  dm,
uint32_t  exp_xfer_len,
uint16_t  icd_index 
)
static

Write a TGT_SOS_WQE work queue entry.

Parameters
sli4SLI context.
bufDestination buffer for the WQE.
sizeBuffer size in bytes.
bhsPointer to the basic header segment.
payload1Optional pointer to payload memory.
payload2Optional pointer to payload memory.
lunThe LUN value for the command.
dmDetermines whether a dmsg CQE is generated.
exp_xfer_lenTotal # of payload bytes.
icd_indexICD index fr this request.
Returns
Returns 0 on success, or a non-zero value otherwise.

Definition at line 580 of file sli4_be3_iscsi.c.

static int32_t sli_be3_wqe_tgt_sts ( sli4_t *  sli4,
void *  buf,
size_t  size,
ocs_dma_t *  bhs,
uint16_t  lun,
uint32_t  exp_xfer_len,
uint32_t  exp_data_sn,
uint32_t  itt,
uint16_t  icd_index,
uint16_t  ref_icd_index,
ocs_hal_dif_info_t *  dif_info,
uint32_t  r2t_offset,
sli4_sge_t *  sgl,
uint32_t  n_sge 
)
static

Write an TGT_STS_WQE work queue entry.

Parameters
sli4SLI context.
bufDestination buffer for the WQE.
sizeBuffer size in bytes.
bhsPointer to the basic header segment.
lunLUN value for the command.
exp_xfer_lenTotal number of payload bytes.
exp_data_snExpected data sequence number.
ittInitiator transfer tag.
icd_indexICD index for this request.
ref_icd_indexReference ICD Index.
dif_infoPointer to the DIF fields (may be NULL).
r2t_offsetR2T buffer offset.
sglPointer to the SGEs for this IO.
n_sgeNumber of SGEs present.
Returns
Returns 0 on success, or a non-zero value otherwise.

Definition at line 445 of file sli4_be3_iscsi.c.

static int32_t sli_be3_wqe_unassisted ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint8_t  set_dm,
uint8_t  incr_statsn,
uint8_t  is_login,
ocs_dma_t *  bhs,
ocs_dma_t *  payload1,
ocs_dma_t *  payload2,
uint32_t  exp_xfer_len,
uint16_t  icd_index 
)
static

Write an DM_CMD_WQE work queue entry.

Parameters
sli4SLI context.
bufDestination buffer for the WQE.
sizeBuffer size in bytes.
set_dmIf TRUE, then a I_T_DMSG_CQE is generated on TCP ACK.
incr_statsnIf TRUE, the statsn is incremented by the FW.
is_loginIf TRUE, the statsn is not updated by FW.
bhsPointer to the basic header segment.
payload1Optional pointer to payload memory.
payload2Optional pointer to payload memory.
exp_xfer_lenTotal number of payload bytes.
icd_indexICD index for this request.
Returns
Returns 0 on success, or a non-zero value otherwise.

Definition at line 638 of file sli4_be3_iscsi.c.