diff options
Diffstat (limited to 'drivers/net/ethernet/intel/i40e/i40e_common.c')
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_common.c | 370 |
1 files changed, 368 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c index e7f38b57834d..922cdcc45c54 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_common.c +++ b/drivers/net/ethernet/intel/i40e/i40e_common.c | |||
@@ -162,6 +162,372 @@ i40e_status i40e_aq_queue_shutdown(struct i40e_hw *hw, | |||
162 | return status; | 162 | return status; |
163 | } | 163 | } |
164 | 164 | ||
165 | /* The i40e_ptype_lookup table is used to convert from the 8-bit ptype in the | ||
166 | * hardware to a bit-field that can be used by SW to more easily determine the | ||
167 | * packet type. | ||
168 | * | ||
169 | * Macros are used to shorten the table lines and make this table human | ||
170 | * readable. | ||
171 | * | ||
172 | * We store the PTYPE in the top byte of the bit field - this is just so that | ||
173 | * we can check that the table doesn't have a row missing, as the index into | ||
174 | * the table should be the PTYPE. | ||
175 | * | ||
176 | * Typical work flow: | ||
177 | * | ||
178 | * IF NOT i40e_ptype_lookup[ptype].known | ||
179 | * THEN | ||
180 | * Packet is unknown | ||
181 | * ELSE IF i40e_ptype_lookup[ptype].outer_ip == I40E_RX_PTYPE_OUTER_IP | ||
182 | * Use the rest of the fields to look at the tunnels, inner protocols, etc | ||
183 | * ELSE | ||
184 | * Use the enum i40e_rx_l2_ptype to decode the packet type | ||
185 | * ENDIF | ||
186 | */ | ||
187 | |||
188 | /* macro to make the table lines short */ | ||
189 | #define I40E_PTT(PTYPE, OUTER_IP, OUTER_IP_VER, OUTER_FRAG, T, TE, TEF, I, PL)\ | ||
190 | { PTYPE, \ | ||
191 | 1, \ | ||
192 | I40E_RX_PTYPE_OUTER_##OUTER_IP, \ | ||
193 | I40E_RX_PTYPE_OUTER_##OUTER_IP_VER, \ | ||
194 | I40E_RX_PTYPE_##OUTER_FRAG, \ | ||
195 | I40E_RX_PTYPE_TUNNEL_##T, \ | ||
196 | I40E_RX_PTYPE_TUNNEL_END_##TE, \ | ||
197 | I40E_RX_PTYPE_##TEF, \ | ||
198 | I40E_RX_PTYPE_INNER_PROT_##I, \ | ||
199 | I40E_RX_PTYPE_PAYLOAD_LAYER_##PL } | ||
200 | |||
201 | #define I40E_PTT_UNUSED_ENTRY(PTYPE) \ | ||
202 | { PTYPE, 0, 0, 0, 0, 0, 0, 0, 0, 0 } | ||
203 | |||
204 | /* shorter macros makes the table fit but are terse */ | ||
205 | #define I40E_RX_PTYPE_NOF I40E_RX_PTYPE_NOT_FRAG | ||
206 | #define I40E_RX_PTYPE_FRG I40E_RX_PTYPE_FRAG | ||
207 | #define I40E_RX_PTYPE_INNER_PROT_TS I40E_RX_PTYPE_INNER_PROT_TIMESYNC | ||
208 | |||
209 | /* Lookup table mapping the HW PTYPE to the bit field for decoding */ | ||
210 | struct i40e_rx_ptype_decoded i40e_ptype_lookup[] = { | ||
211 | /* L2 Packet types */ | ||
212 | I40E_PTT_UNUSED_ENTRY(0), | ||
213 | I40E_PTT(1, L2, NONE, NOF, NONE, NONE, NOF, NONE, PAY2), | ||
214 | I40E_PTT(2, L2, NONE, NOF, NONE, NONE, NOF, TS, PAY2), | ||
215 | I40E_PTT(3, L2, NONE, NOF, NONE, NONE, NOF, NONE, PAY2), | ||
216 | I40E_PTT_UNUSED_ENTRY(4), | ||
217 | I40E_PTT_UNUSED_ENTRY(5), | ||
218 | I40E_PTT(6, L2, NONE, NOF, NONE, NONE, NOF, NONE, PAY2), | ||
219 | I40E_PTT(7, L2, NONE, NOF, NONE, NONE, NOF, NONE, PAY2), | ||
220 | I40E_PTT_UNUSED_ENTRY(8), | ||
221 | I40E_PTT_UNUSED_ENTRY(9), | ||
222 | I40E_PTT(10, L2, NONE, NOF, NONE, NONE, NOF, NONE, PAY2), | ||
223 | I40E_PTT(11, L2, NONE, NOF, NONE, NONE, NOF, NONE, NONE), | ||
224 | I40E_PTT(12, L2, NONE, NOF, NONE, NONE, NOF, NONE, PAY3), | ||
225 | I40E_PTT(13, L2, NONE, NOF, NONE, NONE, NOF, NONE, PAY3), | ||
226 | I40E_PTT(14, L2, NONE, NOF, NONE, NONE, NOF, NONE, PAY3), | ||
227 | I40E_PTT(15, L2, NONE, NOF, NONE, NONE, NOF, NONE, PAY3), | ||
228 | I40E_PTT(16, L2, NONE, NOF, NONE, NONE, NOF, NONE, PAY3), | ||
229 | I40E_PTT(17, L2, NONE, NOF, NONE, NONE, NOF, NONE, PAY3), | ||
230 | I40E_PTT(18, L2, NONE, NOF, NONE, NONE, NOF, NONE, PAY3), | ||
231 | I40E_PTT(19, L2, NONE, NOF, NONE, NONE, NOF, NONE, PAY3), | ||
232 | I40E_PTT(20, L2, NONE, NOF, NONE, NONE, NOF, NONE, PAY3), | ||
233 | I40E_PTT(21, L2, NONE, NOF, NONE, NONE, NOF, NONE, PAY3), | ||
234 | |||
235 | /* Non Tunneled IPv4 */ | ||
236 | I40E_PTT(22, IP, IPV4, FRG, NONE, NONE, NOF, NONE, PAY3), | ||
237 | I40E_PTT(23, IP, IPV4, NOF, NONE, NONE, NOF, NONE, PAY3), | ||
238 | I40E_PTT(24, IP, IPV4, NOF, NONE, NONE, NOF, UDP, PAY4), | ||
239 | I40E_PTT_UNUSED_ENTRY(25), | ||
240 | I40E_PTT(26, IP, IPV4, NOF, NONE, NONE, NOF, TCP, PAY4), | ||
241 | I40E_PTT(27, IP, IPV4, NOF, NONE, NONE, NOF, SCTP, PAY4), | ||
242 | I40E_PTT(28, IP, IPV4, NOF, NONE, NONE, NOF, ICMP, PAY4), | ||
243 | |||
244 | /* IPv4 --> IPv4 */ | ||
245 | I40E_PTT(29, IP, IPV4, NOF, IP_IP, IPV4, FRG, NONE, PAY3), | ||
246 | I40E_PTT(30, IP, IPV4, NOF, IP_IP, IPV4, NOF, NONE, PAY3), | ||
247 | I40E_PTT(31, IP, IPV4, NOF, IP_IP, IPV4, NOF, UDP, PAY4), | ||
248 | I40E_PTT_UNUSED_ENTRY(32), | ||
249 | I40E_PTT(33, IP, IPV4, NOF, IP_IP, IPV4, NOF, TCP, PAY4), | ||
250 | I40E_PTT(34, IP, IPV4, NOF, IP_IP, IPV4, NOF, SCTP, PAY4), | ||
251 | I40E_PTT(35, IP, IPV4, NOF, IP_IP, IPV4, NOF, ICMP, PAY4), | ||
252 | |||
253 | /* IPv4 --> IPv6 */ | ||
254 | I40E_PTT(36, IP, IPV4, NOF, IP_IP, IPV6, FRG, NONE, PAY3), | ||
255 | I40E_PTT(37, IP, IPV4, NOF, IP_IP, IPV6, NOF, NONE, PAY3), | ||
256 | I40E_PTT(38, IP, IPV4, NOF, IP_IP, IPV6, NOF, UDP, PAY4), | ||
257 | I40E_PTT_UNUSED_ENTRY(39), | ||
258 | I40E_PTT(40, IP, IPV4, NOF, IP_IP, IPV6, NOF, TCP, PAY4), | ||
259 | I40E_PTT(41, IP, IPV4, NOF, IP_IP, IPV6, NOF, SCTP, PAY4), | ||
260 | I40E_PTT(42, IP, IPV4, NOF, IP_IP, IPV6, NOF, ICMP, PAY4), | ||
261 | |||
262 | /* IPv4 --> GRE/NAT */ | ||
263 | I40E_PTT(43, IP, IPV4, NOF, IP_GRENAT, NONE, NOF, NONE, PAY3), | ||
264 | |||
265 | /* IPv4 --> GRE/NAT --> IPv4 */ | ||
266 | I40E_PTT(44, IP, IPV4, NOF, IP_GRENAT, IPV4, FRG, NONE, PAY3), | ||
267 | I40E_PTT(45, IP, IPV4, NOF, IP_GRENAT, IPV4, NOF, NONE, PAY3), | ||
268 | I40E_PTT(46, IP, IPV4, NOF, IP_GRENAT, IPV4, NOF, UDP, PAY4), | ||
269 | I40E_PTT_UNUSED_ENTRY(47), | ||
270 | I40E_PTT(48, IP, IPV4, NOF, IP_GRENAT, IPV4, NOF, TCP, PAY4), | ||
271 | I40E_PTT(49, IP, IPV4, NOF, IP_GRENAT, IPV4, NOF, SCTP, PAY4), | ||
272 | I40E_PTT(50, IP, IPV4, NOF, IP_GRENAT, IPV4, NOF, ICMP, PAY4), | ||
273 | |||
274 | /* IPv4 --> GRE/NAT --> IPv6 */ | ||
275 | I40E_PTT(51, IP, IPV4, NOF, IP_GRENAT, IPV6, FRG, NONE, PAY3), | ||
276 | I40E_PTT(52, IP, IPV4, NOF, IP_GRENAT, IPV6, NOF, NONE, PAY3), | ||
277 | I40E_PTT(53, IP, IPV4, NOF, IP_GRENAT, IPV6, NOF, UDP, PAY4), | ||
278 | I40E_PTT_UNUSED_ENTRY(54), | ||
279 | I40E_PTT(55, IP, IPV4, NOF, IP_GRENAT, IPV6, NOF, TCP, PAY4), | ||
280 | I40E_PTT(56, IP, IPV4, NOF, IP_GRENAT, IPV6, NOF, SCTP, PAY4), | ||
281 | I40E_PTT(57, IP, IPV4, NOF, IP_GRENAT, IPV6, NOF, ICMP, PAY4), | ||
282 | |||
283 | /* IPv4 --> GRE/NAT --> MAC */ | ||
284 | I40E_PTT(58, IP, IPV4, NOF, IP_GRENAT_MAC, NONE, NOF, NONE, PAY3), | ||
285 | |||
286 | /* IPv4 --> GRE/NAT --> MAC --> IPv4 */ | ||
287 | I40E_PTT(59, IP, IPV4, NOF, IP_GRENAT_MAC, IPV4, FRG, NONE, PAY3), | ||
288 | I40E_PTT(60, IP, IPV4, NOF, IP_GRENAT_MAC, IPV4, NOF, NONE, PAY3), | ||
289 | I40E_PTT(61, IP, IPV4, NOF, IP_GRENAT_MAC, IPV4, NOF, UDP, PAY4), | ||
290 | I40E_PTT_UNUSED_ENTRY(62), | ||
291 | I40E_PTT(63, IP, IPV4, NOF, IP_GRENAT_MAC, IPV4, NOF, TCP, PAY4), | ||
292 | I40E_PTT(64, IP, IPV4, NOF, IP_GRENAT_MAC, IPV4, NOF, SCTP, PAY4), | ||
293 | I40E_PTT(65, IP, IPV4, NOF, IP_GRENAT_MAC, IPV4, NOF, ICMP, PAY4), | ||
294 | |||
295 | /* IPv4 --> GRE/NAT -> MAC --> IPv6 */ | ||
296 | I40E_PTT(66, IP, IPV4, NOF, IP_GRENAT_MAC, IPV6, FRG, NONE, PAY3), | ||
297 | I40E_PTT(67, IP, IPV4, NOF, IP_GRENAT_MAC, IPV6, NOF, NONE, PAY3), | ||
298 | I40E_PTT(68, IP, IPV4, NOF, IP_GRENAT_MAC, IPV6, NOF, UDP, PAY4), | ||
299 | I40E_PTT_UNUSED_ENTRY(69), | ||
300 | I40E_PTT(70, IP, IPV4, NOF, IP_GRENAT_MAC, IPV6, NOF, TCP, PAY4), | ||
301 | I40E_PTT(71, IP, IPV4, NOF, IP_GRENAT_MAC, IPV6, NOF, SCTP, PAY4), | ||
302 | I40E_PTT(72, IP, IPV4, NOF, IP_GRENAT_MAC, IPV6, NOF, ICMP, PAY4), | ||
303 | |||
304 | /* IPv4 --> GRE/NAT --> MAC/VLAN */ | ||
305 | I40E_PTT(73, IP, IPV4, NOF, IP_GRENAT_MAC_VLAN, NONE, NOF, NONE, PAY3), | ||
306 | |||
307 | /* IPv4 ---> GRE/NAT -> MAC/VLAN --> IPv4 */ | ||
308 | I40E_PTT(74, IP, IPV4, NOF, IP_GRENAT_MAC_VLAN, IPV4, FRG, NONE, PAY3), | ||
309 | I40E_PTT(75, IP, IPV4, NOF, IP_GRENAT_MAC_VLAN, IPV4, NOF, NONE, PAY3), | ||
310 | I40E_PTT(76, IP, IPV4, NOF, IP_GRENAT_MAC_VLAN, IPV4, NOF, UDP, PAY4), | ||
311 | I40E_PTT_UNUSED_ENTRY(77), | ||
312 | I40E_PTT(78, IP, IPV4, NOF, IP_GRENAT_MAC_VLAN, IPV4, NOF, TCP, PAY4), | ||
313 | I40E_PTT(79, IP, IPV4, NOF, IP_GRENAT_MAC_VLAN, IPV4, NOF, SCTP, PAY4), | ||
314 | I40E_PTT(80, IP, IPV4, NOF, IP_GRENAT_MAC_VLAN, IPV4, NOF, ICMP, PAY4), | ||
315 | |||
316 | /* IPv4 -> GRE/NAT -> MAC/VLAN --> IPv6 */ | ||
317 | I40E_PTT(81, IP, IPV4, NOF, IP_GRENAT_MAC_VLAN, IPV6, FRG, NONE, PAY3), | ||
318 | I40E_PTT(82, IP, IPV4, NOF, IP_GRENAT_MAC_VLAN, IPV6, NOF, NONE, PAY3), | ||
319 | I40E_PTT(83, IP, IPV4, NOF, IP_GRENAT_MAC_VLAN, IPV6, NOF, UDP, PAY4), | ||
320 | I40E_PTT_UNUSED_ENTRY(84), | ||
321 | I40E_PTT(85, IP, IPV4, NOF, IP_GRENAT_MAC_VLAN, IPV6, NOF, TCP, PAY4), | ||
322 | I40E_PTT(86, IP, IPV4, NOF, IP_GRENAT_MAC_VLAN, IPV6, NOF, SCTP, PAY4), | ||
323 | I40E_PTT(87, IP, IPV4, NOF, IP_GRENAT_MAC_VLAN, IPV6, NOF, ICMP, PAY4), | ||
324 | |||
325 | /* Non Tunneled IPv6 */ | ||
326 | I40E_PTT(88, IP, IPV6, FRG, NONE, NONE, NOF, NONE, PAY3), | ||
327 | I40E_PTT(89, IP, IPV6, NOF, NONE, NONE, NOF, NONE, PAY3), | ||
328 | I40E_PTT(90, IP, IPV6, NOF, NONE, NONE, NOF, UDP, PAY3), | ||
329 | I40E_PTT_UNUSED_ENTRY(91), | ||
330 | I40E_PTT(92, IP, IPV6, NOF, NONE, NONE, NOF, TCP, PAY4), | ||
331 | I40E_PTT(93, IP, IPV6, NOF, NONE, NONE, NOF, SCTP, PAY4), | ||
332 | I40E_PTT(94, IP, IPV6, NOF, NONE, NONE, NOF, ICMP, PAY4), | ||
333 | |||
334 | /* IPv6 --> IPv4 */ | ||
335 | I40E_PTT(95, IP, IPV6, NOF, IP_IP, IPV4, FRG, NONE, PAY3), | ||
336 | I40E_PTT(96, IP, IPV6, NOF, IP_IP, IPV4, NOF, NONE, PAY3), | ||
337 | I40E_PTT(97, IP, IPV6, NOF, IP_IP, IPV4, NOF, UDP, PAY4), | ||
338 | I40E_PTT_UNUSED_ENTRY(98), | ||
339 | I40E_PTT(99, IP, IPV6, NOF, IP_IP, IPV4, NOF, TCP, PAY4), | ||
340 | I40E_PTT(100, IP, IPV6, NOF, IP_IP, IPV4, NOF, SCTP, PAY4), | ||
341 | I40E_PTT(101, IP, IPV6, NOF, IP_IP, IPV4, NOF, ICMP, PAY4), | ||
342 | |||
343 | /* IPv6 --> IPv6 */ | ||
344 | I40E_PTT(102, IP, IPV6, NOF, IP_IP, IPV6, FRG, NONE, PAY3), | ||
345 | I40E_PTT(103, IP, IPV6, NOF, IP_IP, IPV6, NOF, NONE, PAY3), | ||
346 | I40E_PTT(104, IP, IPV6, NOF, IP_IP, IPV6, NOF, UDP, PAY4), | ||
347 | I40E_PTT_UNUSED_ENTRY(105), | ||
348 | I40E_PTT(106, IP, IPV6, NOF, IP_IP, IPV6, NOF, TCP, PAY4), | ||
349 | I40E_PTT(107, IP, IPV6, NOF, IP_IP, IPV6, NOF, SCTP, PAY4), | ||
350 | I40E_PTT(108, IP, IPV6, NOF, IP_IP, IPV6, NOF, ICMP, PAY4), | ||
351 | |||
352 | /* IPv6 --> GRE/NAT */ | ||
353 | I40E_PTT(109, IP, IPV6, NOF, IP_GRENAT, NONE, NOF, NONE, PAY3), | ||
354 | |||
355 | /* IPv6 --> GRE/NAT -> IPv4 */ | ||
356 | I40E_PTT(110, IP, IPV6, NOF, IP_GRENAT, IPV4, FRG, NONE, PAY3), | ||
357 | I40E_PTT(111, IP, IPV6, NOF, IP_GRENAT, IPV4, NOF, NONE, PAY3), | ||
358 | I40E_PTT(112, IP, IPV6, NOF, IP_GRENAT, IPV4, NOF, UDP, PAY4), | ||
359 | I40E_PTT_UNUSED_ENTRY(113), | ||
360 | I40E_PTT(114, IP, IPV6, NOF, IP_GRENAT, IPV4, NOF, TCP, PAY4), | ||
361 | I40E_PTT(115, IP, IPV6, NOF, IP_GRENAT, IPV4, NOF, SCTP, PAY4), | ||
362 | I40E_PTT(116, IP, IPV6, NOF, IP_GRENAT, IPV4, NOF, ICMP, PAY4), | ||
363 | |||
364 | /* IPv6 --> GRE/NAT -> IPv6 */ | ||
365 | I40E_PTT(117, IP, IPV6, NOF, IP_GRENAT, IPV6, FRG, NONE, PAY3), | ||
366 | I40E_PTT(118, IP, IPV6, NOF, IP_GRENAT, IPV6, NOF, NONE, PAY3), | ||
367 | I40E_PTT(119, IP, IPV6, NOF, IP_GRENAT, IPV6, NOF, UDP, PAY4), | ||
368 | I40E_PTT_UNUSED_ENTRY(120), | ||
369 | I40E_PTT(121, IP, IPV6, NOF, IP_GRENAT, IPV6, NOF, TCP, PAY4), | ||
370 | I40E_PTT(122, IP, IPV6, NOF, IP_GRENAT, IPV6, NOF, SCTP, PAY4), | ||
371 | I40E_PTT(123, IP, IPV6, NOF, IP_GRENAT, IPV6, NOF, ICMP, PAY4), | ||
372 | |||
373 | /* IPv6 --> GRE/NAT -> MAC */ | ||
374 | I40E_PTT(124, IP, IPV6, NOF, IP_GRENAT_MAC, NONE, NOF, NONE, PAY3), | ||
375 | |||
376 | /* IPv6 --> GRE/NAT -> MAC -> IPv4 */ | ||
377 | I40E_PTT(125, IP, IPV6, NOF, IP_GRENAT_MAC, IPV4, FRG, NONE, PAY3), | ||
378 | I40E_PTT(126, IP, IPV6, NOF, IP_GRENAT_MAC, IPV4, NOF, NONE, PAY3), | ||
379 | I40E_PTT(127, IP, IPV6, NOF, IP_GRENAT_MAC, IPV4, NOF, UDP, PAY4), | ||
380 | I40E_PTT_UNUSED_ENTRY(128), | ||
381 | I40E_PTT(129, IP, IPV6, NOF, IP_GRENAT_MAC, IPV4, NOF, TCP, PAY4), | ||
382 | I40E_PTT(130, IP, IPV6, NOF, IP_GRENAT_MAC, IPV4, NOF, SCTP, PAY4), | ||
383 | I40E_PTT(131, IP, IPV6, NOF, IP_GRENAT_MAC, IPV4, NOF, ICMP, PAY4), | ||
384 | |||
385 | /* IPv6 --> GRE/NAT -> MAC -> IPv6 */ | ||
386 | I40E_PTT(132, IP, IPV6, NOF, IP_GRENAT_MAC, IPV6, FRG, NONE, PAY3), | ||
387 | I40E_PTT(133, IP, IPV6, NOF, IP_GRENAT_MAC, IPV6, NOF, NONE, PAY3), | ||
388 | I40E_PTT(134, IP, IPV6, NOF, IP_GRENAT_MAC, IPV6, NOF, UDP, PAY4), | ||
389 | I40E_PTT_UNUSED_ENTRY(135), | ||
390 | I40E_PTT(136, IP, IPV6, NOF, IP_GRENAT_MAC, IPV6, NOF, TCP, PAY4), | ||
391 | I40E_PTT(137, IP, IPV6, NOF, IP_GRENAT_MAC, IPV6, NOF, SCTP, PAY4), | ||
392 | I40E_PTT(138, IP, IPV6, NOF, IP_GRENAT_MAC, IPV6, NOF, ICMP, PAY4), | ||
393 | |||
394 | /* IPv6 --> GRE/NAT -> MAC/VLAN */ | ||
395 | I40E_PTT(139, IP, IPV6, NOF, IP_GRENAT_MAC_VLAN, NONE, NOF, NONE, PAY3), | ||
396 | |||
397 | /* IPv6 --> GRE/NAT -> MAC/VLAN --> IPv4 */ | ||
398 | I40E_PTT(140, IP, IPV6, NOF, IP_GRENAT_MAC_VLAN, IPV4, FRG, NONE, PAY3), | ||
399 | I40E_PTT(141, IP, IPV6, NOF, IP_GRENAT_MAC_VLAN, IPV4, NOF, NONE, PAY3), | ||
400 | I40E_PTT(142, IP, IPV6, NOF, IP_GRENAT_MAC_VLAN, IPV4, NOF, UDP, PAY4), | ||
401 | I40E_PTT_UNUSED_ENTRY(143), | ||
402 | I40E_PTT(144, IP, IPV6, NOF, IP_GRENAT_MAC_VLAN, IPV4, NOF, TCP, PAY4), | ||
403 | I40E_PTT(145, IP, IPV6, NOF, IP_GRENAT_MAC_VLAN, IPV4, NOF, SCTP, PAY4), | ||
404 | I40E_PTT(146, IP, IPV6, NOF, IP_GRENAT_MAC_VLAN, IPV4, NOF, ICMP, PAY4), | ||
405 | |||
406 | /* IPv6 --> GRE/NAT -> MAC/VLAN --> IPv6 */ | ||
407 | I40E_PTT(147, IP, IPV6, NOF, IP_GRENAT_MAC_VLAN, IPV6, FRG, NONE, PAY3), | ||
408 | I40E_PTT(148, IP, IPV6, NOF, IP_GRENAT_MAC_VLAN, IPV6, NOF, NONE, PAY3), | ||
409 | I40E_PTT(149, IP, IPV6, NOF, IP_GRENAT_MAC_VLAN, IPV6, NOF, UDP, PAY4), | ||
410 | I40E_PTT_UNUSED_ENTRY(150), | ||
411 | I40E_PTT(151, IP, IPV6, NOF, IP_GRENAT_MAC_VLAN, IPV6, NOF, TCP, PAY4), | ||
412 | I40E_PTT(152, IP, IPV6, NOF, IP_GRENAT_MAC_VLAN, IPV6, NOF, SCTP, PAY4), | ||
413 | I40E_PTT(153, IP, IPV6, NOF, IP_GRENAT_MAC_VLAN, IPV6, NOF, ICMP, PAY4), | ||
414 | |||
415 | /* unused entries */ | ||
416 | I40E_PTT_UNUSED_ENTRY(154), | ||
417 | I40E_PTT_UNUSED_ENTRY(155), | ||
418 | I40E_PTT_UNUSED_ENTRY(156), | ||
419 | I40E_PTT_UNUSED_ENTRY(157), | ||
420 | I40E_PTT_UNUSED_ENTRY(158), | ||
421 | I40E_PTT_UNUSED_ENTRY(159), | ||
422 | |||
423 | I40E_PTT_UNUSED_ENTRY(160), | ||
424 | I40E_PTT_UNUSED_ENTRY(161), | ||
425 | I40E_PTT_UNUSED_ENTRY(162), | ||
426 | I40E_PTT_UNUSED_ENTRY(163), | ||
427 | I40E_PTT_UNUSED_ENTRY(164), | ||
428 | I40E_PTT_UNUSED_ENTRY(165), | ||
429 | I40E_PTT_UNUSED_ENTRY(166), | ||
430 | I40E_PTT_UNUSED_ENTRY(167), | ||
431 | I40E_PTT_UNUSED_ENTRY(168), | ||
432 | I40E_PTT_UNUSED_ENTRY(169), | ||
433 | |||
434 | I40E_PTT_UNUSED_ENTRY(170), | ||
435 | I40E_PTT_UNUSED_ENTRY(171), | ||
436 | I40E_PTT_UNUSED_ENTRY(172), | ||
437 | I40E_PTT_UNUSED_ENTRY(173), | ||
438 | I40E_PTT_UNUSED_ENTRY(174), | ||
439 | I40E_PTT_UNUSED_ENTRY(175), | ||
440 | I40E_PTT_UNUSED_ENTRY(176), | ||
441 | I40E_PTT_UNUSED_ENTRY(177), | ||
442 | I40E_PTT_UNUSED_ENTRY(178), | ||
443 | I40E_PTT_UNUSED_ENTRY(179), | ||
444 | |||
445 | I40E_PTT_UNUSED_ENTRY(180), | ||
446 | I40E_PTT_UNUSED_ENTRY(181), | ||
447 | I40E_PTT_UNUSED_ENTRY(182), | ||
448 | I40E_PTT_UNUSED_ENTRY(183), | ||
449 | I40E_PTT_UNUSED_ENTRY(184), | ||
450 | I40E_PTT_UNUSED_ENTRY(185), | ||
451 | I40E_PTT_UNUSED_ENTRY(186), | ||
452 | I40E_PTT_UNUSED_ENTRY(187), | ||
453 | I40E_PTT_UNUSED_ENTRY(188), | ||
454 | I40E_PTT_UNUSED_ENTRY(189), | ||
455 | |||
456 | I40E_PTT_UNUSED_ENTRY(190), | ||
457 | I40E_PTT_UNUSED_ENTRY(191), | ||
458 | I40E_PTT_UNUSED_ENTRY(192), | ||
459 | I40E_PTT_UNUSED_ENTRY(193), | ||
460 | I40E_PTT_UNUSED_ENTRY(194), | ||
461 | I40E_PTT_UNUSED_ENTRY(195), | ||
462 | I40E_PTT_UNUSED_ENTRY(196), | ||
463 | I40E_PTT_UNUSED_ENTRY(197), | ||
464 | I40E_PTT_UNUSED_ENTRY(198), | ||
465 | I40E_PTT_UNUSED_ENTRY(199), | ||
466 | |||
467 | I40E_PTT_UNUSED_ENTRY(200), | ||
468 | I40E_PTT_UNUSED_ENTRY(201), | ||
469 | I40E_PTT_UNUSED_ENTRY(202), | ||
470 | I40E_PTT_UNUSED_ENTRY(203), | ||
471 | I40E_PTT_UNUSED_ENTRY(204), | ||
472 | I40E_PTT_UNUSED_ENTRY(205), | ||
473 | I40E_PTT_UNUSED_ENTRY(206), | ||
474 | I40E_PTT_UNUSED_ENTRY(207), | ||
475 | I40E_PTT_UNUSED_ENTRY(208), | ||
476 | I40E_PTT_UNUSED_ENTRY(209), | ||
477 | |||
478 | I40E_PTT_UNUSED_ENTRY(210), | ||
479 | I40E_PTT_UNUSED_ENTRY(211), | ||
480 | I40E_PTT_UNUSED_ENTRY(212), | ||
481 | I40E_PTT_UNUSED_ENTRY(213), | ||
482 | I40E_PTT_UNUSED_ENTRY(214), | ||
483 | I40E_PTT_UNUSED_ENTRY(215), | ||
484 | I40E_PTT_UNUSED_ENTRY(216), | ||
485 | I40E_PTT_UNUSED_ENTRY(217), | ||
486 | I40E_PTT_UNUSED_ENTRY(218), | ||
487 | I40E_PTT_UNUSED_ENTRY(219), | ||
488 | |||
489 | I40E_PTT_UNUSED_ENTRY(220), | ||
490 | I40E_PTT_UNUSED_ENTRY(221), | ||
491 | I40E_PTT_UNUSED_ENTRY(222), | ||
492 | I40E_PTT_UNUSED_ENTRY(223), | ||
493 | I40E_PTT_UNUSED_ENTRY(224), | ||
494 | I40E_PTT_UNUSED_ENTRY(225), | ||
495 | I40E_PTT_UNUSED_ENTRY(226), | ||
496 | I40E_PTT_UNUSED_ENTRY(227), | ||
497 | I40E_PTT_UNUSED_ENTRY(228), | ||
498 | I40E_PTT_UNUSED_ENTRY(229), | ||
499 | |||
500 | I40E_PTT_UNUSED_ENTRY(230), | ||
501 | I40E_PTT_UNUSED_ENTRY(231), | ||
502 | I40E_PTT_UNUSED_ENTRY(232), | ||
503 | I40E_PTT_UNUSED_ENTRY(233), | ||
504 | I40E_PTT_UNUSED_ENTRY(234), | ||
505 | I40E_PTT_UNUSED_ENTRY(235), | ||
506 | I40E_PTT_UNUSED_ENTRY(236), | ||
507 | I40E_PTT_UNUSED_ENTRY(237), | ||
508 | I40E_PTT_UNUSED_ENTRY(238), | ||
509 | I40E_PTT_UNUSED_ENTRY(239), | ||
510 | |||
511 | I40E_PTT_UNUSED_ENTRY(240), | ||
512 | I40E_PTT_UNUSED_ENTRY(241), | ||
513 | I40E_PTT_UNUSED_ENTRY(242), | ||
514 | I40E_PTT_UNUSED_ENTRY(243), | ||
515 | I40E_PTT_UNUSED_ENTRY(244), | ||
516 | I40E_PTT_UNUSED_ENTRY(245), | ||
517 | I40E_PTT_UNUSED_ENTRY(246), | ||
518 | I40E_PTT_UNUSED_ENTRY(247), | ||
519 | I40E_PTT_UNUSED_ENTRY(248), | ||
520 | I40E_PTT_UNUSED_ENTRY(249), | ||
521 | |||
522 | I40E_PTT_UNUSED_ENTRY(250), | ||
523 | I40E_PTT_UNUSED_ENTRY(251), | ||
524 | I40E_PTT_UNUSED_ENTRY(252), | ||
525 | I40E_PTT_UNUSED_ENTRY(253), | ||
526 | I40E_PTT_UNUSED_ENTRY(254), | ||
527 | I40E_PTT_UNUSED_ENTRY(255) | ||
528 | }; | ||
529 | |||
530 | |||
165 | /** | 531 | /** |
166 | * i40e_init_shared_code - Initialize the shared code | 532 | * i40e_init_shared_code - Initialize the shared code |
167 | * @hw: pointer to hardware structure | 533 | * @hw: pointer to hardware structure |
@@ -1409,9 +1775,9 @@ static void i40e_parse_discover_capabilities(struct i40e_hw *hw, void *buff, | |||
1409 | cap = (struct i40e_aqc_list_capabilities_element_resp *) buff; | 1775 | cap = (struct i40e_aqc_list_capabilities_element_resp *) buff; |
1410 | 1776 | ||
1411 | if (list_type_opc == i40e_aqc_opc_list_dev_capabilities) | 1777 | if (list_type_opc == i40e_aqc_opc_list_dev_capabilities) |
1412 | p = (struct i40e_hw_capabilities *)&hw->dev_caps; | 1778 | p = &hw->dev_caps; |
1413 | else if (list_type_opc == i40e_aqc_opc_list_func_capabilities) | 1779 | else if (list_type_opc == i40e_aqc_opc_list_func_capabilities) |
1414 | p = (struct i40e_hw_capabilities *)&hw->func_caps; | 1780 | p = &hw->func_caps; |
1415 | else | 1781 | else |
1416 | return; | 1782 | return; |
1417 | 1783 | ||