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

Functions

int32_t sli_cmd_iscsi_common_iface_create (sli4_t *sli4, void *buf, size_t size, uint64_t tag, uint32_t vlan)
 write a COMMON_ISCSI_NTWK_IFACE_CREATE command More...
 
int32_t sli_cmd_iscsi_common_iface_delete (sli4_t *sli4, void *buf, size_t size, uint64_t tag, uint32_t iface)
 write a COMMON_ISCSI_NTWK_IFACE_CREATE command More...
 
int32_t sli_cmd_iscsi_common_configure_stateless_ip_addr (sli4_t *sli4, void *buf, size_t size, uint64_t tag, uint32_t iface, uint8_t isv4, uint32_t retries)
 write a COMMON_ISCSI_NTWK_CONFIGURE_STATELESS_IP_ADDR command More...
 
int32_t sli_cmd_iscsi_common_release_stateless_ip_addr (sli4_t *sli4, void *buf, size_t size, uint64_t tag, uint32_t iface, uint8_t isv4)
 write a COMMON_ISCSI_NTWK_RELEASE_STATELESS_IP_ADDR command More...
 
int32_t sli_cmd_iscsi_common_discover_isns_server (sli4_t *sli4, void *buf, size_t size, uint64_t tag, uint32_t iface, uint32_t retries)
 write a COMMON_ISCSI_NTWK_DISCOVER_ISNS_SERVER command More...
 
int32_t sli_cmd_iscsi_common_discovered_isns_servers (sli4_t *sli4, void *buf, size_t size, uint64_t tag, uint32_t iface)
 write a COMMON_ISCSI_NTWK_DISCOVERED_ISNS_SERVERS command More...
 
uint8_t sli_iscsi_conv_hal_ip_addr_type (ocs_hal_ip_type_e ip_type)
 Converts the IP address type field to the SLI4 equivalent value. More...
 
ocs_hal_ip_type_e sli_iscsi_conv_sli4_ip_addr_type (uint8_t ip_type)
 Converts the SLI4 IP address type field to the HAL equivalent value. More...
 
int32_t sli_cmd_iscsi_common_set_route_table (sli4_t *sli4, void *buf, size_t size, uint64_t tag, uint8_t isadd, ocs_hal_ip_address_subnet_t *hal_ipsub, ocs_hal_ip_address_t *hal_gateway, ocs_dma_t *dma)
 write a COMMON_ISCSI_NTWK_SET_ROUTE_TABLE command More...
 
int32_t sli_cmd_iscsi_common_get_route_table (sli4_t *sli4, void *buf, size_t size, uint64_t tag, ocs_dma_t *dma)
 write a COMMON_ISCSI_NTWK_GET_ROUTE_TABLE command More...
 
int32_t sli_cmd_iscsi_common_modify_ip_addr (sli4_t *sli4, void *buf, size_t size, uint64_t tag, uint32_t iface, uint8_t isadd, ocs_hal_ip_address_subnet_t *ipaddr)
 write a COMMON_ISCSI_NTWK_MODIFY_IP_ADDR command More...
 
int32_t sli_cmd_iscsi_common_get_default_gateway (sli4_t *sli4, void *buf, size_t size, uint64_t tag, uint8_t isv4)
 write a COMMON_ISCSI_NTWK_GET_DEFAULT_GATEWAY command More...
 
int32_t sli_cmd_iscsi_common_modify_default_gateway (sli4_t *sli4, void *buf, size_t size, uint64_t tag, uint8_t isadd, ocs_hal_ip_address_t *gateway)
 write a COMMON_ISCSI_NTWK_MODIFY_DEFAULT_GATEWAY command More...
 
int32_t sli_cmd_iscsi_common_get_all_if_id (sli4_t *sli4, void *buf, size_t size, uint64_t tag)
 write a COMMON_ISCSI_NTWK_GET_ALL_IF_ID command More...
 
int32_t sli_cmd_iscsi_common_get_if_info (sli4_t *sli4, void *buf, size_t size, uint64_t tag, uint32_t iface, uint8_t isv4)
 write a COMMON_ISCSI_NTWK_GET_IF_INFO command More...
 
int32_t sli_cmd_iscsi_cleanup_v0 (sli4_t *sli4, void *buf, size_t size, uint64_t tag, uint16_t ulp_no, uint8_t hdrq_id, uint8_t dataq_id)
 write a COMMON_ISCSI_CLEANUP (version 0) command More...
 
int32_t sli_cmd_iscsi_cleanup_v1 (sli4_t *sli4, void *buf, size_t size, uint64_t tag, uint16_t ulp_no, uint16_t hdrq_id, uint16_t dataq_id)
 write a COMMON_ISCSI_CLEANUP (version 1) command More...
 
