1 #ifndef __EVEREST_ISCSI_CONSTANTS_H_ 2 #define __EVEREST_ISCSI_CONSTANTS_H_ 3 4 /** 5 * This file defines HSI constants for the iSCSI flows 6 */ 7 8 /* Everest general configuartion */ 9 #define ISCSI_NUM_OF_CQS (8) /*MAX num of CQs*/ 10 #define ISCSI_NUM_OF_EQS (ISCSI_NUM_OF_CQS*MAX_NUM_OF_PF) /*per port*/ 11 #define ISCSI_NUM_OF_CONNECTIONS (128) 12 #define ISCSI_NUM_OF_CONNECTIONS_BOTH_PORTS (ISCSI_NUM_OF_CONNECTIONS*MAX_NUM_OF_PF) 13 #define ISCSI_MAX_NUM_OF_PENDING_R2TS (4) 14 #define ISCSI_R2TQE_SIZE (8) 15 #define ISCSI_NUM_OF_CQ_TIMERS_PER_FUNC (ISCSI_NUM_OF_CONNECTIONS*ISCSI_NUM_OF_CQS) 16 #define ISCSI_NUM_OF_CQ_TIMERS (ISCSI_NUM_OF_CONNECTIONS*ISCSI_NUM_OF_CQS*MAX_NUM_OF_PF) 17 #define ISCSI_RQE_SIZE (256) 18 #define ISCSI_CQE_SIZE (64) /* must be equal to sizeof(iscsi_response_t), which is verified using a static assert */ 19 #define ISCSI_GLOBAL_BUF_SIZE (64) 20 21 /* Slow path commands */ 22 #define ISCSI_RAMROD_CMD_ID_UPDATE_CONN (ISCSI_KCQE_OPCODE_UPDATE_CONN) 23 #define ISCSI_RAMROD_CMD_ID_INIT (ISCSI_KCQE_OPCODE_INIT) 24 // for internal FW processing 25 #define ISCSI_CMD_ID_INIT_FW_CLEAN_TASK (ISCSI_KCQE_OPCODE_FW_CLEAN_TASK) 26 27 /* iSCSI states */ 28 #define ISCSI_STATE_SHIFT (3) 29 #define ISCSI_STATES_MASK (3) 30 #define ISCSI_INIT_STATE (0 << ISCSI_STATE_SHIFT) 31 #define ISCSI_OFFLOAD_STATE (1 << ISCSI_STATE_SHIFT) 32 #define ISCSI_ERROR_STATE (2 << ISCSI_STATE_SHIFT) 33 #define ISCSI_TERMINATION_STATE (3 << ISCSI_STATE_SHIFT) 34 35 /* number of elements in the EQ that are reserved for slow path completions, catastrophic error 36 in case the EQ is (almost) full, and an end of page element */ 37 #define RESERVED_ISCSI_EQ_ELEMENTS (MAX_RAMRODS_PER_PORT + 2) 38 39 /* EQE Source types */ 40 #define ISCSI_SOURCE_TYPE_NIC (0) 41 #define ISCSI_SOURCE_TYPE_CID (1) 42 43 /* EQE Layer */ 44 #define ISCSI_EVENT_LAYER_ULP (0) 45 #define ISCSI_EVENT_LAYER_LLP (1) 46 47 /* EQE Completion Types */ 48 #define ISCSI_EVENT_TYPE_FAST_PATH (0) 49 #define ISCSI_EVENT_TYPE_SLOW_PATH (1) 50 51 /* the task context Pbl cache entry Index that marks PBL not cached */ 52 #define ISCSI_PBL_NOT_CACHED (0xff) 53 #define ISCSI_PDU_HEADER_NOT_CACHED (0xff) 54 55 56 // OOO constants 57 #define ISCSI_L2_OOO_RX_BDS_THRSHLD_DEFAULT (5) // threshold for number of available RX BDs 58 59 #endif //__EVEREST_ISCSI_CONSTANTS_H_ 60