net/sfc/base: import RSS support
[dpdk.git] / drivers / net / sfc / base / efx_check.h
1 /*
2  * Copyright (c) 2012-2016 Solarflare Communications Inc.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  *
8  * 1. Redistributions of source code must retain the above copyright notice,
9  *    this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright notice,
11  *    this list of conditions and the following disclaimer in the documentation
12  *    and/or other materials provided with the distribution.
13  *
14  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
16  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
18  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
21  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
22  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
23  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
24  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25  *
26  * The views and conclusions contained in the software and documentation are
27  * those of the authors and should not be interpreted as representing official
28  * policies, either expressed or implied, of the FreeBSD Project.
29  */
30
31 #ifndef _SYS_EFX_CHECK_H
32 #define _SYS_EFX_CHECK_H
33
34 #include "efsys.h"
35
36 /*
37  * Check that the efsys.h header in client code has a valid combination of
38  * EFSYS_OPT_xxx options.
39  *
40  * NOTE: Keep checks for obsolete options here to ensure that they are removed
41  * from client code (and do not reappear in merges from other branches).
42  */
43
44 #ifdef EFSYS_OPT_FALCON
45 # error "FALCON is obsolete and is not supported."
46 #endif
47
48 #if EFSYS_OPT_CHECK_REG
49 /* Verify chip implements accessed registers */
50 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
51 #  error "CHECK_REG requires SIENA or HUNTINGTON or MEDFORD"
52 # endif
53 #endif /* EFSYS_OPT_CHECK_REG */
54
55 #if EFSYS_OPT_DECODE_INTR_FATAL
56 /* Decode fatal errors */
57 # if !EFSYS_OPT_SIENA
58 #  error "INTR_FATAL requires SIENA"
59 # endif
60 #endif /* EFSYS_OPT_DECODE_INTR_FATAL */
61
62 #if EFSYS_OPT_DIAG
63 /* Support diagnostic hardware tests */
64 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
65 #  error "DIAG requires SIENA or HUNTINGTON or MEDFORD"
66 # endif
67 #endif /* EFSYS_OPT_DIAG */
68
69 #if EFSYS_OPT_EV_PREFETCH
70 /* Support optimized EVQ data access */
71 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
72 #  error "EV_PREFETCH requires SIENA or HUNTINGTON or MEDFORD"
73 # endif
74 #endif /* EFSYS_OPT_EV_PREFETCH */
75
76 #ifdef EFSYS_OPT_FALCON_NIC_CFG_OVERRIDE
77 # error "FALCON_NIC_CFG_OVERRIDE is obsolete and is not supported."
78 #endif
79
80 #if EFSYS_OPT_FILTER
81 /* Support hardware packet filters */
82 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
83 #  error "FILTER requires SIENA or HUNTINGTON or MEDFORD"
84 # endif
85 #endif /* EFSYS_OPT_FILTER */
86
87 #if (EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
88 # if !EFSYS_OPT_FILTER
89 #  error "HUNTINGTON or MEDFORD requires FILTER"
90 # endif
91 #endif /* EFSYS_OPT_HUNTINGTON */
92
93 #ifdef EFSYS_OPT_MAC_FALCON_GMAC
94 # error "MAC_FALCON_GMAC is obsolete and is not supported."
95 #endif
96
97 #ifdef EFSYS_OPT_MAC_FALCON_XMAC
98 # error "MAC_FALCON_XMAC is obsolete and is not supported."
99 #endif
100
101 #if EFSYS_OPT_MAC_STATS
102 /* Support MAC statistics */
103 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
104 #  error "MAC_STATS requires SIENA or HUNTINGTON or MEDFORD"
105 # endif
106 #endif /* EFSYS_OPT_MAC_STATS */
107
108 #if EFSYS_OPT_MCDI
109 /* Support management controller messages */
110 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
111 #  error "MCDI requires SIENA or HUNTINGTON or MEDFORD"
112 # endif
113 #endif /* EFSYS_OPT_MCDI */
114
115 #if (EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
116 # if !EFSYS_OPT_MCDI
117 #  error "SIENA or HUNTINGTON or MEDFORD requires MCDI"
118 # endif
119 #endif
120
121 #if EFSYS_OPT_MCDI_LOGGING
122 /* Support MCDI logging */
123 # if !EFSYS_OPT_MCDI
124 #  error "MCDI_LOGGING requires MCDI"
125 # endif
126 #endif /* EFSYS_OPT_MCDI_LOGGING */
127
128 #if EFSYS_OPT_MCDI_PROXY_AUTH
129 /* Support MCDI proxy authorization */
130 # if !EFSYS_OPT_MCDI
131 #  error "MCDI_PROXY_AUTH requires MCDI"
132 # endif
133 #endif /* EFSYS_OPT_MCDI_PROXY_AUTH */
134
135 #ifdef EFSYS_OPT_MON_LM87
136 # error "MON_LM87 is obsolete and is not supported."
137 #endif
138
139 #ifdef EFSYS_OPT_MON_MAX6647
140 # error "MON_MAX6647 is obsolete and is not supported."
141 #endif
142
143 #ifdef EFSYS_OPT_MON_NULL
144 # error "MON_NULL is obsolete and is not supported."
145 #endif
146
147 #ifdef EFSYS_OPT_MON_SIENA
148 #  error "MON_SIENA is obsolete (replaced by MON_MCDI)."
149 #endif
150
151 #ifdef EFSYS_OPT_MON_HUNTINGTON
152 #  error "MON_HUNTINGTON is obsolete (replaced by MON_MCDI)."
153 #endif
154
155 #if EFSYS_OPT_NAMES
156 /* Support printable names for statistics */
157 # if !(EFSYS_OPT_LOOPBACK || EFSYS_OPT_MAC_STATS || EFSYS_OPT_MCDI || \
158         EFSYS_MON_STATS || EFSYS_OPT_PHY_STATS || EFSYS_OPT_QSTATS)
159 #  error "NAMES requires LOOPBACK or xxxSTATS or MCDI"
160 # endif
161 #endif /* EFSYS_OPT_NAMES */
162
163 #ifdef EFSYS_OPT_NVRAM_FALCON_BOOTROM
164 # error "NVRAM_FALCON_BOOTROM is obsolete and is not supported."
165 #endif
166
167 #ifdef EFSYS_OPT_NVRAM_SFT9001
168 # error "NVRAM_SFT9001 is obsolete and is not supported."
169 #endif
170
171 #ifdef EFSYS_OPT_NVRAM_SFX7101
172 # error "NVRAM_SFX7101 is obsolete and is not supported."
173 #endif
174
175 #ifdef EFSYS_OPT_PCIE_TUNE
176 # error "PCIE_TUNE is obsolete and is not supported."
177 #endif
178
179 #ifdef EFSYS_OPT_PHY_BIST
180 # error "PHY_BIST is obsolete (replaced by BIST)."
181 #endif
182
183 #if EFSYS_OPT_PHY_FLAGS
184 /* Support PHY flags */
185 # if !EFSYS_OPT_SIENA
186 #  error "PHY_FLAGS requires SIENA"
187 # endif
188 #endif /* EFSYS_OPT_PHY_FLAGS */
189
190 #if EFSYS_OPT_PHY_LED_CONTROL
191 /* Support for PHY LED control */
192 # if !EFSYS_OPT_SIENA
193 #  error "PHY_LED_CONTROL requires SIENA"
194 # endif
195 #endif /* EFSYS_OPT_PHY_LED_CONTROL */
196
197 #ifdef EFSYS_OPT_PHY_NULL
198 # error "PHY_NULL is obsolete and is not supported."
199 #endif
200
201 #ifdef EFSYS_OPT_PHY_PM8358
202 # error "PHY_PM8358 is obsolete and is not supported."
203 #endif
204
205 #ifdef EFSYS_OPT_PHY_PROPS
206 # error "PHY_PROPS is obsolete and is not supported."
207 #endif
208
209 #ifdef EFSYS_OPT_PHY_QT2022C2
210 # error "PHY_QT2022C2 is obsolete and is not supported."
211 #endif
212
213 #ifdef EFSYS_OPT_PHY_QT2025C
214 # error "PHY_QT2025C is obsolete and is not supported."
215 #endif
216
217 #ifdef EFSYS_OPT_PHY_SFT9001
218 # error "PHY_SFT9001 is obsolete and is not supported."
219 #endif
220
221 #ifdef EFSYS_OPT_PHY_SFX7101
222 # error "PHY_SFX7101 is obsolete and is not supported."
223 #endif
224
225 #if EFSYS_OPT_PHY_STATS
226 /* Support PHY statistics */
227 # if !EFSYS_OPT_SIENA
228 #  error "PHY_STATS requires SIENA"
229 # endif
230 #endif /* EFSYS_OPT_PHY_STATS */
231
232 #ifdef EFSYS_OPT_PHY_TXC43128
233 # error "PHY_TXC43128 is obsolete and is not supported."
234 #endif
235
236 #if EFSYS_OPT_QSTATS
237 /* Support EVQ/RXQ/TXQ statistics */
238 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
239 #  error "QSTATS requires SIENA or HUNTINGTON or MEDFORD"
240 # endif
241 #endif /* EFSYS_OPT_QSTATS */
242
243 #ifdef EFSYS_OPT_RX_HDR_SPLIT
244 # error "RX_HDR_SPLIT is obsolete and is not supported"
245 #endif
246
247 #if EFSYS_OPT_RX_SCALE
248 /* Support receive scaling (RSS) */
249 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
250 #  error "RX_SCALE requires SIENA or HUNTINGTON or MEDFORD"
251 # endif
252 #endif /* EFSYS_OPT_RX_SCALE */
253
254 #if EFSYS_OPT_RX_SCATTER
255 /* Support receive scatter DMA */
256 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
257 #  error "RX_SCATTER requires SIENA or HUNTINGTON or MEDFORD"
258 # endif
259 #endif /* EFSYS_OPT_RX_SCATTER */
260
261 #ifdef EFSYS_OPT_STAT_NAME
262 # error "STAT_NAME is obsolete (replaced by NAMES)."
263 #endif
264
265 #ifdef EFSYS_OPT_WOL
266 # error "WOL is obsolete and is not supported"
267 #endif /* EFSYS_OPT_WOL */
268
269 #ifdef EFSYS_OPT_MCAST_FILTER_LIST
270 #  error "MCAST_FILTER_LIST is obsolete and is not supported"
271 #endif
272
273 #if EFSYS_OPT_BIST
274 /* Support BIST */
275 # if !(EFSYS_OPT_SIENA || EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD)
276 #  error "BIST requires SIENA or HUNTINGTON or MEDFORD"
277 # endif
278 #endif /* EFSYS_OPT_BIST */
279
280 #if EFSYS_OPT_ALLOW_UNCONFIGURED_NIC
281 /* Support adapters with missing static config (for factory use only) */
282 # if !EFSYS_OPT_MEDFORD
283 #  error "ALLOW_UNCONFIGURED_NIC requires MEDFORD"
284 # endif
285 #endif /* EFSYS_OPT_ALLOW_UNCONFIGURED_NIC */
286
287 #endif /* _SYS_EFX_CHECK_H */