#include "ocs.h"#include "ocs_hal.h"#include "sli4.h"#include "sli4_iscsi.h"#include "ocs_iscsi_spec.h"Go to the source code of this file.
Implementation of iSCSI Skyhawk SLI-4 functions
Definition in file sli4_skh_iscsi.c.
Functions | |
| static int32_t | sli_skh_iscsi_cqe_i_sol (sli4_t *sli4, uint8_t *cqe, sli4_qentry_fields_t *fields) |
| Parse an iSCSI work queue CQ entry. More... | |
| static int32_t | sli_skh_iscsi_cqe_t_sol (sli4_t *sli4, uint8_t *cqe, sli4_qentry_fields_t *fields) |
| Parse an iSCSI work queue CQ entry. More... | |
| static int32_t | sli_skh_iscsi_cqe_t_sol_data_digest (sli4_t *sli4, uint8_t *cqe, sli4_qentry_fields_t *fields) |
| Parse an iSCSI work queue CQ entry. More... | |
| static int32_t | sli_skh_iscsi_cqe_t_cnxinv (sli4_t *sli4, uint8_t *cqe, sli4_qentry_fields_t *fields) |
| Parse an iSCSI work queue CQ entry. More... | |
| static int32_t | sli_skh_iscsi_cqe_t_cmdinv (sli4_t *sli4, uint8_t *cqe, sli4_qentry_fields_t *fields) |
| Parse an iSCSI work queue CQ entry. More... | |
| static int32_t | sli_skh_iscsi_cqe_i_t_dpdu (sli4_t *sli4, uint8_t *cqe, sli4_qentry_fields_t *fields) |
| Parse an iSCSI work queue CQ entry. More... | |
| static int32_t | sli_skh_iscsi_cqe_i_t_dmsg (sli4_t *sli4, uint8_t *cqe, sli4_qentry_fields_t *fields) |
| Parse an iSCSI work queue CQ entry. More... | |
| static int32_t | sli_skh_iscsi_cqe_tx_dif_error (sli4_t *sli4, uint8_t *cqe, sli4_qentry_fields_t *fields) |
| Parse an iSCSI work queue CQ entry. More... | |
| static int32_t | sli_skh_wqe_dif (void *buf, ocs_hal_dif_info_t *dif_info, sli4_sge_t *sgl0, sli4_sge_t *sgl_dif) |
| Write an DIF WQE work queue entry. More... | |
| static int32_t | sli_skh_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_skh_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_skh_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_skh_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_skh_wqe_update_context (sli4_t *sli4, void *buf, size_t size, ocs_hal_target_login_options_t *lgn_options, uint32_t statsn) |
| Write an CONTEXT_UPDATE_WQE work queue entry. More... | |
| static int32_t | sli_skh_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_skh_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 an TGT_DATAIN_WQE work queue entry. More... | |
| static int32_t | sli_skh_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 an TGT_SOS_WQE work queue entry. More... | |
| static int32_t | sli_skh_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_skh_queue_iscsi_wq_write (sli4_t *sli4, sli4_queue_t *q, uint8_t *entry, void *io) |
| Write an QWE entry to the queue object. More... | |
| static int32_t | sli_skh_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... | |
| static int32_t | sli_skh_cmd_common_get_sli4_parameters (sli4_t *sli4, void *buf, size_t size) |
| Write a COMMON_GET_SLI4_PARAMETERS command to the provided buffer. More... | |
| int32_t | sli_skh_get_sli4_parameters (sli4_t *sli4) |
| Issue the GET_SLI4_PARAMETERS IOCTL and populate the results. More... | |
Variables | |
| const char * | SLI_QNAME [] |
| cqe_handler_t * | ini_skh_cqe_handlers [ISCSI_CQE_CODE_MAX+1] |
| cqe_handler_t * | tgt_skh_cqe_handlers [ISCSI_CQE_CODE_MAX+1] |
| sli_wqe_handlers_t | sli_skh_iscsi_wqe_handlers |
|
static |
Write a COMMON_GET_SLI4_PARAMETERS command to the provided buffer.
| sli4 | SLI context pointer. |
| buf | Virtual pointer to the destination buffer. |
| size | Buffer size in bytes. |
Definition at line 1243 of file sli4_skh_iscsi.c.
| int32_t sli_skh_get_sli4_parameters | ( | sli4_t * | sli4 | ) |
Issue the GET_SLI4_PARAMETERS IOCTL and populate the results.
| sli4 | SLI context. |
Definition at line 1273 of file sli4_skh_iscsi.c.
|
static |
Parse an iSCSI work queue CQ entry.
| sli4 | SLI context. |
| cqe | Pointer to the CQ entry. |
| fields | Returns the fields embedded in the CQ entry. |
Definition at line 822 of file sli4_skh_iscsi.c.
|
static |
Parse an iSCSI work queue CQ entry.
| sli4 | SLI context. |
| cqe | Pointer to the CQ entry. |
| fields | Returns the fields embedded in the CQ entry. |
Definition at line 1194 of file sli4_skh_iscsi.c.
|
static |
Parse an iSCSI work queue CQ entry.
| sli4 | SLI context. |
| cqe | Pointer to the CQ entry. |
| fields | Returns the fields embedded in the CQ entry. |
Definition at line 1166 of file sli4_skh_iscsi.c.
|
static |
Parse an iSCSI work queue CQ entry.
| sli4 | SLI context. |
| cqe | Pointer to the CQ entry. |
| fields | Returns the fields embedded in the CQ entry. |
Definition at line 1137 of file sli4_skh_iscsi.c.
|
static |
Parse an iSCSI work queue CQ entry.
| sli4 | SLI context. |
| cqe | Pointer to the CQ entry. |
| fields | Returns the fields embedded in the CQ entry. |
Definition at line 1099 of file sli4_skh_iscsi.c.
|
static |
Parse an iSCSI work queue CQ entry.
| sli4 | SLI context. |
| cqe | Pointer to the CQ entry. |
| fields | Returns the fields embedded in the CQ entry. |
Definition at line 1036 of file sli4_skh_iscsi.c.
|
static |
Parse an iSCSI work queue CQ entry.
| sli4 | SLI context. |
| cqe | Pointer to the CQ entry. |
| fields | Returns the fields embedded in the CQ entry. |
Definition at line 1066 of file sli4_skh_iscsi.c.
|
static |
Parse an iSCSI work queue CQ entry.
| sli4 | SLI context. |
| cqe | Pointer to the CQ entry. |
| fields | Returns the fields embedded in the CQ entry. |
Definition at line 1218 of file sli4_skh_iscsi.c.
|
static |
Write an QWE entry to the queue object.
| sli4 | SLI context. |
| q | Pointer to queue object. |
| entry | Pointer to entry contents. |
| io | Pointer to the IO object. |
Definition at line 875 of file sli4_skh_iscsi.c.
|
static |
Writes a 1 to the invalidate bit of the WQE.
| sli4 | SLI context. |
| q | Pointer to the queue object. |
| io | Pointer to the IO object. |
| is_for_tm | TRUE if the IO is being aborted for task management, otherwise FALSE. |
Definition at line 994 of file sli4_skh_iscsi.c.
|
static |
Write an DIF WQE work queue entry.
| buf | Destination buffer for the WQE. |
| dif_info | Pointer to the DIF fields (may be NULL). |
| sgl0 | Pointer to the SGL to put in SGE0 (data). |
| sgl_dif | Pointer to the SGL to put in SGE1 (DIF separate). |
Definition at line 160 of file sli4_skh_iscsi.c.
|
static |
Write an INITIATOR_NOP_OUT_COMMAND WQE work queue entry.
| sli4 | SLI context. |
| buf | Destination buffer for the WQE. |
| size | Buffer size in bytes. |
| dm | Determines whether a dmsg CQE is generated. |
| cmdsn | iSCSI cmdsn for the command. |
| bhs | Pointer to the basic header segment. |
| payload1 | Optional pointer to payload memory. |
| payload2 | Optional pointer to payload memory. |
| exp_xfer_len | Total # of payload bytes. |
| icd_index | ICD index fr this request. |
Definition at line 359 of file sli4_skh_iscsi.c.
|
static |
write an INITIATOR_READ WQE work queue entry.
| sli4 | SLI context. |
| buf | Destination buffer for the WQE. |
| size | Buffer size in bytes. |
| lun | LUN value for the command. |
| exp_xfer_len | Total # of payload bytes. |
| cmdsn | iSCSI cmdsn for the command. |
| icd_index | ICD index fr this request. |
| dif_info | Pointer to the DIF fields (may be NULL). |
| sgl | Pointer to the SGEs for this IO. |
| n_sge | Number of SGEs present. |
Definition at line 424 of file sli4_skh_iscsi.c.
|
static |
Write an INITIATOR_TMF WQE work queue entry.
| sli4 | SLI context. |
| buf | Destination buffer for the WQE. |
| size | Buffer size in bytes. |
| lun | The LUN value for the command. |
| cmdsn | iSCSI cmdsn for the command. |
| icd_index | ICD index fr this request. |
| sgl | Pointer to the SGEs for this IO. |
| n_sge | Number of SGEs present. |
Definition at line 320 of file sli4_skh_iscsi.c.
|
static |
write an INITIATOR_WRITE_COMMAND WQE work queue entry
| sli4 | SLI context. |
| buf | Destination buffer for the WQE. |
| size | Buffer size in bytes. |
| lun | LUN value for the command. |
| exp_xfer_len | Total # of payload bytes. |
| cmdsn | iSCSI cmdsn for the command. |
| icd_index | ICD index fr this request. |
| dif_info | Pointer to the DIF fields (may be NULL). |
| sgl | Pointer to the SGEs for this IO. |
| n_sge | Number of SGEs present. |
Definition at line 240 of file sli4_skh_iscsi.c.
|
static |
Write an TGT_DATAIN_WQE work queue entry.
| sli4 | SLI context. |
| buf | Destination buffer for the WQE. |
| size | Buffer size in bytes. |
| bhs | Pointer to the basic header segment. |
| lun | LUN value for the command. |
| dm | Determines whether a dmsg CQE is generated. |
| underrun | Sets the underrun bit in the auto response. |
| overrun | Sets the overrun bit in the auto response. |
| exp_xfer_len | Total # of payload bytes. |
| icd_index | ICD Index for this request. |
| ref_icd_index | Reference ICD Index. |
| data_sn | Starting data sequence number. |
| piggy_back_status | If true, a good status is sent to the initiator. |
| dif_info | Pointer to the DIF fields (may be NULL). |
| sgl | Pointer to the SGEs for this IO. |
| n_sge | Number of SGEs present. |
Definition at line 630 of file sli4_skh_iscsi.c.
|
static |
Write an TGT_SOS_WQE work queue entry.
| sli4 | SLI context. |
| buf | Destination buffer for the WQE. |
| size | Buffer size in bytes. |
| bhs | Pointer to the basic header segment. |
| payload1 | Optional pointer to payload memory. |
| payload2 | Optional pointer to payload memory. |
| lun | LUN value for the command. |
| dm | Determines whether a dmsg CQE is generated. |
| exp_xfer_len | Total # of payload bytes. |
| icd_index | ICD index for this request. |
Definition at line 714 of file sli4_skh_iscsi.c.
|
static |
Write an TGT_STS_WQE work queue entry.
| sli4 | SLI context. |
| buf | Destination buffer for the WQE. |
| size | Buffer size in bytes. |
| bhs | Pointer to the basic header segment. |
| lun | LUN value for the command. |
| exp_xfer_len | Total # of payload bytes. |
| exp_data_sn | Expected data sequence number. |
| itt | Initiator transfer tag. |
| icd_index | ICD index fr this request. |
| ref_icd_index | Reference ICD Index. |
| dif_info | Pointer to the DIF fields (may be NULL). |
| r2t_offset | R2T buffer Offset. |
| sgl | Pointer to the SGEs for this IO. |
| n_sge | Number of SGEs present. |
Definition at line 546 of file sli4_skh_iscsi.c.
|
static |
Write an DM_CMD_WQE work queue entry.
| sli4 | SLI context. |
| buf | Destination buffer for the WQE. |
| size | Buffer size in bytes. |
| set_dm | If TRUE, then a I_T_DMSG_CQE is generated on TCP ACK. |
| incr_statsn | If TRUE, the statsn is incremented by the FW. |
| is_login | If TRUE, the statsn is not updated by FW. |
| bhs | Pointer to the basic header segment. |
| payload1 | Optional pointer to payload memory. |
| payload2 | Optional pointer to payload memory. |
| exp_xfer_len | Total # of payload bytes. |
| icd_index | ICD index fr this request. |
Definition at line 772 of file sli4_skh_iscsi.c.
|
static |
Write an CONTEXT_UPDATE_WQE work queue entry.
| sli4 | SLI context. |
| buf | destination buffer for the WQE. |
| size | buffer size in bytes. |
| lgn_options | the target login options for the connection. |
| statsn | the status SN for the connection. |
Definition at line 497 of file sli4_skh_iscsi.c.
| cqe_handler_t* ini_skh_cqe_handlers[ISCSI_CQE_CODE_MAX+1] |
Definition at line 70 of file sli4_skh_iscsi.c.
| sli_wqe_handlers_t sli_skh_iscsi_wqe_handlers |
Definition at line 1323 of file sli4_skh_iscsi.c.
| cqe_handler_t* tgt_skh_cqe_handlers[ISCSI_CQE_CODE_MAX+1] |
Definition at line 109 of file sli4_skh_iscsi.c.