static int32_t sli_cmd_iscsi_set_fragnum_bits (sli4_t *sli4, void *buf, size_t size, uint64_t tag, uint32_t num_bits)
 write a COMMON_ISCSI_SET_FRAGNUM_BITS command More...
 
int32_t sli_cmd_iscsi_tgt_start_listen_server (sli4_t *sli4, void *buf, size_t size, uint64_t tag, ocs_hal_ip_address_t *ipaddr, uint32_t tcp_port)
 write a ISCSI_TGT_START_LISTEN_SERVER command More...
 
int32_t sli_cmd_iscsi_tgt_stop_listen_server (sli4_t *sli4, void *buf, size_t size, uint64_t tag, ocs_hal_ip_address_t *ipaddr, uint32_t tcp_port)
 write a ISCSI_TGT_STOP_LISTEN_SERVER command More...
 
int32_t sli_cmd_iscsi_tgt_get_connection_info (sli4_t *sli4, void *buf, size_t size, uint64_t tag, uint32_t conn_hdl)
 write a ISCSI_TGT_GET_CONNECTION_INFO command More...
 
int32_t sli_cmd_iscsi_tgt_connection_reject (sli4_t *sli4, void *buf, size_t size, uint64_t tag, uint32_t conn_hdl)
 write a ISCSI_TGT_CONNECTION_REJECT command More...
 
int32_t sli_cmd_iscsi_tgt_offload_connection_v0 (sli4_t *sli4, void *buf, size_t size, uint64_t tag, uint32_t conn_hdl, uint32_t tcp_window_size, uint16_t ulp_no, uint16_t wq_id, uint16_t cq_id, uint8_t hdrq_id, uint8_t dataq_id, uint8_t nrs, ocs_hal_target_login_options_t *lgn_options)
 write a ISCSI_TGT_OFFLOAD_CONNECTION command (version 0) More...
 
int32_t sli_cmd_iscsi_tgt_offload_connection_v1 (sli4_t *sli4, void *buf, size_t size, uint64_t tag, uint32_t conn_hdl, uint32_t tcp_window_size, uint16_t ulp_no, uint16_t wq_id, uint16_t cq_id, uint16_t hdrq_id, uint16_t dataq_id, uint8_t nrs, ocs_hal_target_login_options_t *lgn_options)
 write a ISCSI_TGT_OFFLOAD_CONNECTION command (version 1) More...
 
int32_t sli_cmd_iscsi_tgt_invalidate_connection (sli4_t *sli4, void *buf, size_t size, uint64_t tag, uint32_t conn_hdl, uint16_t cid, uint8_t sendRst)
 write a ISCSI_TGT_INVALIDATE_CONNECTION command More...
 
int32_t sli_cmd_iscsi_tgt_start_esi_listen (sli4_t *sli4, void *buf, size_t size, uint64_t tag, ocs_hal_ip_address_t *ipaddr, uint32_t tcp_port)
 write a ISCSI_TGT_START_ESI_LISTEN command More...
 
int32_t sli_cmd_iscsi_tgt_stop_esi_listen (sli4_t *sli4, void *buf, size_t size, uint64_t tag, ocs_hal_ip_address_t *ipaddr, uint32_t tcp_port)
 write a ISCSI_TGT_STOP_ESI_LISTEN command More...
 
int32_t sli_cmd_iscsi_ini_invalidate_connection (sli4_t *sli4, void *buf, size_t size, uint64_t tag, uint32_t conn_hdl, uint16_t cid, uint8_t sendRst)
 write a ISCSI_INI_INVALIDATE_CONNECTION command More...
 
int32_t sli_cmd_iscsi_tgt_isns_send_packet (sli4_t *sli4, void *buf, size_t size, uint64_t tag, ocs_hal_ip_address_t *isns_server, uint32_t tcp_port, void *packet, uint32_t pkt_length, ocs_dma_t *pkt_mem)
 write a ISCSI_TGT_ISNS_SEND_PACKET command More...
 
int32_t sli_cmd_iscsi_wq_create (sli4_t *sli4, void *buf, size_t size, uint64_t tag, ocs_dma_t *qmem, uint16_t cq_id, uint16_t ulp)
 write a ISCSI_WQ_CREATE command More...
 
int32_t sli_cmd_iscsi_wq_destroy (sli4_t *sli4, void *buf, size_t size, uint64_t tag, uint16_t wq_id)
 write a ISCSI_WQ_DESTROY command More...
 
int32_t sli_cmd_iscsi_ntwk_set_mtu (sli4_t *sli4, void *buf, size_t size, uint64_t tag, uint32_t mtu)
 write a ISCSI_NTWK_SET_MTU command More...
 
