ecore_iro.h revision 6b3e017e
1/*
2 * Copyright (c) 2016 QLogic Corporation.
3 * All rights reserved.
4 * www.qlogic.com
5 *
6 * See LICENSE.qede_pmd for copyright and licensing details.
7 */
8
9#ifndef __IRO_H__
10#define __IRO_H__
11
12/* Ystorm flow control mode. Use enum fw_flow_ctrl_mode */
13#define YSTORM_FLOW_CONTROL_MODE_OFFSET (IRO[0].base)
14#define YSTORM_FLOW_CONTROL_MODE_SIZE (IRO[0].size)
15/* Tstorm port statistics */
16#define TSTORM_PORT_STAT_OFFSET(port_id) (IRO[1].base + ((port_id) * IRO[1].m1))
17#define TSTORM_PORT_STAT_SIZE (IRO[1].size)
18/* Tstorm ll2 port statistics */
19#define TSTORM_LL2_PORT_STAT_OFFSET(port_id) (IRO[2].base + \
20	((port_id) * IRO[2].m1))
21#define TSTORM_LL2_PORT_STAT_SIZE (IRO[2].size)
22/* Ustorm VF-PF Channel ready flag */
23#define USTORM_VF_PF_CHANNEL_READY_OFFSET(vf_id) (IRO[3].base + \
24	((vf_id) * IRO[3].m1))
25#define USTORM_VF_PF_CHANNEL_READY_SIZE (IRO[3].size)
26/* Ustorm Final flr cleanup ack */
27#define USTORM_FLR_FINAL_ACK_OFFSET(pf_id) (IRO[4].base + ((pf_id) * IRO[4].m1))
28#define USTORM_FLR_FINAL_ACK_SIZE (IRO[4].size)
29/* Ustorm Event ring consumer */
30#define USTORM_EQE_CONS_OFFSET(pf_id) (IRO[5].base + ((pf_id) * IRO[5].m1))
31#define USTORM_EQE_CONS_SIZE (IRO[5].size)
32/* Ustorm eth queue zone */
33#define USTORM_ETH_QUEUE_ZONE_OFFSET(queue_zone_id) (IRO[6].base + \
34	((queue_zone_id) * IRO[6].m1))
35#define USTORM_ETH_QUEUE_ZONE_SIZE (IRO[6].size)
36/* Ustorm Common Queue ring consumer */
37#define USTORM_COMMON_QUEUE_CONS_OFFSET(queue_zone_id) (IRO[7].base + \
38	((queue_zone_id) * IRO[7].m1))
39#define USTORM_COMMON_QUEUE_CONS_SIZE (IRO[7].size)
40/* Xstorm Integration Test Data */
41#define XSTORM_INTEG_TEST_DATA_OFFSET (IRO[8].base)
42#define XSTORM_INTEG_TEST_DATA_SIZE (IRO[8].size)
43/* Ystorm Integration Test Data */
44#define YSTORM_INTEG_TEST_DATA_OFFSET (IRO[9].base)
45#define YSTORM_INTEG_TEST_DATA_SIZE (IRO[9].size)
46/* Pstorm Integration Test Data */
47#define PSTORM_INTEG_TEST_DATA_OFFSET (IRO[10].base)
48#define PSTORM_INTEG_TEST_DATA_SIZE (IRO[10].size)
49/* Tstorm Integration Test Data */
50#define TSTORM_INTEG_TEST_DATA_OFFSET (IRO[11].base)
51#define TSTORM_INTEG_TEST_DATA_SIZE (IRO[11].size)
52/* Mstorm Integration Test Data */
53#define MSTORM_INTEG_TEST_DATA_OFFSET (IRO[12].base)
54#define MSTORM_INTEG_TEST_DATA_SIZE (IRO[12].size)
55/* Ustorm Integration Test Data */
56#define USTORM_INTEG_TEST_DATA_OFFSET (IRO[13].base)
57#define USTORM_INTEG_TEST_DATA_SIZE (IRO[13].size)
58/* Tstorm producers */
59#define TSTORM_LL2_RX_PRODS_OFFSET(core_rx_queue_id) (IRO[14].base + \
60	((core_rx_queue_id) * IRO[14].m1))
61#define TSTORM_LL2_RX_PRODS_SIZE (IRO[14].size)
62/* Tstorm LightL2 queue statistics */
63#define CORE_LL2_TSTORM_PER_QUEUE_STAT_OFFSET(core_rx_queue_id) \
64	(IRO[15].base + ((core_rx_queue_id) * IRO[15].m1))
65#define CORE_LL2_TSTORM_PER_QUEUE_STAT_SIZE (IRO[15].size)
66/* Ustorm LiteL2 queue statistics */
67#define CORE_LL2_USTORM_PER_QUEUE_STAT_OFFSET(core_rx_queue_id) \
68	(IRO[16].base + ((core_rx_queue_id) * IRO[16].m1))
69#define CORE_LL2_USTORM_PER_QUEUE_STAT_SIZE (IRO[16].size)
70/* Pstorm LiteL2 queue statistics */
71#define CORE_LL2_PSTORM_PER_QUEUE_STAT_OFFSET(core_tx_stats_id) \
72	(IRO[17].base + ((core_tx_stats_id) * IRO[17].m1))
73#define CORE_LL2_PSTORM_PER_QUEUE_STAT_SIZE (IRO[17].size)
74/* Mstorm queue statistics */
75#define MSTORM_QUEUE_STAT_OFFSET(stat_counter_id) (IRO[18].base + \
76	((stat_counter_id) * IRO[18].m1))
77#define MSTORM_QUEUE_STAT_SIZE (IRO[18].size)
78/* Mstorm ETH PF queues producers */
79#define MSTORM_ETH_PF_PRODS_OFFSET(queue_id) (IRO[19].base + \
80	((queue_id) * IRO[19].m1))
81#define MSTORM_ETH_PF_PRODS_SIZE (IRO[19].size)
82/* Mstorm ETH VF queues producers offset in RAM. Used in default VF zone size
83 * mode.
84 */
85#define MSTORM_ETH_VF_PRODS_OFFSET(vf_id, vf_queue_id) (IRO[20].base + \
86	((vf_id) * IRO[20].m1) + ((vf_queue_id) * IRO[20].m2))
87#define MSTORM_ETH_VF_PRODS_SIZE (IRO[20].size)
88/* TPA agregation timeout in us resolution (on ASIC) */
89#define MSTORM_TPA_TIMEOUT_US_OFFSET (IRO[21].base)
90#define MSTORM_TPA_TIMEOUT_US_SIZE (IRO[21].size)
91/* Mstorm pf statistics */
92#define MSTORM_ETH_PF_STAT_OFFSET(pf_id) (IRO[22].base + ((pf_id) * IRO[22].m1))
93#define MSTORM_ETH_PF_STAT_SIZE (IRO[22].size)
94/* Ustorm queue statistics */
95#define USTORM_QUEUE_STAT_OFFSET(stat_counter_id) (IRO[23].base + \
96	((stat_counter_id) * IRO[23].m1))
97#define USTORM_QUEUE_STAT_SIZE (IRO[23].size)
98/* Ustorm pf statistics */
99#define USTORM_ETH_PF_STAT_OFFSET(pf_id) (IRO[24].base + ((pf_id) * IRO[24].m1))
100#define USTORM_ETH_PF_STAT_SIZE (IRO[24].size)
101/* Pstorm queue statistics */
102#define PSTORM_QUEUE_STAT_OFFSET(stat_counter_id) (IRO[25].base + \
103	((stat_counter_id) * IRO[25].m1))
104#define PSTORM_QUEUE_STAT_SIZE (IRO[25].size)
105/* Pstorm pf statistics */
106#define PSTORM_ETH_PF_STAT_OFFSET(pf_id) (IRO[26].base + ((pf_id) * IRO[26].m1))
107#define PSTORM_ETH_PF_STAT_SIZE (IRO[26].size)
108/* Control frame's EthType configuration for TX control frame security */
109#define PSTORM_CTL_FRAME_ETHTYPE_OFFSET(ethType_id) (IRO[27].base + \
110	((ethType_id) * IRO[27].m1))
111#define PSTORM_CTL_FRAME_ETHTYPE_SIZE (IRO[27].size)
112/* Tstorm last parser message */
113#define TSTORM_ETH_PRS_INPUT_OFFSET (IRO[28].base)
114#define TSTORM_ETH_PRS_INPUT_SIZE (IRO[28].size)
115/* Tstorm Eth limit Rx rate */
116#define ETH_RX_RATE_LIMIT_OFFSET(pf_id) (IRO[29].base + ((pf_id) * IRO[29].m1))
117#define ETH_RX_RATE_LIMIT_SIZE (IRO[29].size)
118/* Xstorm queue zone */
119#define XSTORM_ETH_QUEUE_ZONE_OFFSET(queue_id) (IRO[30].base + \
120	((queue_id) * IRO[30].m1))
121#define XSTORM_ETH_QUEUE_ZONE_SIZE (IRO[30].size)
122/* Ystorm cqe producer */
123#define YSTORM_TOE_CQ_PROD_OFFSET(rss_id) (IRO[31].base + \
124	((rss_id) * IRO[31].m1))
125#define YSTORM_TOE_CQ_PROD_SIZE (IRO[31].size)
126/* Ustorm cqe producer */
127#define USTORM_TOE_CQ_PROD_OFFSET(rss_id) (IRO[32].base + \
128	((rss_id) * IRO[32].m1))
129#define USTORM_TOE_CQ_PROD_SIZE (IRO[32].size)
130/* Ustorm grq producer */
131#define USTORM_TOE_GRQ_PROD_OFFSET(pf_id) (IRO[33].base + \
132	((pf_id) * IRO[33].m1))
133#define USTORM_TOE_GRQ_PROD_SIZE (IRO[33].size)
134/* Tstorm cmdq-cons of given command queue-id */
135#define TSTORM_SCSI_CMDQ_CONS_OFFSET(cmdq_queue_id) (IRO[34].base + \
136	((cmdq_queue_id) * IRO[34].m1))
137#define TSTORM_SCSI_CMDQ_CONS_SIZE (IRO[34].size)
138/* Tstorm (reflects M-Storm) bdq-external-producer of given function ID,
139 * BDqueue-id
140 */
141#define TSTORM_SCSI_BDQ_EXT_PROD_OFFSET(func_id, bdq_id) (IRO[35].base + \
142	((func_id) * IRO[35].m1) + ((bdq_id) * IRO[35].m2))
143#define TSTORM_SCSI_BDQ_EXT_PROD_SIZE (IRO[35].size)
144/* Mstorm bdq-external-producer of given BDQ resource ID, BDqueue-id */
145#define MSTORM_SCSI_BDQ_EXT_PROD_OFFSET(func_id, bdq_id) (IRO[36].base + \
146	((func_id) * IRO[36].m1) + ((bdq_id) * IRO[36].m2))
147#define MSTORM_SCSI_BDQ_EXT_PROD_SIZE (IRO[36].size)
148/* Tstorm iSCSI RX stats */
149#define TSTORM_ISCSI_RX_STATS_OFFSET(pf_id) (IRO[37].base + \
150	((pf_id) * IRO[37].m1))
151#define TSTORM_ISCSI_RX_STATS_SIZE (IRO[37].size)
152/* Mstorm iSCSI RX stats */
153#define MSTORM_ISCSI_RX_STATS_OFFSET(pf_id) (IRO[38].base + \
154	((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 + \
158	((pf_id) * IRO[39].m1))
159#define USTORM_ISCSI_RX_STATS_SIZE (IRO[39].size)
160/* Xstorm iSCSI TX stats */
161#define XSTORM_ISCSI_TX_STATS_OFFSET(pf_id) (IRO[40].base + \
162	((pf_id) * IRO[40].m1))
163#define XSTORM_ISCSI_TX_STATS_SIZE (IRO[40].size)
164/* Ystorm iSCSI TX stats */
165#define YSTORM_ISCSI_TX_STATS_OFFSET(pf_id) (IRO[41].base + \
166	((pf_id) * IRO[41].m1))
167#define YSTORM_ISCSI_TX_STATS_SIZE (IRO[41].size)
168/* Pstorm iSCSI TX stats */
169#define PSTORM_ISCSI_TX_STATS_OFFSET(pf_id) (IRO[42].base + \
170	((pf_id) * IRO[42].m1))
171#define PSTORM_ISCSI_TX_STATS_SIZE (IRO[42].size)
172/* Tstorm FCoE RX stats */
173#define TSTORM_FCOE_RX_STATS_OFFSET(pf_id) (IRO[43].base + \
174	((pf_id) * IRO[43].m1))
175#define TSTORM_FCOE_RX_STATS_SIZE (IRO[43].size)
176/* Pstorm FCoE TX stats */
177#define PSTORM_FCOE_TX_STATS_OFFSET(pf_id) (IRO[44].base + \
178	((pf_id) * IRO[44].m1))
179#define PSTORM_FCOE_TX_STATS_SIZE (IRO[44].size)
180/* Pstorm RDMA queue statistics */
181#define PSTORM_RDMA_QUEUE_STAT_OFFSET(rdma_stat_counter_id) \
182	(IRO[45].base + ((rdma_stat_counter_id) * IRO[45].m1))
183#define PSTORM_RDMA_QUEUE_STAT_SIZE (IRO[45].size)
184/* Tstorm RDMA queue statistics */
185#define TSTORM_RDMA_QUEUE_STAT_OFFSET(rdma_stat_counter_id) (IRO[46].base + \
186	((rdma_stat_counter_id) * IRO[46].m1))
187#define TSTORM_RDMA_QUEUE_STAT_SIZE (IRO[46].size)
188
189#endif /* __IRO_H__ */
190