1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, v.1, (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 * or http://opensource.org/licenses/CDDL-1.0. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 22 /* 23 * Copyright 2014-2017 Cavium, Inc. 24 * The contents of this file are subject to the terms of the Common Development 25 * and Distribution License, v.1, (the "License"). 26 27 * You may not use this file except in compliance with the License. 28 29 * You can obtain a copy of the License at available 30 * at http://opensource.org/licenses/CDDL-1.0 31 32 * See the License for the specific language governing permissions and 33 * limitations under the License. 34 */ 35 36 #ifndef __IRO_H__ 37 #define __IRO_H__ 38 39 /* Ystorm flow control mode. Use enum fw_flow_ctrl_mode */ 40 #define YSTORM_FLOW_CONTROL_MODE_OFFSET (IRO[0].base) 41 #define YSTORM_FLOW_CONTROL_MODE_SIZE (IRO[0].size) 42 /* Tstorm port statistics */ 43 #define TSTORM_PORT_STAT_OFFSET(port_id) (IRO[1].base + ((port_id) * IRO[1].m1)) 44 #define TSTORM_PORT_STAT_SIZE (IRO[1].size) 45 /* Tstorm ll2 port statistics */ 46 #define TSTORM_LL2_PORT_STAT_OFFSET(port_id) (IRO[2].base + ((port_id) * IRO[2].m1)) 47 #define TSTORM_LL2_PORT_STAT_SIZE (IRO[2].size) 48 /* Ustorm VF-PF Channel ready flag */ 49 #define USTORM_VF_PF_CHANNEL_READY_OFFSET(vf_id) (IRO[3].base + ((vf_id) * IRO[3].m1)) 50 #define USTORM_VF_PF_CHANNEL_READY_SIZE (IRO[3].size) 51 /* Ustorm Final flr cleanup ack */ 52 #define USTORM_FLR_FINAL_ACK_OFFSET(pf_id) (IRO[4].base + ((pf_id) * IRO[4].m1)) 53 #define USTORM_FLR_FINAL_ACK_SIZE (IRO[4].size) 54 /* Ustorm Event ring consumer */ 55 #define USTORM_EQE_CONS_OFFSET(pf_id) (IRO[5].base + ((pf_id) * IRO[5].m1)) 56 #define USTORM_EQE_CONS_SIZE (IRO[5].size) 57 /* Ustorm eth queue zone */ 58 #define USTORM_ETH_QUEUE_ZONE_OFFSET(queue_zone_id) (IRO[6].base + ((queue_zone_id) * IRO[6].m1)) 59 #define USTORM_ETH_QUEUE_ZONE_SIZE (IRO[6].size) 60 /* Ustorm Common Queue ring consumer */ 61 #define USTORM_COMMON_QUEUE_CONS_OFFSET(queue_zone_id) (IRO[7].base + ((queue_zone_id) * IRO[7].m1)) 62 #define USTORM_COMMON_QUEUE_CONS_SIZE (IRO[7].size) 63 /* Xstorm Integration Test Data */ 64 #define XSTORM_INTEG_TEST_DATA_OFFSET (IRO[8].base) 65 #define XSTORM_INTEG_TEST_DATA_SIZE (IRO[8].size) 66 /* Ystorm Integration Test Data */ 67 #define YSTORM_INTEG_TEST_DATA_OFFSET (IRO[9].base) 68 #define YSTORM_INTEG_TEST_DATA_SIZE (IRO[9].size) 69 /* Pstorm Integration Test Data */ 70 #define PSTORM_INTEG_TEST_DATA_OFFSET (IRO[10].base) 71 #define PSTORM_INTEG_TEST_DATA_SIZE (IRO[10].size) 72 /* Tstorm Integration Test Data */ 73 #define TSTORM_INTEG_TEST_DATA_OFFSET (IRO[11].base) 74 #define TSTORM_INTEG_TEST_DATA_SIZE (IRO[11].size) 75 /* Mstorm Integration Test Data */ 76 #define MSTORM_INTEG_TEST_DATA_OFFSET (IRO[12].base) 77 #define MSTORM_INTEG_TEST_DATA_SIZE (IRO[12].size) 78 /* Ustorm Integration Test Data */ 79 #define USTORM_INTEG_TEST_DATA_OFFSET (IRO[13].base) 80 #define USTORM_INTEG_TEST_DATA_SIZE (IRO[13].size) 81 /* Tstorm producers */ 82 #define TSTORM_LL2_RX_PRODS_OFFSET(core_rx_queue_id) (IRO[14].base + ((core_rx_queue_id) * IRO[14].m1)) 83 #define TSTORM_LL2_RX_PRODS_SIZE (IRO[14].size) 84 /* Tstorm LightL2 queue statistics */ 85 #define CORE_LL2_TSTORM_PER_QUEUE_STAT_OFFSET(core_rx_queue_id) (IRO[15].base + ((core_rx_queue_id) * IRO[15].m1)) 86 #define CORE_LL2_TSTORM_PER_QUEUE_STAT_SIZE (IRO[15].size) 87 /* Ustorm LiteL2 queue statistics */ 88 #define CORE_LL2_USTORM_PER_QUEUE_STAT_OFFSET(core_rx_queue_id) (IRO[16].base + ((core_rx_queue_id) * IRO[16].m1)) 89 #define CORE_LL2_USTORM_PER_QUEUE_STAT_SIZE (IRO[16].size) 90 /* Pstorm LiteL2 queue statistics */ 91 #define CORE_LL2_PSTORM_PER_QUEUE_STAT_OFFSET(core_tx_stats_id) (IRO[17].base + ((core_tx_stats_id) * IRO[17].m1)) 92 #define CORE_LL2_PSTORM_PER_QUEUE_STAT_SIZE (IRO[17].size) 93 /* Mstorm queue statistics */ 94 #define MSTORM_QUEUE_STAT_OFFSET(stat_counter_id) (IRO[18].base + ((stat_counter_id) * IRO[18].m1)) 95 #define MSTORM_QUEUE_STAT_SIZE (IRO[18].size) 96 /* Mstorm ETH PF queues producers */ 97 #define MSTORM_ETH_PF_PRODS_OFFSET(queue_id) (IRO[19].base + ((queue_id) * IRO[19].m1)) 98 #define MSTORM_ETH_PF_PRODS_SIZE (IRO[19].size) 99 /* Mstorm ETH VF queues producers offset in RAM. Used in default VF zone size mode. */ 100 #define MSTORM_ETH_VF_PRODS_OFFSET(vf_id,vf_queue_id) (IRO[20].base + ((vf_id) * IRO[20].m1) + ((vf_queue_id) * IRO[20].m2)) 101 #define MSTORM_ETH_VF_PRODS_SIZE (IRO[20].size) 102 /* TPA agregation timeout in us resolution (on ASIC) */ 103 #define MSTORM_TPA_TIMEOUT_US_OFFSET (IRO[21].base) 104 #define MSTORM_TPA_TIMEOUT_US_SIZE (IRO[21].size) 105 /* Mstorm pf statistics */ 106 #define MSTORM_ETH_PF_STAT_OFFSET(pf_id) (IRO[22].base + ((pf_id) * IRO[22].m1)) 107 #define MSTORM_ETH_PF_STAT_SIZE (IRO[22].size) 108 /* Ustorm queue statistics */ 109 #define USTORM_QUEUE_STAT_OFFSET(stat_counter_id) (IRO[23].base + ((stat_counter_id) * IRO[23].m1)) 110 #define USTORM_QUEUE_STAT_SIZE (IRO[23].size) 111 /* Ustorm pf statistics */ 112 #define USTORM_ETH_PF_STAT_OFFSET(pf_id) (IRO[24].base + ((pf_id) * IRO[24].m1)) 113 #define USTORM_ETH_PF_STAT_SIZE (IRO[24].size) 114 /* Pstorm queue statistics */ 115 #define PSTORM_QUEUE_STAT_OFFSET(stat_counter_id) (IRO[25].base + ((stat_counter_id) * IRO[25].m1)) 116 #define PSTORM_QUEUE_STAT_SIZE (IRO[25].size) 117 /* Pstorm pf statistics */ 118 #define PSTORM_ETH_PF_STAT_OFFSET(pf_id) (IRO[26].base + ((pf_id) * IRO[26].m1)) 119 #define PSTORM_ETH_PF_STAT_SIZE (IRO[26].size) 120 /* Control frame's EthType configuration for TX control frame security */ 121 #define PSTORM_CTL_FRAME_ETHTYPE_OFFSET(ethType_id) (IRO[27].base + ((ethType_id) * IRO[27].m1)) 122 #define PSTORM_CTL_FRAME_ETHTYPE_SIZE (IRO[27].size) 123 /* Tstorm last parser message */ 124 #define TSTORM_ETH_PRS_INPUT_OFFSET (IRO[28].base) 125 #define TSTORM_ETH_PRS_INPUT_SIZE (IRO[28].size) 126 /* Tstorm Eth limit Rx rate */ 127 #define ETH_RX_RATE_LIMIT_OFFSET(pf_id) (IRO[29].base + ((pf_id) * IRO[29].m1)) 128 #define ETH_RX_RATE_LIMIT_SIZE (IRO[29].size) 129 /* Xstorm queue zone */ 130 #define XSTORM_ETH_QUEUE_ZONE_OFFSET(queue_id) (IRO[30].base + ((queue_id) * IRO[30].m1)) 131 #define XSTORM_ETH_QUEUE_ZONE_SIZE (IRO[30].size) 132 /* Ystorm cqe producer */ 133 #define YSTORM_TOE_CQ_PROD_OFFSET(rss_id) (IRO[31].base + ((rss_id) * IRO[31].m1)) 134 #define YSTORM_TOE_CQ_PROD_SIZE (IRO[31].size) 135 /* Ustorm cqe producer */ 136 #define USTORM_TOE_CQ_PROD_OFFSET(rss_id) (IRO[32].base + ((rss_id) * IRO[32].m1)) 137 #define USTORM_TOE_CQ_PROD_SIZE (IRO[32].size) 138 /* Ustorm grq producer */ 139 #define USTORM_TOE_GRQ_PROD_OFFSET(pf_id) (IRO[33].base + ((pf_id) * IRO[33].m1)) 140 #define USTORM_TOE_GRQ_PROD_SIZE (IRO[33].size) 141 /* Tstorm cmdq-cons of given command queue-id */ 142 #define TSTORM_SCSI_CMDQ_CONS_OFFSET(cmdq_queue_id) (IRO[34].base + ((cmdq_queue_id) * IRO[34].m1)) 143 #define TSTORM_SCSI_CMDQ_CONS_SIZE (IRO[34].size) 144 /* Tstorm (reflects M-Storm) bdq-external-producer of given function ID, BDqueue-id */ 145 #define TSTORM_SCSI_BDQ_EXT_PROD_OFFSET(func_id,bdq_id) (IRO[35].base + ((func_id) * IRO[35].m1) + ((bdq_id) * IRO[35].m2)) 146 #define TSTORM_SCSI_BDQ_EXT_PROD_SIZE (IRO[35].size) 147 /* Mstorm bdq-external-producer of given BDQ resource ID, BDqueue-id */ 148 #define MSTORM_SCSI_BDQ_EXT_PROD_OFFSET(func_id,bdq_id) (IRO[36].base + ((func_id) * IRO[36].m1) + ((bdq_id) * IRO[36].m2)) 149 #define MSTORM_SCSI_BDQ_EXT_PROD_SIZE (IRO[36].size) 150 /* Tstorm iSCSI RX stats */ 151 #define TSTORM_ISCSI_RX_STATS_OFFSET(pf_id) (IRO[37].base + ((pf_id) * IRO[37].m1)) 152 #define TSTORM_ISCSI_RX_STATS_SIZE (IRO[37].size) 153 /* Mstorm iSCSI RX stats */ 154 #define MSTORM_ISCSI_RX_STATS_OFFSET(pf_id) (IRO[38].base + ((pf_id) * IRO[38].m1)) 155 #define MSTORM_ISCSI_RX_STATS_SIZE (IRO[38].size) 156 /* Ustorm iSCSI RX stats */ 157 #define USTORM_ISCSI_RX_STATS_OFFSET(pf_id) (IRO[39].base + ((pf_id) * IRO[39].m1)) 158 #define USTORM_ISCSI_RX_STATS_SIZE (IRO[39].size) 159 /* Xstorm iSCSI TX stats */ 160 #define XSTORM_ISCSI_TX_STATS_OFFSET(pf_id) (IRO[40].base + ((pf_id) * IRO[40].m1)) 161 #define XSTORM_ISCSI_TX_STATS_SIZE (IRO[40].size) 162 /* Ystorm iSCSI TX stats */ 163 #define YSTORM_ISCSI_TX_STATS_OFFSET(pf_id) (IRO[41].base + ((pf_id) * IRO[41].m1)) 164 #define YSTORM_ISCSI_TX_STATS_SIZE (IRO[41].size) 165 /* Pstorm iSCSI TX stats */ 166 #define PSTORM_ISCSI_TX_STATS_OFFSET(pf_id) (IRO[42].base + ((pf_id) * IRO[42].m1)) 167 #define PSTORM_ISCSI_TX_STATS_SIZE (IRO[42].size) 168 /* Tstorm FCoE RX stats */ 169 #define TSTORM_FCOE_RX_STATS_OFFSET(pf_id) (IRO[43].base + ((pf_id) * IRO[43].m1)) 170 #define TSTORM_FCOE_RX_STATS_SIZE (IRO[43].size) 171 /* Pstorm FCoE TX stats */ 172 #define PSTORM_FCOE_TX_STATS_OFFSET(pf_id) (IRO[44].base + ((pf_id) * IRO[44].m1)) 173 #define PSTORM_FCOE_TX_STATS_SIZE (IRO[44].size) 174 /* Pstorm RDMA queue statistics */ 175 #define PSTORM_RDMA_QUEUE_STAT_OFFSET(rdma_stat_counter_id) (IRO[45].base + ((rdma_stat_counter_id) * IRO[45].m1)) 176 #define PSTORM_RDMA_QUEUE_STAT_SIZE (IRO[45].size) 177 /* Tstorm RDMA queue statistics */ 178 #define TSTORM_RDMA_QUEUE_STAT_OFFSET(rdma_stat_counter_id) (IRO[46].base + ((rdma_stat_counter_id) * IRO[46].m1)) 179 #define TSTORM_RDMA_QUEUE_STAT_SIZE (IRO[46].size) 180 /* Xstorm iWARP rxmit stats */ 181 #define XSTORM_IWARP_RXMIT_STATS_OFFSET(pf_id) (IRO[47].base + ((pf_id) * IRO[47].m1)) 182 #define XSTORM_IWARP_RXMIT_STATS_SIZE (IRO[47].size) 183 /* Tstorm RoCE Event Statistics */ 184 #define TSTORM_ROCE_EVENTS_STAT_OFFSET(roce_pf_id) (IRO[48].base + ((roce_pf_id) * IRO[48].m1)) 185 #define TSTORM_ROCE_EVENTS_STAT_SIZE (IRO[48].size) 186 187 #endif /* __IRO_H__ */ 188