int32_t sli_cmd_iscsi_tcp_connect_v0 (sli4_t *sli4, void *buf, size_t size, uint64_t tag, ocs_hal_ip_address_t *ipaddr, uint32_t tcp_port, uint16_t cid, uint16_t cq_id, ocs_dma_t *data_out, uint16_t hdr_ring_id, uint16_t data_ring_id, uint8_t do_offload)
 write a ISCSI_TCP_CONNECT_AND_OFFLOAD V0 command More...
 
int32_t sli_cmd_iscsi_tcp_disconnect (sli4_t *sli4, void *buf, size_t size, uint64_t tag, uint32_t conn_hdl)
 write a ISCSI_TCP_DISCONNECT command More...
 
int32_t sli_cmd_iscsi_get_connection_info (sli4_t *sli4, void *buf, size_t size, uint64_t tag, uint32_t conn_hdl)
 write a ISCSI_GET_CONNECTION_INFO command More...
 
int32_t sli_cmd_iscsi_invalidate_cmds (sli4_t *sli4, void *buf, size_t size, uint64_t tag, ocs_dma_t *msg_mem, ocs_hal_io_t **ios, uint16_t num_ios, ocs_hal_abort_type_e abort_type)
 write a COMMON_ISCSI_INVALIDATE_COMMANDS command More...
 
int32_t sli_cmd_iscsi_remove_sgl_pages (sli4_t *sli4, void *buf, size_t size, uint64_t tag)
 write a COMMON_ISCSI_CFG_REMOVE_SGL_PAGES command More...
 
int32_t sli_cmd_iscsi_defq_create (sli4_t *sli4, void *buf, size_t size, uint64_t tag, ocs_dma_t *qmem, uint32_t num_entries, uint16_t cq_id, uint16_t buffer_size, uint16_t ulp)
 write a ISCSI_DEFQ_CREATE command More...
 
int32_t sli_cmd_iscsi_defq_destroy (sli4_t *sli4, void *buf, size_t size, uint64_t tag, uint16_t rq_id)
 write a ISCSI_DEFQ_DESTROY command More...
 
int32_t sli_iscsi_process_link_state (sli4_t *sli4, void *acqe)
 Process an asynchronous Link State event entry. More...
 
int32_t sli_iscsi_process_iscsi (sli4_t *sli4, void *acqe)
 Process an asynchronous iSCSI event entry. More...
 
int32_t sli_iscsi_cqe_parse (sli4_t *sli4, sli4_queue_t *cq, uint8_t *cqe, sli4_qentry_fields_t *fields)
 Parse a iSCSI work queue CQ entry. More...
 
int32_t sli_iscsi_defq_alloc (sli4_t *sli4, sli4_queue_t *header, sli4_queue_t *payload, uint32_t n_entries, uint32_t hsize, uint32_t psize, sli4_queue_t *cq, uint16_t ulp)
 allocate a receive queue More...
 
int32_t sli_iscsi_set_frag_bits (sli4_t *sli4)
 Allocate the SGL pages assigned to the ICD table and post them to the chip. More...
 
static int32_t sli_iscsi_post_sgl_pages_v0 (sli4_t *sli4)
 Allocate the SGL pages assigned to the ICD table and post them to the chip. More...
 
static int32_t sli_iscsi_post_sgl_pages_v1 (sli4_t *sli4)
 Allocate the SGL pages assigned to the ICD table and post them to the chip. More...
 
int32_t sli_iscsi_post_sgl_pages (sli4_t *sli4)
 Allocate the SGL pages assigned to the ICD table and post them to the chip. More...
 
int32_t sli_iscsi_io_get_icd_and_sgl (sli4_t *sli4, uint32_t io_offset, uint16_t *icd, void **sgl)
 return the ICD and virtual SGL pointer for an IO at the specified offset into the ICD table. More...
 

Function Details

int32_t sli_cmd_iscsi_cleanup_v0 ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint64_t  tag,
uint16_t  ulp_no,
uint8_t  hdrq_id,
uint8_t  dataq_id 
)

write a COMMON_ISCSI_CLEANUP (version 0) command

Parameters
sli4SLI context
bufdestination buffer for the command
sizebuffer size in bytes
tagcommand tag
ulp_nothe Chute number TBD
hdrq_idthe receive header queue assigned to this connection
dataq_idthe receive data queue assigned to this connection
Returns
number of bytes written

Definition at line 671 of file sli4_iscsi.c.

int32_t sli_cmd_iscsi_cleanup_v1 ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint64_t  tag,
uint16_t  ulp_no,
uint16_t  hdrq_id,
uint16_t  dataq_id 
)

write a COMMON_ISCSI_CLEANUP (version 1) command

Parameters
sli4SLI context
bufdestination buffer for the command
sizebuffer size in bytes
tagcommand tag
ulp_nothe Chute number TBD
hdrq_idthe receive header queue assigned to this connection
dataq_idthe receive data queue assigned to this connection
Returns
number of bytes written

Definition at line 716 of file sli4_iscsi.c.

