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