44 #define HW_MAX_SGLE_SIZE (64*1024)
60 typedef struct sli4_ip_addr_s {
61 #if BYTE_ORDER == LITTLE_ENDIAN
62 uint32_t struct_size:16,
68 #error big endian version not defined
72 typedef struct sli4_isns_ip_addr_s {
73 #if BYTE_ORDER == LITTLE_ENDIAN
74 uint32_t struct_size:16,
82 #error big endian version not defined
91 typedef struct sli4_ip_addr_subnet_s {
92 #if BYTE_ORDER == LITTLE_ENDIAN
93 uint32_t struct_size:16,
100 #error big endian version not defined
109 typedef struct sli4_route_table_entry_s {
119 typedef struct sli4_session_login_options_s {
120 #if BYTE_ORDER == LITTLE_ENDIAN
122 error_recovery_level:8,
124 uint32_t first_burst;
126 uint32_t max_connections:16,
128 uint32_t def_time_to_wait:16,
129 def_time_to_retain:16;
131 #error big endian version not defined
135 #define SLI_LOGIN_FLAG_INITIAL_R2T 0x01
136 #define SLI_LOGIN_FLAG_IMMEDIATE_DATA 0x02
137 #define SLI_LOGIN_FLAG_DATA_PDU_IN_ORDER 0x04
138 #define SLI_LOGIN_FLAG_DATA_SEQUENCE_IN_ORDER 0x08
145 typedef struct sli4_target_login_options_s {
147 #if BYTE_ORDER == LITTLE_ENDIAN
148 uint32_t connection_flags:8,
154 #error big endian version not defined
165 #define SLI4_OPC_ISCSI_ERROR_RECOVERY_INVALIDATE_CMDS 0x01
166 #define SLI4_OPC_ISCSI_CFG_POST_SGL_PAGES 0x02
167 #define SLI4_OPC_ISCSI_CFG_REMOVE_SGL_PAGES 0x03
168 #define SLI4_OPC_ISCSI_NTWK_GET_ROUTE_TABLE 0x0A
169 #define SLI4_OPC_ISCSI_NTWK_SET_ROUTE_TABLE 0x0B
170 #define SLI4_OPC_ISCSI_NTWK_IFACE_CREATE 0x0C
171 #define SLI4_OPC_ISCSI_NTWK_IFACE_DELETE 0x0D
172 #define SLI4_OPC_ISCSI_NTWK_CONFIGURE_STATELESS_IP_ADDR 0x11
173 #define SLI4_OPC_ISCSI_NTWK_RELEASE_STATELESS_IP_ADDR 0x12
174 #define SLI4_OPC_ISCSI_NTWK_DISCOVER_ISNS_SERVER 0x13
175 #define SLI4_OPC_ISCSI_NTWK_DISCOVERED_ISNS_SERVERS 0x14
176 #define SLI4_OPC_ISCSI_NTWK_MODIFY_IP_ADDR 0x15
177 #define SLI4_OPC_ISCSI_NTWK_GET_DEFAULT_GATEWAY 0x16
178 #define SLI4_OPC_ISCSI_NTWK_MODIFY_DEFAULT_GATEWAY 0x17
179 #define SLI4_OPC_ISCSI_NTWK_GET_ALL_IF_ID 0x18
180 #define SLI4_OPC_ISCSI_NTWK_GET_IF_INFO 0x19
181 #define SLI4_OPC_ISCSI_CLEANUP 0x3B
182 #define SLI4_OPC_ISCSI_SET_FRAGNUM_BITS 0x3D
183 #define SLI4_OPC_ISCSI_DEFQ_CREATE 0x40
184 #define SLI4_OPC_ISCSI_DEFQ_DESTROY 0x41
185 #define SLI4_OPC_ISCSI_WQ_CREATE 0x42
186 #define SLI4_OPC_ISCSI_WQ_DESTROY 0x43
187 #define SLI4_OPC_ISCSI_NTWK_SET_MTU 0x44
188 #define SLI4_OPC_ISCSI_TCP_CONNECT_AND_OFFLOAD 0x46
189 #define SLI4_OPC_ISCSI_TCP_DISCONNECT 0x47
190 #define SLI4_OPC_ISCSI_GET_CONNECTION_INFO 0x4a
197 typedef struct sli4_req_common_iscsi_invalidate_cmds_s {
199 #if BYTE_ORDER == LITTLE_ENDIAN
206 uint32_t cleanup_type:16,
209 #error big endian version not defined
213 #define SLI4_ISCSI_INVALIDATE_CMDS_STATUS_SUCCESS 0x01
214 #define SLI4_ISCSI_INVALIDATE_CMDS_STATUS_ICD_NOT_FOUND 0x02
215 #define SLI4_ISCSI_INVALIDATE_CMDS_STATUS_UNKNOWN_ERROR 0x04
217 typedef struct sli4_res_common_iscsi_invalidate_cmds_s {
219 #if BYTE_ORDER == LITTLE_ENDIAN
222 uint32_t status[128];
224 #error big endian version not defined
234 typedef struct sli4_req_common_iscsi_cfg_post_sgl_pages_v0_s {
236 #if BYTE_ORDER == LITTLE_ENDIAN
237 uint32_t numPages:16,
243 } page_physical_address[26];
246 #error big endian version not defined
256 typedef struct sli4_req_common_iscsi_cfg_post_sgl_pages_v1_s {
258 #if BYTE_ORDER == LITTLE_ENDIAN
259 uint32_t icd_start:16,
266 #error big endian version not defined
276 typedef struct sli4_req_common_iscsi_cfg_remove_sgl_pages_s {
278 #if BYTE_ORDER == LITTLE_ENDIAN
281 #error big endian version not defined
290 typedef struct sli4_req_common_iscsi_ntwk_iface_create_s {
292 #if BYTE_ORDER == LITTLE_ENDIAN
295 #error big endian version not defined
299 typedef struct sli4_res_common_iscsi_ntwk_iface_create_s {
301 #if BYTE_ORDER == LITTLE_ENDIAN
304 #error big endian version not defined
313 typedef struct sli4_req_common_iscsi_ntwk_iface_delete_s {
315 #if BYTE_ORDER == LITTLE_ENDIAN
318 #error big endian version not defined
322 typedef struct sli4_res_common_iscsi_ntwk_iface_delete_s {
331 typedef struct sli4_req_common_iscsi_ntwk_configure_stateless_ip_addr_s {
333 #if BYTE_ORDER == LITTLE_ENDIAN
339 #error big endian version not defined
348 typedef struct sli4_req_common_iscsi_ntwk_release_stateless_ip_addr_s {
350 #if BYTE_ORDER == LITTLE_ENDIAN
354 #error big endian version not defined
363 typedef struct sli4_req_common_iscsi_ntwk_discover_isns_server_s {
365 #if BYTE_ORDER == LITTLE_ENDIAN
370 #error big endian version not defined
379 typedef struct sli4_req_common_iscsi_ntwk_discovered_isns_servers_s {
381 #if BYTE_ORDER == LITTLE_ENDIAN
384 #error big endian version not defined
388 typedef struct sli4_res_common_iscsi_ntwk_discovered_isns_servers_s {
399 typedef struct sli4_req_common_iscsi_ntwk_modify_ip_addr_s {
401 #if BYTE_ORDER == LITTLE_ENDIAN
408 #error big endian version not defined
412 #define SLI4_ISCSI_ROUTE_TABLE_ENTRIES_MAX OCS_ISCSI_ROUTE_TABLE_ENTRIES_MAX
413 #define SLI4_ISCSI_ROUTE_TABLE_ENTRY_ADD 0x01
414 #define SLI4_ISCSI_ROUTE_TABLE_ENTRY_DEL 0x02
421 typedef struct sli4_req_common_iscsi_ntwk_set_route_table_s {
423 #if BYTE_ORDER == LITTLE_ENDIAN
428 #error big endian version not defined
432 typedef struct sli4_res_common_iscsi_ntwk_set_route_table_s {
434 #if BYTE_ORDER == LITTLE_ENDIAN
439 #error big endian version not defined
448 typedef struct sli4_req_common_iscsi_ntwk_get_route_table_s {
450 #if BYTE_ORDER == LITTLE_ENDIAN
455 #error big endian version not defined
459 typedef struct sli4_res_common_iscsi_ntwk_get_route_table_s {
461 #if BYTE_ORDER == LITTLE_ENDIAN
466 #error big endian version not defined
476 typedef struct sli4_req_common_iscsi_ntwk_set_vlan_s {
478 #if BYTE_ORDER == LITTLE_ENDIAN
482 #error big endia version not defined
491 typedef struct sli4_req_common_iscsi_ntwk_get_default_gateway_s {
493 #if BYTE_ORDER == LITTLE_ENDIAN
497 #error big endian version not defined
501 typedef struct sli4_res_iscsi_ntwk_get_default_gateway_s {
511 typedef struct sli4_req_common_iscsi_ntwk_modify_default_gateway_s {
513 #if BYTE_ORDER == LITTLE_ENDIAN
517 #error big endian version not defined
526 typedef struct sli4_req_iscsi_ntwk_get_all_if_id_s {
530 typedef struct sli4_res_iscsi_ntwk_get_all_if_id_s {
541 typedef struct sli4_req_iscsi_ntwk_get_if_info_s {
543 #if BYTE_ORDER == LITTLE_ENDIAN
547 #error big endian version not defined
551 typedef struct sli4_res_iscsi_ntwk_get_if_info_s {
553 #if BYTE_ORDER == LITTLE_ENDIAN
560 #error big endian version not defined
569 typedef struct sli4_req_iscsi_cleanup_v0_s {
571 #if BYTE_ORDER == LITTLE_ENDIAN
576 #error big endian version not defined
580 typedef struct sli4_req_iscsi_cleanup_v1_s {
582 #if BYTE_ORDER == LITTLE_ENDIAN
585 uint32_t hdr_ring_id:16,
587 uint32_t data_ring_id:16,
590 #error big endian version not defined
599 typedef struct sli4_req_iscsi_set_frag_bits_s {
601 #if BYTE_ORDER == LITTLE_ENDIAN
604 #error big endian version not defined
613 typedef struct sli4_req_iscsi_wq_create_s {
615 #if BYTE_ORDER == LITTLE_ENDIAN
616 uint32_t num_pages:16,
624 } page_physical_address[8];
626 #error big endian version not defined
630 #define SLI4_ISCSI_WQ_CREATE_V0_MAX_PAGES 4
637 typedef struct sli4_req_iscsi_wq_destroy_s {
639 #if BYTE_ORDER == LITTLE_ENDIAN
642 #error big endian version not defined
651 typedef struct sli4_req_iscsi_ntwk_set_mtu_s {
653 #if BYTE_ORDER == LITTLE_ENDIAN
656 #error big endian version not defined
665 typedef struct sli4_req_iscsi_tcp_connect_v0_s {
667 #if BYTE_ORDER == LITTLE_ENDIAN
669 uint32_t tcp_port:16,
675 uint32_t hdr_ring_id:16,
677 uint32_t do_offload:8,
680 #error big endian version not defined
684 typedef struct sli4_req_iscsi_tcp_connect_v1_s {
686 #if BYTE_ORDER == LITTLE_ENDIAN
688 uint32_t tcp_port:16,
694 uint32_t hdr_ring_id:16,
696 uint32_t do_offload:8,
698 uint32_t window_size:16,
704 #error big endian version not defined
708 typedef struct sli4_res_iscsi_tcp_connect_s {
710 #if BYTE_ORDER == LITTLE_ENDIAN
715 #error big endian version not defined
725 typedef struct sli4_req_iscsi_tcp_disconnect_s {
727 #if BYTE_ORDER == LITTLE_ENDIAN
730 #error big endian version not defined
739 typedef struct sli4_req_iscsi_get_connection_info_s {
741 #if BYTE_ORDER == LITTLE_ENDIAN
744 #error big endian version not defined
748 typedef struct sli4_res_iscsi_get_connection_info_s {
750 #if BYTE_ORDER == LITTLE_ENDIAN
753 uint32_t src_port:16,
760 #error big endian version not defined
769 typedef struct sli4_req_iscsi_defq_create_s {
771 #if BYTE_ORDER == LITTLE_ENDIAN
772 uint32_t num_pages:16,
781 uint32_t buffer_size:16,
788 } page_physical_address[8];
790 #error big endian version not defined
794 #define SLI4_ISCSI_DEFQ_CREATE_V0_MAX_PAGES 8
795 #define SLI4_ISCSI_DEFQ_CREATE_V0_MIN_BUF_SIZE 64
796 #define SLI4_ISCSI_DEFQ_CREATE_V0_MAX_BUF_SIZE 8192
797 #define SLI4_ISCSI_DEFQE_SIZE 8
804 typedef struct sli4_req_iscsi_defq_destroy_s {
806 #if BYTE_ORDER == LITTLE_ENDIAN
809 #error big endian version not defined
816 #define SLI4_OPC_ISCSI_INI_INVALIDATE_CONNECTION 0x2A
822 typedef struct sli4_req_iscsi_ini_invalidate_connection_s {
824 #if BYTE_ORDER == LITTLE_ENDIAN
828 uint32_t cleanup_type:16,
831 #error big endian version not defined
839 #define SLI4_OPC_ISCSI_TGT_START_LISTEN_SERVER 0x01
840 #define SLI4_OPC_ISCSI_TGT_STOP_LISTEN_SERVER 0x02
841 #define SLI4_OPC_ISCSI_TGT_GET_CONNECTION_INFO 0x03
842 #define SLI4_OPC_ISCSI_TGT_CONNECTION_REJECT 0x04
843 #define SLI4_OPC_ISCSI_TGT_OFFLOAD_CONNECTION 0x05
844 #define SLI4_OPC_ISCSI_TGT_ISNS_SEND_PACKET 0x06
845 #define SLI4_OPC_ISCSI_TGT_INVALIDATE_CONNECTION 0x07
846 #define SLI4_OPC_ISCSI_TGT_START_ESI_LISTEN 0x0B
847 #define SLI4_OPC_ISCSI_TGT_STOP_ESI_LISTEN 0x0C
854 typedef struct sli4_req_iscsi_tgt_start_listen_server_s {
856 #if BYTE_ORDER == LITTLE_ENDIAN
861 #error big endian version not defined
870 typedef struct sli4_req_iscsi_tgt_stop_listen_server_s {
872 #if BYTE_ORDER == LITTLE_ENDIAN
877 #error big endian version not defined
886 typedef struct sli4_req_iscsi_tgt_get_connection_info_s {
888 #if BYTE_ORDER == LITTLE_ENDIAN
891 #error big endian version not defined
895 typedef struct sli4_res_iscsi_tgt_get_connection_info_s {
897 #if BYTE_ORDER == LITTLE_ENDIAN
900 uint32_t src_port:16,
904 #error big endian version not defined
913 typedef struct sli4_req_iscsi_tgt_connection_reject_s {
915 #if BYTE_ORDER == LITTLE_ENDIAN
918 #error big endian version not defined
927 typedef struct sli4_req_iscsi_tgt_offload_connection_v0_s {
929 #if BYTE_ORDER == LITTLE_ENDIAN
942 #error big endian version not defined
946 typedef struct sli4_req_iscsi_tgt_offload_connection_v1_s {
948 #if BYTE_ORDER == LITTLE_ENDIAN
956 uint32_t ulp_number:16,
964 #error big endian version not defined
973 typedef struct sli4_req_iscsi_tgt_isns_send_packet_s {
975 #if BYTE_ORDER == LITTLE_ENDIAN
979 #error big endian version not defined
988 typedef struct sli4_req_iscsi_tgt_invalidate_connection_s {
990 #if BYTE_ORDER == LITTLE_ENDIAN
995 #error big endian version not defined
1004 typedef struct sli4_req_iscsi_tgt_start_esi_listen_s {
1006 #if BYTE_ORDER == LITTLE_ENDIAN
1011 #error big endian version not defined
1020 typedef struct sli4_req_iscsi_tgt_stop_esi_listen_s {
1022 #if BYTE_ORDER == LITTLE_ENDIAN
1027 #error big endian version not defined
1035 #define SLI4_WQE_INI_WRITE 0x01
1036 #define SLI4_WQE_INI_TMF 0x02
1037 #define SLI4_WQE_INI_NOP 0x03
1038 #define SLI4_WQE_INI_READ 0x05
1039 #define SLI4_WQE_CONTEXT_UPDATE 0x07
1040 #define SLI4_WQE_TGT_STS 0x08
1041 #define SLI4_WQE_TGT_DATAIN 0x09
1042 #define SLI4_WQE_TGT_SOS 0x0A
1043 #define SLI4_WQE_UNASSISTED 0x0B
1045 #define SLI4_ISCSI_WQE_SIZE 64
1047 #define SLI4_WQE_DIF_MODE_DISABLED 0x00
1048 #define SLI4_WQE_DIF_MODE_PASS_THRU 0x01
1049 #define SLI4_WQE_DIF_MODE_REMOVE 0x02
1050 #define SLI4_WQE_DIF_MODE_INSERT 0x03
1053 #define SLI4_WQE_DIF_BLK_SIZE_512 0x00
1054 #define SLI4_WQE_DIF_BLK_SIZE_1024 0x01
1055 #define SLI4_WQE_DIF_BLK_SIZE_2048 0x02
1056 #define SLI4_WQE_DIF_BLK_SIZE_4096 0x03
1057 #define SLI4_WQE_DIF_BLK_SIZE_520 0x04
1058 #define SLI4_WQE_DIF_BLK_SIZE_4104 0x05
1063 typedef struct sli4_link_state_s {
1064 #if BYTE_ORDER == LITTLE_ENDIAN
1065 uint32_t link_number:8,
1069 uint32_t port_fault:8,
1071 logical_link_speed:16;
1080 #error big endian version not defined
1084 #define ISCSI_CQE_CODE_NORMAL 0x01
1085 #define ISCSI_CQE_CODE_CMD_DIGEST_ERROR 0x02
1086 #define ISCSI_CQE_CODE_RECV_PDU_DSL_ERROR 0x03
1087 #define ISCSI_CQE_CODE_RECV_SEQ_BURST_ERROR 0x04
1088 #define ISCSI_CQE_CODE_RECV_AHS_NOT_SUPPORTED 0x05
1089 #define ISCSI_CQE_CODE_HDR_DIGEST_ERROR 0x06
1090 #define ISCSI_CQE_CODE_OPCODE_ERROR 0x07
1091 #define ISCSI_CQE_CODE_ITT_TTT_WRONG_CXN 0x08
1092 #define ISCSI_CQE_CODE_ITT_TTT_TOO_BIG 0x09
1093 #define ISCSI_CQE_CODE_TCP_RECV_RST 0x0A
1094 #define ISCSI_CQE_CODE_TCP_TIMEOUT 0x0B
1095 #define ISCSI_CQE_CODE_TCP_SENT_RST 0x0C
1096 #define ISCSI_CQE_CODE_TCP_RECV_FIN 0x0D
1097 #define ISCSI_CQE_CODE_BAD_UNSOL_PDU 0x0E
1098 #define ISCSI_CQE_CODE_BAD_WQE_INDEX 0x0F
1099 #define ISCSI_CQE_CODE_RESIDUAL_OVERRUN 0x10
1100 #define ISCSI_CQE_CODE_RESIDUAL_UNDERRUN 0x11
1101 #define ISCSI_CQE_CODE_INVALID_STATSN 0x12
1102 #define ISCSI_CQE_CODE_R2T_INVALID_FIELDS 0x13
1103 #define ISCSI_CQE_CODE_INVALID_LUN 0x14
1104 #define ISCSI_CQE_CODE_INVALID_ICD_STATE 0x15
1105 #define ISCSI_CQE_CODE_RECV_PDU_INVALID_ITT 0x16
1106 #define ISCSI_CQE_CODE_RECV_SEQ_BUF_OUT_OF_ORDER 0x17
1107 #define ISCSI_CQE_CODE_RECV_PDU_INVALID_DATASN 0x18
1108 #define ISCSI_CQE_CODE_HOST_CXN_INVALIDATION 0x19
1109 #define ISCSI_CQE_CODE_HOST_CXN_INVL_WITH_PDU 0x1A
1110 #define ISCSI_CQE_CODE_HOST_CMD_INVALIDATION 0x1B
1111 #define ISCSI_CQE_CODE_UNSOL_HDR_NOTIFY 0x1C
1112 #define ISCSI_CQE_CODE_UNSOL_DATA_NOTIFY 0x1D
1113 #define ISCSI_CQE_CODE_UNSOL_DATA_DIGEST_ERROR 0x1E
1114 #define ISCSI_CQE_CODE_TCP_ACK 0x1F
1115 #define ISCSI_CQE_CODE_CMD_DATA_DIFF_CXN 0x20
1116 #define ISCSI_CQE_CODE_DIF_ERROR 0x21
1117 #define ISCSI_CQE_CODE_RECV_UNSOL_PDU_ERROR 0x22
1118 #define ISCSI_CQE_CODE_TX_DIF_ERR_CQE 0x23
1119 #define ISCSI_CQE_CODE_MAX 0x23
1121 #define SLI4_ISCSI_ACQE_NEW_TCP_CONNECTION 0x10
1122 #define SLI4_ISCSI_ACQE_STATELESS_OPERATION_COMPLETE_IPV4 0x20
1123 #define SLI4_ISCSI_ACQE_STATELESS_OPERATION_COMPLETE_IPV6 0x40
1124 #define SLI4_ISCSI_ACQE_DHCP_OPERATION_COMPLETE 0x80
1125 #define SLI4_ISCSI_ACQE_ICMPV6_ERROR_PKT_RECVD 0x83
1126 #define SLI4_ISCSI_ACQE_IPV6_DEFAULT_PORT_MTU_CHANGED 0x86
1131 typedef struct sli4_iscsi_s {
1132 #if BYTE_ORDER == LITTLE_ENDIAN
1141 #error big endian version not defined
1148 typedef struct sli4_iscsi_new_tcp_cnx_accepted_s {
1149 #if BYTE_ORDER == LITTLE_ENDIAN
1159 #error big endian version not defined
1166 typedef struct sli4_iscsi_stateless_op_cmpl_s {
1167 #if BYTE_ORDER == LITTLE_ENDIAN
1169 additional_status:8,
1180 #error big endian version not defined
1187 typedef struct sli4_iscsi_dhcp_op_cmpl_s {
1188 #if BYTE_ORDER == LITTLE_ENDIAN
1190 additional_status:8,
1201 #error big endian version not defined
1208 typedef struct sli4_iscsi_icmpv6_error_s {
1209 #if BYTE_ORDER == LITTLE_ENDIAN
1211 uint32_t error_code:8,
1221 #error big endian version not defined
1228 typedef struct sli4_iscsi_port_mtu_changed_s {
1229 #if BYTE_ORDER == LITTLE_ENDIAN
1239 #error big endian version not defined
1243 typedef struct sli4_iscsi_common_cqe_s {
1253 #define SLI4_LINK_STATE_PHYSICAL 0x00
1254 #define SLI4_LINK_STATE_LOGICAL 0x01
1256 #define SLI4_GRP5_QOS_SPEED 0x01
1258 #define SLI4_PORT_SPEED_NO_LINK 0x0
1259 #define SLI4_PORT_SPEED_10_MBPS 0x1
1260 #define SLI4_PORT_SPEED_100_MBPS 0x2
1261 #define SLI4_PORT_SPEED_1_GBPS 0x3
1262 #define SLI4_PORT_SPEED_10_GBPS 0x4
1264 #define SLI4_PORT_DUPLEX_NONE 0x0
1265 #define SLI4_PORT_DUPLEX_HALF 0x1
1266 #define SLI4_PORT_DUPLEX_FULL 0x2
1268 #define SLI4_PORT_LINK_STATUS_DOWN 0x0
1269 #define SLI4_PORT_LINK_STATUS_UP 0x1
1275 #define SLI4_CQE_CODE_OFFSET 14
1277 #define SLI4_CQE_CODE_WORK_REQUEST_COMPLETION 0x01
1278 #define SLI4_CQE_CODE_RQ_ASYNC 0x04
1282 typedef struct sli_wqe_handlers {
1283 int32_t (*wqe_update_context)(
sli4_t *sli4,
void *buf,
size_t size,
1287 int32_t (*wqe_ini_read)(
sli4_t *sli4,
void *buf,
size_t size,
1288 uint16_t lun, uint32_t exp_xfer_len,
1289 uint32_t cmdsn, uint16_t icd_index,
1293 int32_t (*wqe_ini_write)(
sli4_t *sli4,
void *buf,
size_t size,
1294 uint16_t lun, uint32_t exp_xfer_len,
1295 uint32_t cmdsn, uint16_t icd_index,
1299 int32_t (*wqe_ini_nop)(
sli4_t *sli4,
void *buf,
size_t size,
1300 uint8_t dm, uint32_t cmdsn, ocs_dma_t *bhs,
1301 ocs_dma_t *payload1, ocs_dma_t *payload2,
1302 uint32_t exp_xfer_len, uint16_t icd_index);
1304 int32_t (*wqe_ini_tmf)(
sli4_t *sli4,
void *buf,
size_t size,
1305 uint16_t lun, uint32_t cmdsn, uint16_t icd_index,
1308 int32_t (*wqe_tgt_datain)(
sli4_t *sli4,
void *buf,
size_t size,
1309 ocs_dma_t *bhs, uint16_t lun, uint8_t dm,
1310 uint8_t underrun, uint8_t overrun,
1311 uint32_t exp_xfer_len, uint16_t icd_index,
1312 uint16_t ref_icd_index, uint32_t data_sn,
1313 uint8_t piggy_back_status,
1317 int32_t (*wqe_tgt_sts)(
sli4_t *sli4,
void *buf,
size_t size,
1318 ocs_dma_t *bhs, uint16_t lun,
1319 uint32_t exp_xfer_len, uint32_t exp_data_sn,
1320 uint32_t itt, uint16_t icd_index,
1321 uint16_t ref_icd_index,
1323 uint32_t r2t_offset,
sli4_sge_t *sgl, uint32_t n_sge);
1325 int32_t (*wqe_tgt_sos)(
sli4_t *sli4,
void *buf,
size_t size,
1326 ocs_dma_t *bhs, ocs_dma_t *payload1,
1327 ocs_dma_t *payload2, uint16_t lun, uint8_t dm,
1328 uint32_t exp_xfer_len, uint16_t icd_index);
1330 int32_t (*wqe_unassisted)(
sli4_t *sli4,
void *buf,
size_t size,
1331 uint8_t set_dm, uint8_t incr_statsn,
1332 uint8_t is_login, ocs_dma_t *bhs,
1333 ocs_dma_t *payload1, ocs_dma_t *payload2,
1334 uint32_t exp_xfer_len, uint16_t icd_index);
1337 uint8_t *entry,
void *io);
1340 void *io, uint8_t is_for_tm);
1344 uint64_t tag, ocs_dma_t *dma);
1346 uint64_t tag, uint8_t isadd,
1363 size_t size, uint64_t tag,
1364 uint32_t iface, uint8_t isv4,
1367 size_t size, uint64_t tag,
1368 uint32_t iface, uint8_t isv4);
1370 size_t size, uint64_t tag,
1371 uint32_t iface, uint32_t retries);
1373 size_t size, uint64_t tag,
1376 size_t size, uint64_t tag,
1377 uint32_t iface, uint8_t isadd,
1380 size_t size, uint64_t tag,
1383 size_t size, uint64_t tag,
1389 size_t size, uint64_t tag,
1394 size_t size, uint64_t tag,
1399 size_t size, uint64_t tag,
1403 size_t size, uint64_t tag,
1407 size_t size, uint64_t tag,
1411 size_t size, uint64_t tag,
1416 ocs_dma_t *data_out,
1417 uint16_t hdr_ring_id,
1418 uint16_t data_ring_id,
1419 uint8_t do_offload);
1422 size_t size, uint64_t tag,
1427 ocs_dma_t *data_out,
1428 uint16_t hdr_ring_id,
1429 uint16_t data_ring_id,
1431 uint16_t window_size,
1432 uint8_t window_scale,
1436 size_t size, uint64_t tag,
1437 uint32_t conn_handle);
1440 size_t size, uint64_t tag,
1444 size_t size, uint64_t tag,
1448 size_t size, uint64_t tag,
1450 uint32_t tcp_window_size,
1459 size_t size, uint64_t tag,
1461 uint32_t tcp_window_size,
1470 size_t size, uint64_t tag,
1475 size_t size, uint64_t tag,
1479 size_t size, uint64_t tag,
1483 size_t size, uint64_t tag,
1488 size_t size, uint64_t tag,
1492 uint32_t pkt_length,
1493 ocs_dma_t *pkt_mem);
1499 size_t size, uint64_t tag,
1511 uint32_t exp_xfer_len,
1529 ocs_dma_t *payload1,
1530 ocs_dma_t *payload2,
1531 uint32_t exp_xfer_len,
1532 uint16_t icd_index);
1536 uint32_t exp_xfer_len,
1550 uint32_t exp_xfer_len,
1551 uint32_t exp_data_sn,
1554 uint16_t ref_icd_index,
1556 uint32_t r2t_offset);
1564 uint32_t exp_xfer_len,
1566 uint16_t ref_icd_index,
1568 uint8_t piggy_back_status,
1575 ocs_dma_t *payload1,
1576 ocs_dma_t *payload2,
1579 uint32_t exp_xfer_len,
1580 uint16_t icd_index);
1584 uint8_t incr_statsn,
1587 ocs_dma_t *payload1,
1588 ocs_dma_t *payload2,
1589 uint32_t exp_xfer_len,
1590 uint16_t icd_index);
This structure contains the type and associated fields for a CQE completion.
ISCSI_TGT_OFFLOAD_CONNECTION.
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.
int32_t sli_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_session_login_options_t session_options
int32_t cqe_handler_t(sli4_t *, uint8_t *cqe, sli4_qentry_fields_t *fields)
ISCSI_INI_INVALIDATE_CONNECTION.
COMMON_ISCSI_NTWK_IFACE_CREATE.
COMMON_ISCSI_CFG_REMOVE_SGL_PAGES.
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
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
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
ISCSI_TGT_ISNS_SEND_PACKET.
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
#define SLI4_ISCSI_ROUTE_TABLE_ENTRIES_MAX
uint32_t uint32_t max_rcv_dsl
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
uint32_t data_out_tmpl_high
COMMON_ISCSI_NTWK_SET_VLAN.
T10 DIF information passed to the transport.
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
COMMON_ISCSI_CFG_POST_SGL_PAGES (v1)
COMMON_ISCSI_NTWK_IFACE_DELETE.
sli4_ip_addr_subnet_t ip_addr_subnet
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
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)
COMMON_ISCSI_NTWK_GET_ROUTE_TABLE.
structure wrapping an IP address and subnet together with their type.
int32_t sli_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)
uint32_t sli_iscsi_response_length(sli4_t *, uint8_t *)
ocs_hal_ip_type_e
enum identifying the types of IP addresses.
COMMON_ISCSI_SET_FRAGNUM_BITS.
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...
Asynchronouse Event : iSCSI Event - iCMPv6 Error.
ocs_hal_abort_type_e
HAL abort types.
COMMON_ISCSI_NTWK_RELEASE_STATELESS_IP_ADDR.
uint32_t data_out_tmpl_low
COMMON_ISCSI_ERROR_RECOVERY_INVALIDATE_CMDS.
COMMON_ISCSI_NTWK_GET_DEFAULT_GATEWAY.
int32_t sli_iscsi_process_iscsi(sli4_t *sli4, void *acqe)
Process an asynchronous iSCSI event entry.
int32_t sli_wqe_update_context(sli4_t *sli4, void *buf, size_t size, ocs_hal_target_login_options_t *lgn_options, uint32_t statsn)
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
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
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
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.
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
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
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
Asynchronouse Event : iSCSI Event - iCMPv6 Error.
COMMON_ISCSI_NTWK_SET_ROUTE_TABLE.
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
ISCSI_TGT_START_ESI_LISTEN.
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
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
Asynchronouse Event : Link State ACQE.
int32_t sli_iscsi_process_link_state(sli4_t *sli4, void *acqe)
Process an asynchronous Link State event entry.
int32_t sli_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)
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
COMMON_ISCSI_CFG_POST_SGL_PAGES (v0)
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
int32_t sli_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)
int32_t sli_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)
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
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
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
COMMON_ISCSI_NTWK_DISCOVERED_ISNS_SERVERS.
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
sli4_ip_addr_subnet_t ip_sub
COMMON_ISCSI_NTWK_DISCOVER_ISNS_SERVER.
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.
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
int32_t sli_cmd_iscsi_tcp_connect_v1(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, uint16_t window_size, uint8_t window_scale, uint32_t tcp_mss)
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
Asynchronouse Event : iSCSI Event - New TCP Connection.
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
COMMON_ISCSI_NTWK_MODIFY_IP_ADDR.
ISCSI_TGT_INVALIDATE_CONNECTION.
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
Asynchronouse Event : iSCSI Event - stateless operation complete.
COMMON_ISCSI_NTWK_GET_IF_INFO.
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
This structure is used to track the SLI4 queues.
sli4_isns_ip_addr_t isns_server
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.
structure wrapping an IP address together with it's type.
uint32_t sli_iscsi_io_length(sli4_t *, uint8_t *)
sli4_target_login_options_t login_options
Asynchronouse Event : iSCSI Event.
ISCSI_TGT_STOP_ESI_LISTEN.
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
sli4_target_login_options_t login_options
int32_t sli_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)
uint32_t data_out_tmpl_high
uint32_t data_out_tmpl_low
ISCSI_TGT_CONNECTION_REJECT.
Asynchronouse Event : iSCSI Event - DHCP operation complete.
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
ROUTE_TABLE_ENTRY_FORMAT.
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)
IP_ADDRESS_SUBNET_FORMAT.
Scatter-Gather Entry (SGE)
ISCSI_GET_CONNECTION_INFO.
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.
COMMON_ISCSI_NTWK_MODIFY_DEFAULT_GATEWAY.
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
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
Generic Command Request header.
Generic Command Response header.
ISCSI_TGT_GET_CONNECTION_INFO.
int32_t sli_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)
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
ISCSI_TGT_STOP_LISTEN_SERVER.
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
COMMON_ISCSI_NTWK_GET_ALL_IF_ID.
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
int32_t sli_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)
ISCSI_TGT_START_LISTEN_SERVER.
ISCSI_TCP_CONNECT_AND_OFFLOAD.
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