int32_t sli_cmd_iscsi_common_configure_stateless_ip_addr ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint64_t  tag,
uint32_t  iface,
uint8_t  isv4,
uint32_t  retries 
)

write a COMMON_ISCSI_NTWK_CONFIGURE_STATELESS_IP_ADDR command

Parameters
sli4SLI context
bufdestination buffer for the command
sizebuffer size in bytes
tagcommand tag
ifacethe portal interface handle
isv4set to non-zero for IPv4, otherwise IPv6
retriesthe number of retry attempts
Returns
number of bytes written

Definition at line 142 of file sli4_iscsi.c.

int32_t sli_cmd_iscsi_common_discover_isns_server ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint64_t  tag,
uint32_t  iface,
uint32_t  retries 
)

write a COMMON_ISCSI_NTWK_DISCOVER_ISNS_SERVER command

Parameters
sli4SLI context
bufdestination buffer for the command
sizebuffer size in bytes
tagcommand tag
ifacethe portal interface handle
retriesthe number of retry attempts
Returns
number of bytes written

Definition at line 228 of file sli4_iscsi.c.

int32_t sli_cmd_iscsi_common_discovered_isns_servers ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint64_t  tag,
uint32_t  iface 
)

write a COMMON_ISCSI_NTWK_DISCOVERED_ISNS_SERVERS command

Parameters
sli4SLI context
bufdestination buffer for the command
sizebuffer size in bytes
tagcommand tag
ifacethe portal interface handle
Returns
number of bytes written

Definition at line 269 of file sli4_iscsi.c.

int32_t sli_cmd_iscsi_common_get_all_if_id ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint64_t  tag 
)

write a COMMON_ISCSI_NTWK_GET_ALL_IF_ID command

Parameters
sli4SLI context
bufdestination buffer for the command
sizebuffer size in bytes
tagcommand tag
Returns
number of bytes written

Definition at line 591 of file sli4_iscsi.c.

int32_t sli_cmd_iscsi_common_get_default_gateway ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint64_t  tag,
uint8_t  isv4 
)

write a COMMON_ISCSI_NTWK_GET_DEFAULT_GATEWAY command

Parameters
sli4SLI context
bufdestination buffer for the command
sizebuffer size in bytes
tagcommand tag
isv4set to non-zero for IPv4, otherwise IPv6
Returns
number of bytes written

Definition at line 509 of file sli4_iscsi.c.

int32_t sli_cmd_iscsi_common_get_if_info ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint64_t  tag,
uint32_t  iface,
uint8_t  isv4 
)

write a COMMON_ISCSI_NTWK_GET_IF_INFO command

Parameters
sli4SLI context
bufdestination buffer for the command
sizebuffer size in bytes
tagcommand tag
ifacethe interface handle to retrieve information
isv4set to non-zero for IPv4, otherwise IPv6
Returns
number of bytes written

Definition at line 629 of file sli4_iscsi.c.

int32_t sli_cmd_iscsi_common_get_route_table ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint64_t  tag,
ocs_dma_t *  dma 
)

write a COMMON_ISCSI_NTWK_GET_ROUTE_TABLE command

Parameters
sli4SLI context
bufdestination buffer for the command
sizebuffer size in bytes
tagcommand tag
Returns
number of bytes written

Definition at line 427 of file sli4_iscsi.c.

int32_t sli_cmd_iscsi_common_iface_create ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint64_t  tag,
uint32_t  vlan 
)

write a COMMON_ISCSI_NTWK_IFACE_CREATE command

Parameters
sli4SLI context
bufdestination buffer for the command
sizebuffer size in bytes
tagcommand tag
vlanThe vlan/priority
Returns
number of bytes written

Definition at line 65 of file sli4_iscsi.c.

int32_t sli_cmd_iscsi_common_iface_delete ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint64_t  tag,
uint32_t  iface 
)

write a COMMON_ISCSI_NTWK_IFACE_CREATE command

Parameters
sli4SLI context
bufdestination buffer for the command
sizebuffer size in bytes
tagcommand tag
ifacethe portal interface handle
Returns
number of bytes written

Definition at line 103 of file sli4_iscsi.c.

int32_t sli_cmd_iscsi_common_modify_default_gateway ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint64_t  tag,
uint8_t  isadd,
ocs_hal_ip_address_t *  gateway 
)

write a COMMON_ISCSI_NTWK_MODIFY_DEFAULT_GATEWAY command

Parameters
sli4SLI context
bufdestination buffer for the command
sizebuffer size in bytes
tagcommand tag
isaddset to non-zero for adding, otherwise removing
gatewaythe IP address of the gateway to add/remove
Returns
number of bytes written

Definition at line 549 of file sli4_iscsi.c.

int32_t sli_cmd_iscsi_common_modify_ip_addr ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint64_t  tag,
uint32_t  iface,
uint8_t  isadd,
ocs_hal_ip_address_subnet_t *  ipaddr 
)

