net/sfc/base: add CTPIO statistics
[dpdk.git] / drivers / net / sfc / base / efx_check.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  *
3  * Copyright (c) 2012-2018 Solarflare Communications Inc.
4  * All rights reserved.
5  */
6
7 #ifndef _SYS_EFX_CHECK_H
8 #define _SYS_EFX_CHECK_H
9
10 #include "efsys.h"
11
12 /*
13  * Check that the efsys.h header in client code has a valid combination of
14  * EFSYS_OPT_xxx options.
15  *
16  * NOTE: Keep checks for obsolete options here to ensure that they are removed
17  * from client code (and do not reappear in merges from other branches).
18  */
19
20 #ifdef EFSYS_OPT_FALCON
21 # error "FALCON is obsolete and is not supported."
22 #endif
23
24 #if EFSYS_OPT_BOOTCFG
25 /* Support NVRAM based boot config */
26 # if !EFSYS_OPT_NVRAM
27 #  error "BOOTCFG requires NVRAM"
28 # endif
29 #endif /* EFSYS_OPT_BOOTCFG */
30
31 #if EFSYS_OPT_CHECK_REG
32 /* Verify chip implements accessed registers */
33 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
34         EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
35 #  error "CHECK_REG requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
36 # endif
37 #endif /* EFSYS_OPT_CHECK_REG */
38
39 #if EFSYS_OPT_DECODE_INTR_FATAL
40 /* Decode fatal errors */
41 # if !EFSYS_OPT_SIENA
42 #  error "INTR_FATAL requires SIENA"
43 # endif
44 #endif /* EFSYS_OPT_DECODE_INTR_FATAL */
45
46 #if EFSYS_OPT_DIAG
47 /* Support diagnostic hardware tests */
48 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
49         EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
50 #  error "DIAG requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
51 # endif
52 #endif /* EFSYS_OPT_DIAG */
53
54 #if EFSYS_OPT_EV_PREFETCH
55 /* Support optimized EVQ data access */
56 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
57         EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
58 #  error "EV_PREFETCH requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
59 # endif
60 #endif /* EFSYS_OPT_EV_PREFETCH */
61
62 #ifdef EFSYS_OPT_FALCON_NIC_CFG_OVERRIDE
63 # error "FALCON_NIC_CFG_OVERRIDE is obsolete and is not supported."
64 #endif
65
66 #if EFSYS_OPT_FILTER
67 /* Support hardware packet filters */
68 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
69         EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
70 #  error "FILTER requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
71 # endif
72 #endif /* EFSYS_OPT_FILTER */
73
74 #if (EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
75 # if !EFSYS_OPT_FILTER
76 #  error "HUNTINGTON or MEDFORD or MEDFORD2 requires FILTER"
77 # endif
78 #endif /* EFSYS_OPT_HUNTINGTON */
79
80 #if EFSYS_OPT_LOOPBACK
81 /* Support hardware loopback modes */
82 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
83         EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
84 #  error "LOOPBACK requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
85 # endif
86 #endif /* EFSYS_OPT_LOOPBACK */
87
88 #ifdef EFSYS_OPT_MAC_FALCON_GMAC
89 # error "MAC_FALCON_GMAC is obsolete and is not supported."
90 #endif
91
92 #ifdef EFSYS_OPT_MAC_FALCON_XMAC
93 # error "MAC_FALCON_XMAC is obsolete and is not supported."
94 #endif
95
96 #if EFSYS_OPT_MAC_STATS
97 /* Support MAC statistics */
98 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
99         EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
100 #  error "MAC_STATS requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
101 # endif
102 #endif /* EFSYS_OPT_MAC_STATS */
103
104 #if EFSYS_OPT_MCDI
105 /* Support management controller messages */
106 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
107         EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
108 #  error "MCDI requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
109 # endif
110 #endif /* EFSYS_OPT_MCDI */
111
112 #if (EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
113         EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
114 # if !EFSYS_OPT_MCDI
115 #  error "SIENA or HUNTINGTON or MEDFORD or MEDFORD2 requires MCDI"
116 # endif
117 #endif
118
119 #if EFSYS_OPT_MCDI_LOGGING
120 /* Support MCDI logging */
121 # if !EFSYS_OPT_MCDI
122 #  error "MCDI_LOGGING requires MCDI"
123 # endif
124 #endif /* EFSYS_OPT_MCDI_LOGGING */
125
126 #if EFSYS_OPT_MCDI_PROXY_AUTH
127 /* Support MCDI proxy authorization */
128 # if !EFSYS_OPT_MCDI
129 #  error "MCDI_PROXY_AUTH requires MCDI"
130 # endif
131 #endif /* EFSYS_OPT_MCDI_PROXY_AUTH */
132
133 #ifdef EFSYS_OPT_MON_LM87
134 # error "MON_LM87 is obsolete and is not supported."
135 #endif
136
137 #ifdef EFSYS_OPT_MON_MAX6647
138 # error "MON_MAX6647 is obsolete and is not supported."
139 #endif
140
141 #ifdef EFSYS_OPT_MON_NULL
142 # error "MON_NULL is obsolete and is not supported."
143 #endif
144
145 #ifdef EFSYS_OPT_MON_SIENA
146 #  error "MON_SIENA is obsolete (replaced by MON_MCDI)."
147 #endif
148
149 #ifdef EFSYS_OPT_MON_HUNTINGTON
150 #  error "MON_HUNTINGTON is obsolete (replaced by MON_MCDI)."
151 #endif
152
153 #if EFSYS_OPT_MON_STATS
154 /* Support monitor statistics (voltage/temperature) */
155 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
156         EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
157 #  error "MON_STATS requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
158 # endif
159 #endif /* EFSYS_OPT_MON_STATS */
160
161 #if EFSYS_OPT_MON_MCDI
162 /* Support Monitor via mcdi */
163 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
164         EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
165 #  error "MON_MCDI requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
166 # endif
167 #endif /* EFSYS_OPT_MON_MCDI*/
168
169 #if EFSYS_OPT_NAMES
170 /* Support printable names for statistics */
171 # if !(EFSYS_OPT_LOOPBACK || EFSYS_OPT_MAC_STATS || EFSYS_OPT_MCDI || \
172         EFSYS_MON_STATS || EFSYS_OPT_PHY_STATS || EFSYS_OPT_QSTATS)
173 #  error "NAMES requires LOOPBACK or xxxSTATS or MCDI"
174 # endif
175 #endif /* EFSYS_OPT_NAMES */
176
177 #if EFSYS_OPT_NVRAM
178 /* Support non volatile configuration */
179 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
180         EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
181 #  error "NVRAM requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
182 # endif
183 #endif /* EFSYS_OPT_NVRAM */
184
185 #ifdef EFSYS_OPT_NVRAM_FALCON_BOOTROM
186 # error "NVRAM_FALCON_BOOTROM is obsolete and is not supported."
187 #endif
188
189 #ifdef EFSYS_OPT_NVRAM_SFT9001
190 # error "NVRAM_SFT9001 is obsolete and is not supported."
191 #endif
192
193 #ifdef EFSYS_OPT_NVRAM_SFX7101
194 # error "NVRAM_SFX7101 is obsolete and is not supported."
195 #endif
196
197 #ifdef EFSYS_OPT_PCIE_TUNE
198 # error "PCIE_TUNE is obsolete and is not supported."
199 #endif
200
201 #ifdef EFSYS_OPT_PHY_BIST
202 # error "PHY_BIST is obsolete (replaced by BIST)."
203 #endif
204
205 #if EFSYS_OPT_PHY_FLAGS
206 /* Support PHY flags */
207 # if !EFSYS_OPT_SIENA
208 #  error "PHY_FLAGS requires SIENA"
209 # endif
210 #endif /* EFSYS_OPT_PHY_FLAGS */
211
212 #if EFSYS_OPT_PHY_LED_CONTROL
213 /* Support for PHY LED control */
214 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
215         EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
216 #  error "PHY_LED_CONTROL requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
217 # endif
218 #endif /* EFSYS_OPT_PHY_LED_CONTROL */
219
220 #ifdef EFSYS_OPT_PHY_NULL
221 # error "PHY_NULL is obsolete and is not supported."
222 #endif
223
224 #ifdef EFSYS_OPT_PHY_PM8358
225 # error "PHY_PM8358 is obsolete and is not supported."
226 #endif
227
228 #ifdef EFSYS_OPT_PHY_PROPS
229 # error "PHY_PROPS is obsolete and is not supported."
230 #endif
231
232 #ifdef EFSYS_OPT_PHY_QT2022C2
233 # error "PHY_QT2022C2 is obsolete and is not supported."
234 #endif
235
236 #ifdef EFSYS_OPT_PHY_QT2025C
237 # error "PHY_QT2025C is obsolete and is not supported."
238 #endif
239
240 #ifdef EFSYS_OPT_PHY_SFT9001
241 # error "PHY_SFT9001 is obsolete and is not supported."
242 #endif
243
244 #ifdef EFSYS_OPT_PHY_SFX7101
245 # error "PHY_SFX7101 is obsolete and is not supported."
246 #endif
247
248 #if EFSYS_OPT_PHY_STATS
249 /* Support PHY statistics */
250 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
251 #  error "PHY_STATS requires SIENA or HUNTINGTON or MEDFORD"
252 # endif
253 #endif /* EFSYS_OPT_PHY_STATS */
254
255 #ifdef EFSYS_OPT_PHY_TXC43128
256 # error "PHY_TXC43128 is obsolete and is not supported."
257 #endif
258
259 #if EFSYS_OPT_QSTATS
260 /* Support EVQ/RXQ/TXQ statistics */
261 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
262         EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
263 #  error "QSTATS requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
264 # endif
265 #endif /* EFSYS_OPT_QSTATS */
266
267 #ifdef EFSYS_OPT_RX_HDR_SPLIT
268 # error "RX_HDR_SPLIT is obsolete and is not supported"
269 #endif
270
271 #if EFSYS_OPT_RX_SCALE
272 /* Support receive scaling (RSS) */
273 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
274         EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
275 #  error "RX_SCALE requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
276 # endif
277 #endif /* EFSYS_OPT_RX_SCALE */
278
279 #if EFSYS_OPT_RX_SCATTER
280 /* Support receive scatter DMA */
281 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
282         EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
283 #  error "RX_SCATTER requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
284 # endif
285 #endif /* EFSYS_OPT_RX_SCATTER */
286
287 #ifdef EFSYS_OPT_STAT_NAME
288 # error "STAT_NAME is obsolete (replaced by NAMES)."
289 #endif
290
291 #if EFSYS_OPT_VPD
292 /* Support PCI Vital Product Data (VPD) */
293 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
294         EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
295 #  error "VPD requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
296 # endif
297 #endif /* EFSYS_OPT_VPD */
298
299 #ifdef EFSYS_OPT_WOL
300 # error "WOL is obsolete and is not supported"
301 #endif /* EFSYS_OPT_WOL */
302
303 #ifdef EFSYS_OPT_MCAST_FILTER_LIST
304 #  error "MCAST_FILTER_LIST is obsolete and is not supported"
305 #endif
306
307 #if EFSYS_OPT_BIST
308 /* Support BIST */
309 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || \
310         EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
311 #  error "BIST requires SIENA or HUNTINGTON or MEDFORD or MEDFORD2"
312 # endif
313 #endif /* EFSYS_OPT_BIST */
314
315 #if EFSYS_OPT_LICENSING
316 /* Support MCDI licensing API */
317 # if !EFSYS_OPT_MCDI
318 #  error "LICENSING requires MCDI"
319 # endif
320 # if !EFSYS_HAS_UINT64
321 #  error "LICENSING requires UINT64"
322 # endif
323 #endif /* EFSYS_OPT_LICENSING */
324
325 #if EFSYS_OPT_ALLOW_UNCONFIGURED_NIC
326 /* Support adapters with missing static config (for factory use only) */
327 # if !(EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
328 #  error "ALLOW_UNCONFIGURED_NIC requires MEDFORD or MEDFORD2"
329 # endif
330 #endif /* EFSYS_OPT_ALLOW_UNCONFIGURED_NIC */
331
332 #if EFSYS_OPT_RX_PACKED_STREAM
333 /* Support packed stream mode */
334 # if !(EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
335 #  error "PACKED_STREAM requires HUNTINGTON or MEDFORD or MEDFORD2"
336 # endif
337 #endif
338
339 /* Support hardware assistance for tunnels */
340 #if EFSYS_OPT_TUNNEL
341 # if !(EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2)
342 #  error "TUNNEL requires MEDFORD or MEDFORD2"
343 # endif
344 #endif /* EFSYS_OPT_TUNNEL */
345
346 #endif /* _SYS_EFX_CHECK_H */