write a COMMON_ISCSI_NTWK_MODIFY_IP_ADDR command

Parameters
sli4SLI context
bufdestination buffer for the command
sizebuffer size in bytes
tagcommand tag
ifacethe portal interface handle
isaddset to non-zero for adding an address, otherwise removing
ipaddrthe IP address and subnet mask
Returns
number of bytes written

Definition at line 462 of file sli4_iscsi.c.

int32_t sli_cmd_iscsi_common_release_stateless_ip_addr ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint64_t  tag,
uint32_t  iface,
uint8_t  isv4 
)

write a COMMON_ISCSI_NTWK_RELEASE_STATELESS_IP_ADDR command

Parameters
sli4SLI context
bufdestination buffer for the command
sizebuffer size in bytes
tagcommand tag
ifacethe portal interface handle
isv4set to non-zero for IPv4, otherwise IPv6
Returns
number of bytes written

Definition at line 187 of file sli4_iscsi.c.

int32_t sli_cmd_iscsi_common_set_route_table ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint64_t  tag,
uint8_t  isadd,
ocs_hal_ip_address_subnet_t *  hal_ipsub,
ocs_hal_ip_address_t *  hal_gateway,
ocs_dma_t *  dma 
)

write a COMMON_ISCSI_NTWK_SET_ROUTE_TABLE command

Parameters
sli4SLI context
bufdestination buffer for the command
sizebuffer size in bytes
tagcommand tag
isaddset to non-zero for adding, otherwise removing
ip_subthe IP address and subnet to add/remove
gatewaythe IP address of the gateway to add/remove
Returns
number of bytes written

Definition at line 385 of file sli4_iscsi.c.

int32_t sli_cmd_iscsi_defq_create ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint64_t  tag,
ocs_dma_t *  qmem,
uint32_t  num_entries,
uint16_t  cq_id,
uint16_t  buffer_size,
uint16_t  ulp 
)

write a ISCSI_DEFQ_CREATE command

Parameters
sli4SLI context
bufdestination buffer for the command
sizebuffer size in bytes
tagcommand tag
qmemDMA memory for the queue
num_entriesThe number of entries in the queue.
cq_idthe completion queue id assigned for this work queue
buffer_sizebuffer size pointed to by each RQE
ulpThe ULP to bind the queue to (if dual ULP aware).
Note
This creates a Version 0 message
Returns
number of bytes written

Definition at line 1836 of file sli4_iscsi.c.

int32_t sli_cmd_iscsi_defq_destroy ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint64_t  tag,
uint16_t  rq_id 
)

write a ISCSI_DEFQ_DESTROY command

Parameters
sli4SLI context
bufdestination buffer for the command
sizebuffer size in bytes
tagcommand tag
rq_idRQ_ID
Returns
number of bytes written

Definition at line 1910 of file sli4_iscsi.c.

int32_t sli_cmd_iscsi_get_connection_info ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint64_t  tag,
uint32_t  conn_hdl 
)

write a ISCSI_GET_CONNECTION_INFO command

Parameters
sli4SLI context
bufdestination buffer for the command
sizebuffer size in bytes
tagcommand tag
conn_hdlthe connection handle
Returns
number of bytes written

Definition at line 1695 of file sli4_iscsi.c.

int32_t sli_cmd_iscsi_ini_invalidate_connection ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint64_t  tag,
uint32_t  conn_hdl,
uint16_t  cid,
uint8_t  sendRst 
)

write a ISCSI_INI_INVALIDATE_CONNECTION command

Parameters
sli4SLI context
bufdestination buffer for the command
sizebuffer size in bytes
tagcommand tag
conn_hdlthe connection ID
cidthe wq_id assigned with the connection
sendRstnon-zero sends a TCP reset on the connection.
Returns
number of bytes written

Definition at line 1288 of file sli4_iscsi.c.

int32_t sli_cmd_iscsi_invalidate_cmds ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint64_t  tag,
ocs_dma_t *  msg_mem,
ocs_hal_io_t **  ios,
uint16_t  num_ios,
ocs_hal_abort_type_e  abort_type 
)

write a COMMON_ISCSI_INVALIDATE_COMMANDS command

Parameters
sli4SLI context
bufdestination buffer for the command
sizebuffer size in bytes
tagcommand tag
msg_mempointer to DMA memory required to build the non-embedded command
iospointer to an array of IOs to abort.
num_iosThe number of IOs to abort
abort_typeThe type of abort to perform
Returns
number of bytes written

Definition at line 1739 of file sli4_iscsi.c.

int32_t sli_cmd_iscsi_ntwk_set_mtu ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint64_t  tag,
uint32_t  mtu 
)

write a ISCSI_NTWK_SET_MTU command

Parameters
sli4SLI context
bufdestination buffer for the command
sizebuffer size in bytes
tagcommand tag
mtuthe MTU size to set (usually 1500 or 8342 bytes)
Returns
number of bytes written

Definition at line 1504 of file sli4_iscsi.c.

int32_t sli_cmd_iscsi_remove_sgl_pages ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint64_t  tag 
)

write a COMMON_ISCSI_CFG_REMOVE_SGL_PAGES command

Parameters
sli4SLI context
bufdestination buffer for the command
sizebuffer size in bytes
tagcommand tag
Returns
number of bytes written

Definition at line 1794 of file sli4_iscsi.c.

static int32_t sli_cmd_iscsi_set_fragnum_bits ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint64_t  tag,
uint32_t  num_bits 
)
static

write a COMMON_ISCSI_SET_FRAGNUM_BITS command

Parameters
sli4SLI context
bufdestination buffer for the command
sizebuffer size in bytes
tagcommand tag
num_bitsthe number of bits for SGEs
Returns
number of bytes written

Definition at line 760 of file sli4_iscsi.c.

int32_t sli_cmd_iscsi_tcp_connect_v0 ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint64_t  tag,
ocs_hal_ip_address_t *  ipaddr,
uint32_t  tcp_port,
uint16_t  cid,
uint16_t  cq_id,
ocs_dma_t *  data_out,
uint16_t  hdr_ring_id,
uint16_t  data_ring_id,
uint8_t  do_offload 
)

write a ISCSI_TCP_CONNECT_AND_OFFLOAD V0 command

Parameters
sli4SLI context
bufdestination buffer for the command
sizebuffer size in bytes
tagcommand tag
ipaddrthe IP address
tcp_portthe TCP port number
cidThe WQ id for this connection
cq_idThe completion queue to be used for this conenction.
data_outthe DMA buffer that may is used data-out and NOP headers
hdr_ring_idthe receive header queue assigned to this connection
data_ring_idthe receive data queue assigned to this connection
do_offloadnon-zero instructs the FW to offload the connection.
Returns
number of bytes written

Definition at line 1549 of file sli4_iscsi.c.

int32_t sli_cmd_iscsi_tcp_disconnect ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint64_t  tag,
uint32_t  conn_hdl 
)

write a ISCSI_TCP_DISCONNECT command

Parameters
sli4SLI context
bufdestination buffer for the command
sizebuffer size in bytes
tagcommand tag
conn_hdlthe connection handle returned from the TCP_CONNECT
Returns
number of bytes written

Definition at line 1658 of file sli4_iscsi.c.

int32_t sli_cmd_iscsi_tgt_connection_reject ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint64_t  tag,
uint32_t  conn_hdl 
)

write a ISCSI_TGT_CONNECTION_REJECT command

Parameters
sli4SLI context
bufdestination buffer for the command
sizebuffer size in bytes
tagcommand tag
conn_hdlthe connection ID
Returns
number of bytes written

Definition at line 929 of file sli4_iscsi.c.

int32_t sli_cmd_iscsi_tgt_get_connection_info ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint64_t  tag,
uint32_t  conn_hdl 
)

write a ISCSI_TGT_GET_CONNECTION_INFO command

Parameters
sli4SLI context
bufdestination buffer for the command
sizebuffer size in bytes
tagcommand tag
conn_hdlthe connection handle
Returns
number of bytes written

Definition at line 889 of file sli4_iscsi.c.

int32_t sli_cmd_iscsi_tgt_invalidate_connection ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint64_t  tag,
uint32_t  conn_hdl,
uint16_t  cid,
uint8_t  sendRst 
)

write a ISCSI_TGT_INVALIDATE_CONNECTION command

Parameters
sli4SLI context
bufdestination buffer for the command
sizebuffer size in bytes
tagcommand tag
conn_hdlthe connection ID
cidthe wq_id assigned with the connection
sendRstnon-zero sends a TCP reset on the connection.
Returns
number of bytes written

Definition at line 1152 of file sli4_iscsi.c.

int32_t sli_cmd_iscsi_tgt_isns_send_packet ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint64_t  tag,
ocs_hal_ip_address_t *  isns_server,
uint32_t  tcp_port,
void *  packet,
uint32_t  pkt_length,
ocs_dma_t *  pkt_mem 
)

write a ISCSI_TGT_ISNS_SEND_PACKET command

Parameters
sli4SLI context
bufdestination buffer for the command
sizebuffer size in bytes
tagcommand tag
isns_serverthe IP address of the iSNS server
tcp_portthe TCP port number of the iSNS server
packetthe virtual memory pointer to the packet data
pkt_lengthThe number of bytes to transmit.
pkt_memthe DMA buffer that may be used to trasmit the packet
Returns
number of bytes written

Definition at line 1344 of file sli4_iscsi.c.

int32_t sli_cmd_iscsi_tgt_offload_connection_v0 ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint64_t  tag,
uint32_t  conn_hdl,
uint32_t  tcp_window_size,
uint16_t  ulp_no,
uint16_t  wq_id,
uint16_t  cq_id,
uint8_t  hdrq_id,
uint8_t  dataq_id,
uint8_t  nrs,
ocs_hal_target_login_options_t *  lgn_options 
)

write a ISCSI_TGT_OFFLOAD_CONNECTION command (version 0)

Parameters
sli4SLI context
bufdestination buffer for the command
sizebuffer size in bytes
tagcommand tag
conn_hdlthe connection handle
tcp_window_sizethe TCP window advertised
ulp_nothe Chute number TBD
wq_idthe work queue assigned to this connection
cq_idthe completion queue assigned to this connection
hdrq_idthe receive header queue assigned to this connection
dataq_idthe receive data queue assigned to this connection
nrsset to 1 if the driver will not free resources on the invalidate_commands completion and will wait for each IO completion. (Skyhawk only)
lgn_optionsthe target login options for the connection
Returns
number of bytes written

Definition at line 979 of file sli4_iscsi.c.

int32_t sli_cmd_iscsi_tgt_offload_connection_v1 ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint64_t  tag,
uint32_t  conn_hdl,
uint32_t  tcp_window_size,
uint16_t  ulp_no,
uint16_t  wq_id,
uint16_t  cq_id,
uint16_t  hdrq_id,
uint16_t  dataq_id,
uint8_t  nrs,
ocs_hal_target_login_options_t *  lgn_options 
)

write a ISCSI_TGT_OFFLOAD_CONNECTION command (version 1)

Parameters
sli4SLI context
bufdestination buffer for the command
sizebuffer size in bytes
tagcommand tag
conn_hdlthe connection handle
tcp_window_sizethe TCP window advertised
ulp_nothe Chute number TBD
wq_idthe work queue assigned to this connection
cq_idthe completion queue assigned to this connection
hdrq_idthe receive header queue assigned to this connection
dataq_idthe receive data queue assigned to this connection
nrsset to 1 if the driver will not free resources on the invalidate_commands completion and will wait for each IO completion. (Skyhawk only)
lgn_optionsthe target login options for the connection
Returns
number of bytes written

Definition at line 1069 of file sli4_iscsi.c.

int32_t sli_cmd_iscsi_tgt_start_esi_listen ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint64_t  tag,
ocs_hal_ip_address_t *  ipaddr,
uint32_t  tcp_port 
)

write a ISCSI_TGT_START_ESI_LISTEN command

Parameters
sli4SLI context
bufdestination buffer for the command
sizebuffer size in bytes
tagcommand tag
ipaddrthe IP address
tcp_portthe TCP port number
Returns
number of bytes written

Definition at line 1197 of file sli4_iscsi.c.

int32_t sli_cmd_iscsi_tgt_start_listen_server ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint64_t  tag,
ocs_hal_ip_address_t *  ipaddr,
uint32_t  tcp_port 
)

write a ISCSI_TGT_START_LISTEN_SERVER command

Parameters
sli4SLI context
bufdestination buffer for the command
sizebuffer size in bytes
tagcommand tag
ipaddrthe IP address
tcp_portthe TCP port number
Returns
number of bytes written

Definition at line 800 of file sli4_iscsi.c.

int32_t sli_cmd_iscsi_tgt_stop_esi_listen ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint64_t  tag,
ocs_hal_ip_address_t *  ipaddr,
uint32_t  tcp_port 
)

write a ISCSI_TGT_STOP_ESI_LISTEN command

Parameters
sli4SLI context
bufdestination buffer for the command
sizebuffer size in bytes
tagcommand tag
ipaddrthe IP address
tcp_portthe TCP port number
Returns
number of bytes written

Definition at line 1242 of file sli4_iscsi.c.

int32_t sli_cmd_iscsi_tgt_stop_listen_server ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint64_t  tag,
ocs_hal_ip_address_t *  ipaddr,
uint32_t  tcp_port 
)

write a ISCSI_TGT_STOP_LISTEN_SERVER command

Parameters
sli4SLI context
bufdestination buffer for the command
sizebuffer size in bytes
tagcommand tag
ipaddrthe IP address
tcp_portthe TCP port number
Returns
number of bytes written

Definition at line 845 of file sli4_iscsi.c.

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

write a ISCSI_WQ_CREATE command

Parameters
sli4SLI context
bufdestination buffer for the command
sizebuffer size in bytes
tagcommand tag
qmemDMA memory for the queue
cq_idassociated CQ_ID
ulpThe ULP to bind the queue to (if dual ULP aware).
Note
This creates a Version 0 message
Returns
number of bytes written

Definition at line 1409 of file sli4_iscsi.c.

int32_t sli_cmd_iscsi_wq_destroy ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint64_t  tag,
uint16_t  wq_id 
)

write a ISCSI_WQ_DESTROY command

Parameters
sli4SLI context
bufdestination buffer for the command
sizebuffer size in bytes
tagcommand tag
wq_idWQ_ID
Returns
number of bytes written

Definition at line 1466 of file sli4_iscsi.c.

uint8_t sli_iscsi_conv_hal_ip_addr_type ( ocs_hal_ip_type_e  ip_type)

Converts the IP address type field to the SLI4 equivalent value.

Parameters
ip_typethe HAL enum to convert.
Returns
the SLI4 IP type

Definition at line 305 of file sli4_iscsi.c.

ocs_hal_ip_type_e sli_iscsi_conv_sli4_ip_addr_type ( uint8_t  ip_type)

Converts the SLI4 IP address type field to the HAL equivalent value.

Parameters
ip_typethe SLI4 value to convert.
Returns
The HAL IP type

Definition at line 342 of file sli4_iscsi.c.

int32_t sli_iscsi_cqe_parse ( sli4_t *  sli4,
sli4_queue_t *  cq,
uint8_t *  cqe,
sli4_qentry_fields_t *  fields 
)

Parse a iSCSI work queue CQ entry.

Parameters
sli4SLI context
cqCQ to process
cqepointer to the CQ entry
fieldsreturns the fields embedded in the CQ entry
Returns
0 on success, non-zero otherwise

Definition at line 2120 of file sli4_iscsi.c.

int32_t sli_iscsi_defq_alloc ( sli4_t *  sli4,
sli4_queue_t *  header,
sli4_queue_t *  payload,
uint32_t  n_entries,
uint32_t  hsize,
uint32_t  psize,
sli4_queue_t *  cq,
uint16_t  ulp 
)

allocate a receive queue

Allocates DMA memory and configures the requested queue type

Parameters
sli4SLI context
headerpointer to queue object for header
payloadpointer to queue object for payload
n_entriesnumber of entries to allocate
hsizeheader buffer size
psizepayload buffer size
cqpointer to the completion queue to use for this queue.
ulpThe ULP to bind the queue to (if dual ULP aware).
Returns
0 on success, -1 otherwise

Definition at line 2173 of file sli4_iscsi.c.

int32_t sli_iscsi_io_get_icd_and_sgl ( sli4_t *  sli4,
uint32_t  io_offset,
uint16_t *  icd,
void **  sgl 
)

return the ICD and virtual SGL pointer for an IO at the specified offset into the ICD table.

Parameters
sli4SLI context
io_offsetThe offset into the ICD table
icdreturns the ICD representing this IO.
sglreturns the virtual pointer to the first SGL for this ICD.
Returns
0 on success, non-zero otherwise

Definition at line 2609 of file sli4_iscsi.c.

int32_t sli_iscsi_post_sgl_pages ( sli4_t *  sli4)

Allocate the SGL pages assigned to the ICD table and post them to the chip.

Parameters
sli4SLI context
Returns
0 on success, non-zero otherwise

Definition at line 2545 of file sli4_iscsi.c.

static int32_t sli_iscsi_post_sgl_pages_v0 ( sli4_t *  sli4)
static

Allocate the SGL pages assigned to the ICD table and post them to the chip.

Parameters
sli4SLI context
Returns
0 on success, non-zero otherwise

Definition at line 2358 of file sli4_iscsi.c.

static int32_t sli_iscsi_post_sgl_pages_v1 ( sli4_t *  sli4)
static

Allocate the SGL pages assigned to the ICD table and post them to the chip.

Parameters
sli4SLI context
Returns
0 on success, non-zero otherwise

Definition at line 2468 of file sli4_iscsi.c.

int32_t sli_iscsi_process_iscsi ( sli4_t *  sli4,
void *  acqe 
)

Process an asynchronous iSCSI event entry.

Parses ACQE, creates an abstracted event and calls registered callback functions.

Parameters
sli4SLI context
acqepointer to Asynchrounous Completion Queue Entry
Returns
0 on success, non-zero otherwise

Definition at line 2032 of file sli4_iscsi.c.

int32_t sli_iscsi_process_link_state ( sli4_t *  sli4,
void *  acqe 
)

Process an asynchronous Link State event entry.

Parses ACQE, creates an abstracted event and calls registered callback functions.

Parameters
sli4SLI context
acqepointer to Asynchrounous Completion Queue Entry
Returns
0 on success, non-zero otherwise

Definition at line 1947 of file sli4_iscsi.c.

int32_t sli_iscsi_set_frag_bits ( sli4_t *  sli4)

Allocate the SGL pages assigned to the ICD table and post them to the chip.

Parameters
sli4SLI context
Returns
0 on success, non-zero otherwise

Definition at line 2253 of file sli4_iscsi.c.