File builders/linux-amd/all.patch changed (mode: 100644) (index 95f939d..6b2df28) |
... |
... |
index 8a94388e38b3..5ceaf13d164a 100644 |
281 |
281 |
+ -maccumulate-outgoing-args \ |
+ -maccumulate-outgoing-args \ |
282 |
282 |
$(call cc-option,-fno-addrsig) \ |
$(call cc-option,-fno-addrsig) \ |
283 |
283 |
-D__DISABLE_EXPORTS |
-D__DISABLE_EXPORTS |
284 |
|
|
|
|
284 |
|
|
285 |
285 |
diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c |
diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c |
286 |
286 |
index 0d78408b4e26..3901c8ba3d1b 100644 |
index 0d78408b4e26..3901c8ba3d1b 100644 |
287 |
287 |
--- a/drivers/net/ethernet/realtek/r8169_main.c |
--- a/drivers/net/ethernet/realtek/r8169_main.c |
|
... |
... |
index 0d78408b4e26..3901c8ba3d1b 100644 |
291 |
291 |
|
|
292 |
292 |
if (opts2 & RxVlanTag) |
if (opts2 & RxVlanTag) |
293 |
293 |
- __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), swab16(opts2 & 0xffff)); |
- __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), swab16(opts2 & 0xffff)); |
294 |
|
+ __vlan_hwaccel_put_tag(skb, __constant_htons(ETH_P_8021Q), |
|
|
294 |
|
+ __vlan_hwaccel_put_tag(skb, HTONS(ETH_P_8021Q), |
295 |
295 |
+ swab16(opts2 & 0xffff)); |
+ swab16(opts2 & 0xffff)); |
296 |
296 |
} |
} |
297 |
297 |
|
|
|
... |
... |
index 0d78408b4e26..3901c8ba3d1b 100644 |
301 |
301 |
|
|
302 |
302 |
switch (vlan_get_protocol(skb)) { |
switch (vlan_get_protocol(skb)) { |
303 |
303 |
- case htons(ETH_P_IP): |
- case htons(ETH_P_IP): |
304 |
|
+ case __constant_htons(ETH_P_IP): |
|
|
304 |
|
+ case HTONS(ETH_P_IP): |
305 |
305 |
ih = skb_header_pointer(skb, no, sizeof(_ih), &_ih); |
ih = skb_header_pointer(skb, no, sizeof(_ih), &_ih); |
306 |
306 |
return ih && ih->protocol == IPPROTO_UDP; |
return ih && ih->protocol == IPPROTO_UDP; |
307 |
307 |
- case htons(ETH_P_IPV6): |
- case htons(ETH_P_IPV6): |
308 |
|
+ case __constant_htons(ETH_P_IPV6): |
|
|
308 |
|
+ case HTONS(ETH_P_IPV6): |
309 |
309 |
i6h = skb_header_pointer(skb, no, sizeof(_i6h), &_i6h); |
i6h = skb_header_pointer(skb, no, sizeof(_i6h), &_i6h); |
310 |
310 |
return i6h && i6h->nexthdr == IPPROTO_UDP; |
return i6h && i6h->nexthdr == IPPROTO_UDP; |
311 |
311 |
default: |
default: |
|
... |
... |
index 0d78408b4e26..3901c8ba3d1b 100644 |
314 |
314 |
|
|
315 |
315 |
switch (vlan_get_protocol(skb)) { |
switch (vlan_get_protocol(skb)) { |
316 |
316 |
- case htons(ETH_P_IP): |
- case htons(ETH_P_IP): |
317 |
|
+ case __constant_htons(ETH_P_IP): |
|
|
317 |
|
+ case HTONS(ETH_P_IP): |
318 |
318 |
opts[1] |= TD1_IPv4_CS; |
opts[1] |= TD1_IPv4_CS; |
319 |
319 |
ip_protocol = ip_hdr(skb)->protocol; |
ip_protocol = ip_hdr(skb)->protocol; |
320 |
320 |
break; |
break; |
321 |
321 |
|
|
322 |
322 |
- case htons(ETH_P_IPV6): |
- case htons(ETH_P_IPV6): |
323 |
|
+ case __constant_htons(ETH_P_IPV6): |
|
|
323 |
|
+ case HTONS(ETH_P_IPV6): |
324 |
324 |
opts[1] |= TD1_IPv6_CS; |
opts[1] |= TD1_IPv6_CS; |
325 |
325 |
ip_protocol = ipv6_hdr(skb)->nexthdr; |
ip_protocol = ipv6_hdr(skb)->nexthdr; |
326 |
326 |
break; |
break; |
|
... |
... |
index 0d78408b4e26..3901c8ba3d1b 100644 |
329 |
329 |
{ |
{ |
330 |
330 |
/* IPv4 header has options field */ |
/* IPv4 header has options field */ |
331 |
331 |
- if (vlan_get_protocol(skb) == htons(ETH_P_IP) && |
- if (vlan_get_protocol(skb) == htons(ETH_P_IP) && |
332 |
|
+ if (vlan_get_protocol(skb) == __constant_htons(ETH_P_IP) && |
|
|
332 |
|
+ if (vlan_get_protocol(skb) == HTONS(ETH_P_IP) && |
333 |
333 |
ip_hdrlen(skb) > sizeof(struct iphdr)) |
ip_hdrlen(skb) > sizeof(struct iphdr)) |
334 |
334 |
features &= ~NETIF_F_ALL_TSO; |
features &= ~NETIF_F_ALL_TSO; |
335 |
|
|
|
|
335 |
|
|
336 |
336 |
diff --git a/include/linux/bits.h b/include/linux/bits.h |
diff --git a/include/linux/bits.h b/include/linux/bits.h |
337 |
337 |
index 7f475d59a097..34a66351a68a 100644 |
index 7f475d59a097..34a66351a68a 100644 |
338 |
338 |
--- a/include/linux/bits.h |
--- a/include/linux/bits.h |
|
... |
... |
index 7f475d59a097..34a66351a68a 100644 |
350 |
350 |
#define GENMASK_INPUT_CHECK(h, l) \ |
#define GENMASK_INPUT_CHECK(h, l) \ |
351 |
351 |
(BUILD_BUG_ON_ZERO(__builtin_choose_expr( \ |
(BUILD_BUG_ON_ZERO(__builtin_choose_expr( \ |
352 |
352 |
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h |
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h |
353 |
|
index 555ab0fddbef..b9dc69b39127 100644 |
|
|
353 |
|
index 5d97ef738a57..946818c94c4e 100644 |
354 |
354 |
--- a/include/linux/compiler-gcc.h |
--- a/include/linux/compiler-gcc.h |
355 |
355 |
+++ b/include/linux/compiler-gcc.h |
+++ b/include/linux/compiler-gcc.h |
356 |
|
@@ -11,14 +11,37 @@ |
|
|
356 |
|
@@ -10,6 +10,17 @@ |
|
357 |
|
+ __GNUC_MINOR__ * 100 \ |
357 |
358 |
+ __GNUC_PATCHLEVEL__) |
+ __GNUC_PATCHLEVEL__) |
358 |
359 |
|
|
359 |
|
/* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58145 */ |
|
360 |
|
-#if GCC_VERSION < 40900 |
|
361 |
|
-# error Sorry, your version of GCC is too old - please use 4.9 or newer. |
|
362 |
|
-#elif defined(CONFIG_ARM64) && GCC_VERSION < 50100 |
|
363 |
|
+#if GCC_VERSION < 40800 |
|
364 |
|
+#define GCC_C |
|
365 |
|
+/* comment out/patch out to acknowledge the following warning message */ |
|
366 |
|
+//# warning you need to patch gcc: |
|
367 |
|
+//# warning "gcc 4.7.x would need:" |
|
368 |
|
+//# warning "https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58145" |
|
369 |
|
+//# warning "https://gcc.gnu.org/legacy-ml/gcc-patches/2012-04/msg00452.html" |
|
370 |
|
+#elif GCC_VERSION < 40900 |
|
371 |
|
+# error Sorry, your version of GCC is too old - please use 4.9 or newer or patch your GCC |
|
372 |
|
+#else |
|
373 |
|
+#define GCC_CXX |
|
374 |
|
+#endif |
|
375 |
|
+ |
|
376 |
|
+#if defined(CONFIG_ARM64) && GCC_VERSION < 50100 |
|
377 |
|
/* |
|
378 |
|
* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63293 |
|
379 |
|
* https://lore.kernel.org/r/20210107111841.GN1551@shell.armlinux.org.uk |
|
380 |
|
*/ |
|
381 |
|
-# error Sorry, your version of GCC is too old - please use 5.1 or newer. |
|
382 |
|
+# error Sorry, your version of GCC is too old - please use 5.1 or newer |
|
383 |
|
+#endif |
|
384 |
|
+ |
|
385 |
360 |
+/* help prevent planned obsolescence due to the use of recent c11 _Generic */ |
+/* help prevent planned obsolescence due to the use of recent c11 _Generic */ |
386 |
361 |
+#if GCC_VERSION >= 40900 |
+#if GCC_VERSION >= 40900 |
387 |
362 |
+#define __generic(expr, t, yes, no) \ |
+#define __generic(expr, t, yes, no) \ |
|
... |
... |
index 555ab0fddbef..b9dc69b39127 100644 |
392 |
367 |
+ __builtin_types_compatible_p(__typeof(expr), t), yes, no) |
+ __builtin_types_compatible_p(__typeof(expr), t), yes, no) |
393 |
368 |
+#else |
+#else |
394 |
369 |
+# error your gcc compiler cannot support the __generic macro |
+# error your gcc compiler cannot support the __generic macro |
395 |
|
#endif |
|
396 |
|
|
|
|
370 |
|
+#endif |
397 |
371 |
/* |
/* |
|
372 |
|
* This macro obfuscates arithmetic on a variable address so that gcc |
|
373 |
|
* shouldn't recognize the original var, and make assumptions about it. |
398 |
374 |
diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h |
diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h |
399 |
375 |
index e5dd5a4ae946..c115ed89ab82 100644 |
index e5dd5a4ae946..c115ed89ab82 100644 |
400 |
376 |
--- a/include/linux/compiler_types.h |
--- a/include/linux/compiler_types.h |
|
... |
... |
index 2e5debc0373c..59bee289ac09 100644 |
444 |
420 |
__be16 *a = (__be16 *)addr; |
__be16 *a = (__be16 *)addr; |
445 |
421 |
static const __be16 *b = (const __be16 *)eth_reserved_addr_base; |
static const __be16 *b = (const __be16 *)eth_reserved_addr_base; |
446 |
422 |
- static const __be16 m = cpu_to_be16(0xfff0); |
- static const __be16 m = cpu_to_be16(0xfff0); |
447 |
|
+ static const __be16 m = __constant_cpu_to_be16(0xfff0); |
|
|
423 |
|
+ static const __be16 m = CPU_TO_BE16(0xfff0); |
448 |
424 |
|
|
449 |
425 |
#if defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) |
#if defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) |
450 |
426 |
return (((*(const u32 *)addr) ^ (*(const u32 *)b)) | |
return (((*(const u32 *)addr) ^ (*(const u32 *)b)) | |
|
... |
... |
index 2e5debc0373c..59bee289ac09 100644 |
454 |
430 |
/* cast both to u16 and compare since LSB can be ignored */ |
/* cast both to u16 and compare since LSB can be ignored */ |
455 |
431 |
- return (__force u16)proto >= (__force u16)htons(ETH_P_802_3_MIN); |
- return (__force u16)proto >= (__force u16)htons(ETH_P_802_3_MIN); |
456 |
432 |
+ return (__force u16)proto |
+ return (__force u16)proto |
457 |
|
+ >= (__force u16)__constant_htons(ETH_P_802_3_MIN); |
|
|
433 |
|
+ >= (__force u16)HTONS(ETH_P_802_3_MIN); |
458 |
434 |
} |
} |
459 |
435 |
|
|
460 |
436 |
/** |
/** |
|
... |
... |
index 41a518336673..0bb1320ca828 100644 |
468 |
444 |
switch (ethertype) { |
switch (ethertype) { |
469 |
445 |
- case htons(ETH_P_8021Q): |
- case htons(ETH_P_8021Q): |
470 |
446 |
- case htons(ETH_P_8021AD): |
- case htons(ETH_P_8021AD): |
471 |
|
+ case __constant_htons(ETH_P_8021Q): |
|
472 |
|
+ case __constant_htons(ETH_P_8021AD): |
|
|
447 |
|
+ case HTONS(ETH_P_8021Q): |
|
448 |
|
+ case HTONS(ETH_P_8021AD): |
473 |
449 |
return true; |
return true; |
474 |
450 |
default: |
default: |
475 |
451 |
return false; |
return false; |
|
... |
... |
index 41a518336673..0bb1320ca828 100644 |
478 |
454 |
__be16 proto) |
__be16 proto) |
479 |
455 |
{ |
{ |
480 |
456 |
- if (proto == htons(ETH_P_8021Q) && features & NETIF_F_HW_VLAN_CTAG_TX) |
- if (proto == htons(ETH_P_8021Q) && features & NETIF_F_HW_VLAN_CTAG_TX) |
481 |
|
+ if (proto == __constant_htons(ETH_P_8021Q) |
|
|
457 |
|
+ if (proto == HTONS(ETH_P_8021Q) |
482 |
458 |
+ && features & NETIF_F_HW_VLAN_CTAG_TX) |
+ && features & NETIF_F_HW_VLAN_CTAG_TX) |
483 |
459 |
return true; |
return true; |
484 |
460 |
- if (proto == htons(ETH_P_8021AD) && features & NETIF_F_HW_VLAN_STAG_TX) |
- if (proto == htons(ETH_P_8021AD) && features & NETIF_F_HW_VLAN_STAG_TX) |
485 |
|
+ if (proto == __constant_htons(ETH_P_8021AD) |
|
|
461 |
|
+ if (proto == HTONS(ETH_P_8021AD) |
486 |
462 |
+ && features & NETIF_F_HW_VLAN_STAG_TX) |
+ && features & NETIF_F_HW_VLAN_STAG_TX) |
487 |
463 |
return true; |
return true; |
488 |
464 |
return false; |
return false; |
|
... |
... |
index 41a518336673..0bb1320ca828 100644 |
492 |
468 |
* but does for the rest. |
* but does for the rest. |
493 |
469 |
*/ |
*/ |
494 |
470 |
- skb->protocol = htons(ETH_P_802_3); |
- skb->protocol = htons(ETH_P_802_3); |
495 |
|
+ skb->protocol = __constant_htons(ETH_P_802_3); |
|
|
471 |
|
+ skb->protocol = HTONS(ETH_P_802_3); |
496 |
472 |
else |
else |
497 |
473 |
/* |
/* |
498 |
474 |
* Real 802.2 LLC |
* Real 802.2 LLC |
499 |
475 |
*/ |
*/ |
500 |
476 |
- skb->protocol = htons(ETH_P_802_2); |
- skb->protocol = htons(ETH_P_802_2); |
501 |
|
+ skb->protocol = __constant_htons(ETH_P_802_2); |
|
|
477 |
|
+ skb->protocol = HTONS(ETH_P_802_2); |
502 |
478 |
} |
} |
503 |
479 |
|
|
504 |
480 |
/** |
/** |
|
... |
... |
index 5ff27c12ce68..8f66b9b7ae65 100644 |
511 |
487 |
__be16 protocol) |
__be16 protocol) |
512 |
488 |
{ |
{ |
513 |
489 |
- if (protocol == htons(ETH_P_FCOE)) |
- if (protocol == htons(ETH_P_FCOE)) |
514 |
|
+ if (protocol == __constant_htons(ETH_P_FCOE)) |
|
|
490 |
|
+ if (protocol == HTONS(ETH_P_FCOE)) |
515 |
491 |
return !!(features & NETIF_F_FCOE_CRC); |
return !!(features & NETIF_F_FCOE_CRC); |
516 |
492 |
|
|
517 |
493 |
/* Assume this is an IP checksum (not SCTP CRC) */ |
/* Assume this is an IP checksum (not SCTP CRC) */ |
|
... |
... |
index 5ff27c12ce68..8f66b9b7ae65 100644 |
520 |
496 |
|
|
521 |
497 |
switch (protocol) { |
switch (protocol) { |
522 |
498 |
- case htons(ETH_P_IP): |
- case htons(ETH_P_IP): |
523 |
|
+ case __constant_htons(ETH_P_IP): |
|
|
499 |
|
+ case HTONS(ETH_P_IP): |
524 |
500 |
return !!(features & NETIF_F_IP_CSUM); |
return !!(features & NETIF_F_IP_CSUM); |
525 |
501 |
- case htons(ETH_P_IPV6): |
- case htons(ETH_P_IPV6): |
526 |
|
+ case __constant_htons(ETH_P_IPV6): |
|
|
502 |
|
+ case HTONS(ETH_P_IPV6): |
527 |
503 |
return !!(features & NETIF_F_IPV6_CSUM); |
return !!(features & NETIF_F_IPV6_CSUM); |
528 |
504 |
default: |
default: |
529 |
505 |
return false; |
return false; |
|
... |
... |
index bb1926589693..a448cd89a503 100644 |
536 |
512 |
|
|
537 |
513 |
/* RFC 2960 Section 3.3.5 */ |
/* RFC 2960 Section 3.3.5 */ |
538 |
514 |
- SCTP_PARAM_HEARTBEAT_INFO = cpu_to_be16(1), |
- SCTP_PARAM_HEARTBEAT_INFO = cpu_to_be16(1), |
539 |
|
+ SCTP_PARAM_HEARTBEAT_INFO = __constant_cpu_to_be16(1), |
|
|
515 |
|
+ SCTP_PARAM_HEARTBEAT_INFO = CPU_TO_BE16(1), |
540 |
516 |
/* RFC 2960 Section 3.3.2.1 */ |
/* RFC 2960 Section 3.3.2.1 */ |
541 |
517 |
- SCTP_PARAM_IPV4_ADDRESS = cpu_to_be16(5), |
- SCTP_PARAM_IPV4_ADDRESS = cpu_to_be16(5), |
542 |
518 |
- SCTP_PARAM_IPV6_ADDRESS = cpu_to_be16(6), |
- SCTP_PARAM_IPV6_ADDRESS = cpu_to_be16(6), |
|
... |
... |
index bb1926589693..a448cd89a503 100644 |
546 |
522 |
- SCTP_PARAM_HOST_NAME_ADDRESS = cpu_to_be16(11), |
- SCTP_PARAM_HOST_NAME_ADDRESS = cpu_to_be16(11), |
547 |
523 |
- SCTP_PARAM_SUPPORTED_ADDRESS_TYPES = cpu_to_be16(12), |
- SCTP_PARAM_SUPPORTED_ADDRESS_TYPES = cpu_to_be16(12), |
548 |
524 |
- SCTP_PARAM_ECN_CAPABLE = cpu_to_be16(0x8000), |
- SCTP_PARAM_ECN_CAPABLE = cpu_to_be16(0x8000), |
549 |
|
+ SCTP_PARAM_IPV4_ADDRESS = __constant_cpu_to_be16(5), |
|
550 |
|
+ SCTP_PARAM_IPV6_ADDRESS = __constant_cpu_to_be16(6), |
|
551 |
|
+ SCTP_PARAM_STATE_COOKIE = __constant_cpu_to_be16(7), |
|
552 |
|
+ SCTP_PARAM_UNRECOGNIZED_PARAMETERS = __constant_cpu_to_be16(8), |
|
553 |
|
+ SCTP_PARAM_COOKIE_PRESERVATIVE = __constant_cpu_to_be16(9), |
|
554 |
|
+ SCTP_PARAM_HOST_NAME_ADDRESS = __constant_cpu_to_be16(11), |
|
555 |
|
+ SCTP_PARAM_SUPPORTED_ADDRESS_TYPES = __constant_cpu_to_be16(12), |
|
556 |
|
+ SCTP_PARAM_ECN_CAPABLE = __constant_cpu_to_be16(0x8000), |
|
|
525 |
|
+ SCTP_PARAM_IPV4_ADDRESS = CPU_TO_BE16(5), |
|
526 |
|
+ SCTP_PARAM_IPV6_ADDRESS = CPU_TO_BE16(6), |
|
527 |
|
+ SCTP_PARAM_STATE_COOKIE = CPU_TO_BE16(7), |
|
528 |
|
+ SCTP_PARAM_UNRECOGNIZED_PARAMETERS = CPU_TO_BE16(8), |
|
529 |
|
+ SCTP_PARAM_COOKIE_PRESERVATIVE = CPU_TO_BE16(9), |
|
530 |
|
+ SCTP_PARAM_HOST_NAME_ADDRESS = CPU_TO_BE16(11), |
|
531 |
|
+ SCTP_PARAM_SUPPORTED_ADDRESS_TYPES = CPU_TO_BE16(12), |
|
532 |
|
+ SCTP_PARAM_ECN_CAPABLE = CPU_TO_BE16(0x8000), |
557 |
533 |
|
|
558 |
534 |
/* AUTH Extension Section 3 */ |
/* AUTH Extension Section 3 */ |
559 |
535 |
- SCTP_PARAM_RANDOM = cpu_to_be16(0x8002), |
- SCTP_PARAM_RANDOM = cpu_to_be16(0x8002), |
560 |
536 |
- SCTP_PARAM_CHUNKS = cpu_to_be16(0x8003), |
- SCTP_PARAM_CHUNKS = cpu_to_be16(0x8003), |
561 |
537 |
- SCTP_PARAM_HMAC_ALGO = cpu_to_be16(0x8004), |
- SCTP_PARAM_HMAC_ALGO = cpu_to_be16(0x8004), |
562 |
|
+ SCTP_PARAM_RANDOM = __constant_cpu_to_be16(0x8002), |
|
563 |
|
+ SCTP_PARAM_CHUNKS = __constant_cpu_to_be16(0x8003), |
|
564 |
|
+ SCTP_PARAM_HMAC_ALGO = __constant_cpu_to_be16(0x8004), |
|
|
538 |
|
+ SCTP_PARAM_RANDOM = CPU_TO_BE16(0x8002), |
|
539 |
|
+ SCTP_PARAM_CHUNKS = CPU_TO_BE16(0x8003), |
|
540 |
|
+ SCTP_PARAM_HMAC_ALGO = CPU_TO_BE16(0x8004), |
565 |
541 |
|
|
566 |
542 |
/* Add-IP: Supported Extensions, Section 4.2 */ |
/* Add-IP: Supported Extensions, Section 4.2 */ |
567 |
543 |
- SCTP_PARAM_SUPPORTED_EXT = cpu_to_be16(0x8008), |
- SCTP_PARAM_SUPPORTED_EXT = cpu_to_be16(0x8008), |
568 |
|
+ SCTP_PARAM_SUPPORTED_EXT = __constant_cpu_to_be16(0x8008), |
|
|
544 |
|
+ SCTP_PARAM_SUPPORTED_EXT = CPU_TO_BE16(0x8008), |
569 |
545 |
|
|
570 |
546 |
/* PR-SCTP Sec 3.1 */ |
/* PR-SCTP Sec 3.1 */ |
571 |
547 |
- SCTP_PARAM_FWD_TSN_SUPPORT = cpu_to_be16(0xc000), |
- SCTP_PARAM_FWD_TSN_SUPPORT = cpu_to_be16(0xc000), |
572 |
|
+ SCTP_PARAM_FWD_TSN_SUPPORT = __constant_cpu_to_be16(0xc000), |
|
|
548 |
|
+ SCTP_PARAM_FWD_TSN_SUPPORT = CPU_TO_BE16(0xc000), |
573 |
549 |
|
|
574 |
550 |
/* Add-IP Extension. Section 3.2 */ |
/* Add-IP Extension. Section 3.2 */ |
575 |
551 |
- SCTP_PARAM_ADD_IP = cpu_to_be16(0xc001), |
- SCTP_PARAM_ADD_IP = cpu_to_be16(0xc001), |
|
... |
... |
index bb1926589693..a448cd89a503 100644 |
578 |
554 |
- SCTP_PARAM_SET_PRIMARY = cpu_to_be16(0xc004), |
- SCTP_PARAM_SET_PRIMARY = cpu_to_be16(0xc004), |
579 |
555 |
- SCTP_PARAM_SUCCESS_REPORT = cpu_to_be16(0xc005), |
- SCTP_PARAM_SUCCESS_REPORT = cpu_to_be16(0xc005), |
580 |
556 |
- SCTP_PARAM_ADAPTATION_LAYER_IND = cpu_to_be16(0xc006), |
- SCTP_PARAM_ADAPTATION_LAYER_IND = cpu_to_be16(0xc006), |
581 |
|
+ SCTP_PARAM_ADD_IP = __constant_cpu_to_be16(0xc001), |
|
582 |
|
+ SCTP_PARAM_DEL_IP = __constant_cpu_to_be16(0xc002), |
|
583 |
|
+ SCTP_PARAM_ERR_CAUSE = __constant_cpu_to_be16(0xc003), |
|
584 |
|
+ SCTP_PARAM_SET_PRIMARY = __constant_cpu_to_be16(0xc004), |
|
585 |
|
+ SCTP_PARAM_SUCCESS_REPORT = __constant_cpu_to_be16(0xc005), |
|
586 |
|
+ SCTP_PARAM_ADAPTATION_LAYER_IND = __constant_cpu_to_be16(0xc006), |
|
|
557 |
|
+ SCTP_PARAM_ADD_IP = CPU_TO_BE16(0xc001), |
|
558 |
|
+ SCTP_PARAM_DEL_IP = CPU_TO_BE16(0xc002), |
|
559 |
|
+ SCTP_PARAM_ERR_CAUSE = CPU_TO_BE16(0xc003), |
|
560 |
|
+ SCTP_PARAM_SET_PRIMARY = CPU_TO_BE16(0xc004), |
|
561 |
|
+ SCTP_PARAM_SUCCESS_REPORT = CPU_TO_BE16(0xc005), |
|
562 |
|
+ SCTP_PARAM_ADAPTATION_LAYER_IND = CPU_TO_BE16(0xc006), |
587 |
563 |
|
|
588 |
564 |
/* RE-CONFIG. Section 4 */ |
/* RE-CONFIG. Section 4 */ |
589 |
565 |
- SCTP_PARAM_RESET_OUT_REQUEST = cpu_to_be16(0x000d), |
- SCTP_PARAM_RESET_OUT_REQUEST = cpu_to_be16(0x000d), |
|
... |
... |
index bb1926589693..a448cd89a503 100644 |
592 |
568 |
- SCTP_PARAM_RESET_RESPONSE = cpu_to_be16(0x0010), |
- SCTP_PARAM_RESET_RESPONSE = cpu_to_be16(0x0010), |
593 |
569 |
- SCTP_PARAM_RESET_ADD_OUT_STREAMS = cpu_to_be16(0x0011), |
- SCTP_PARAM_RESET_ADD_OUT_STREAMS = cpu_to_be16(0x0011), |
594 |
570 |
- SCTP_PARAM_RESET_ADD_IN_STREAMS = cpu_to_be16(0x0012), |
- SCTP_PARAM_RESET_ADD_IN_STREAMS = cpu_to_be16(0x0012), |
595 |
|
+ SCTP_PARAM_RESET_OUT_REQUEST = __constant_cpu_to_be16(0x000d), |
|
596 |
|
+ SCTP_PARAM_RESET_IN_REQUEST = __constant_cpu_to_be16(0x000e), |
|
597 |
|
+ SCTP_PARAM_RESET_TSN_REQUEST = __constant_cpu_to_be16(0x000f), |
|
598 |
|
+ SCTP_PARAM_RESET_RESPONSE = __constant_cpu_to_be16(0x0010), |
|
599 |
|
+ SCTP_PARAM_RESET_ADD_OUT_STREAMS = __constant_cpu_to_be16(0x0011), |
|
600 |
|
+ SCTP_PARAM_RESET_ADD_IN_STREAMS = __constant_cpu_to_be16(0x0012), |
|
|
571 |
|
+ SCTP_PARAM_RESET_OUT_REQUEST = CPU_TO_BE16(0x000d), |
|
572 |
|
+ SCTP_PARAM_RESET_IN_REQUEST = CPU_TO_BE16(0x000e), |
|
573 |
|
+ SCTP_PARAM_RESET_TSN_REQUEST = CPU_TO_BE16(0x000f), |
|
574 |
|
+ SCTP_PARAM_RESET_RESPONSE = CPU_TO_BE16(0x0010), |
|
575 |
|
+ SCTP_PARAM_RESET_ADD_OUT_STREAMS = CPU_TO_BE16(0x0011), |
|
576 |
|
+ SCTP_PARAM_RESET_ADD_IN_STREAMS = CPU_TO_BE16(0x0012), |
601 |
577 |
}; /* enum */ |
}; /* enum */ |
602 |
578 |
|
|
603 |
579 |
|
|
|
... |
... |
index bb1926589693..a448cd89a503 100644 |
609 |
585 |
- SCTP_PARAM_ACTION_DISCARD_ERR = cpu_to_be16(0x4000), |
- SCTP_PARAM_ACTION_DISCARD_ERR = cpu_to_be16(0x4000), |
610 |
586 |
- SCTP_PARAM_ACTION_SKIP = cpu_to_be16(0x8000), |
- SCTP_PARAM_ACTION_SKIP = cpu_to_be16(0x8000), |
611 |
587 |
- SCTP_PARAM_ACTION_SKIP_ERR = cpu_to_be16(0xc000), |
- SCTP_PARAM_ACTION_SKIP_ERR = cpu_to_be16(0xc000), |
612 |
|
+ SCTP_PARAM_ACTION_DISCARD = __constant_cpu_to_be16(0x0000), |
|
613 |
|
+ SCTP_PARAM_ACTION_DISCARD_ERR = __constant_cpu_to_be16(0x4000), |
|
614 |
|
+ SCTP_PARAM_ACTION_SKIP = __constant_cpu_to_be16(0x8000), |
|
615 |
|
+ SCTP_PARAM_ACTION_SKIP_ERR = __constant_cpu_to_be16(0xc000), |
|
|
588 |
|
+ SCTP_PARAM_ACTION_DISCARD = CPU_TO_BE16(0x0000), |
|
589 |
|
+ SCTP_PARAM_ACTION_DISCARD_ERR = CPU_TO_BE16(0x4000), |
|
590 |
|
+ SCTP_PARAM_ACTION_SKIP = CPU_TO_BE16(0x8000), |
|
591 |
|
+ SCTP_PARAM_ACTION_SKIP_ERR = CPU_TO_BE16(0xc000), |
616 |
592 |
}; |
}; |
617 |
593 |
|
|
618 |
594 |
-enum { SCTP_PARAM_ACTION_MASK = cpu_to_be16(0xc000), }; |
-enum { SCTP_PARAM_ACTION_MASK = cpu_to_be16(0xc000), }; |
619 |
|
+enum { SCTP_PARAM_ACTION_MASK = __constant_cpu_to_be16(0xc000), }; |
|
|
595 |
|
+enum { SCTP_PARAM_ACTION_MASK = CPU_TO_BE16(0xc000), }; |
620 |
596 |
|
|
621 |
597 |
/* RFC 2960 Section 3.3.1 Payload Data (DATA) (0) */ |
/* RFC 2960 Section 3.3.1 Payload Data (DATA) (0) */ |
622 |
598 |
|
|
|
... |
... |
index bb1926589693..a448cd89a503 100644 |
635 |
611 |
- SCTP_ERROR_UNKNOWN_PARAM = cpu_to_be16(0x08), |
- SCTP_ERROR_UNKNOWN_PARAM = cpu_to_be16(0x08), |
636 |
612 |
- SCTP_ERROR_NO_DATA = cpu_to_be16(0x09), |
- SCTP_ERROR_NO_DATA = cpu_to_be16(0x09), |
637 |
613 |
- SCTP_ERROR_COOKIE_IN_SHUTDOWN = cpu_to_be16(0x0a), |
- SCTP_ERROR_COOKIE_IN_SHUTDOWN = cpu_to_be16(0x0a), |
638 |
|
+ SCTP_ERROR_NO_ERROR = __constant_cpu_to_be16(0x00), |
|
639 |
|
+ SCTP_ERROR_INV_STRM = __constant_cpu_to_be16(0x01), |
|
640 |
|
+ SCTP_ERROR_MISS_PARAM = __constant_cpu_to_be16(0x02), |
|
641 |
|
+ SCTP_ERROR_STALE_COOKIE = __constant_cpu_to_be16(0x03), |
|
642 |
|
+ SCTP_ERROR_NO_RESOURCE = __constant_cpu_to_be16(0x04), |
|
643 |
|
+ SCTP_ERROR_DNS_FAILED = __constant_cpu_to_be16(0x05), |
|
644 |
|
+ SCTP_ERROR_UNKNOWN_CHUNK = __constant_cpu_to_be16(0x06), |
|
645 |
|
+ SCTP_ERROR_INV_PARAM = __constant_cpu_to_be16(0x07), |
|
646 |
|
+ SCTP_ERROR_UNKNOWN_PARAM = __constant_cpu_to_be16(0x08), |
|
647 |
|
+ SCTP_ERROR_NO_DATA = __constant_cpu_to_be16(0x09), |
|
648 |
|
+ SCTP_ERROR_COOKIE_IN_SHUTDOWN = __constant_cpu_to_be16(0x0a), |
|
|
614 |
|
+ SCTP_ERROR_NO_ERROR = CPU_TO_BE16(0x00), |
|
615 |
|
+ SCTP_ERROR_INV_STRM = CPU_TO_BE16(0x01), |
|
616 |
|
+ SCTP_ERROR_MISS_PARAM = CPU_TO_BE16(0x02), |
|
617 |
|
+ SCTP_ERROR_STALE_COOKIE = CPU_TO_BE16(0x03), |
|
618 |
|
+ SCTP_ERROR_NO_RESOURCE = CPU_TO_BE16(0x04), |
|
619 |
|
+ SCTP_ERROR_DNS_FAILED = CPU_TO_BE16(0x05), |
|
620 |
|
+ SCTP_ERROR_UNKNOWN_CHUNK = CPU_TO_BE16(0x06), |
|
621 |
|
+ SCTP_ERROR_INV_PARAM = CPU_TO_BE16(0x07), |
|
622 |
|
+ SCTP_ERROR_UNKNOWN_PARAM = CPU_TO_BE16(0x08), |
|
623 |
|
+ SCTP_ERROR_NO_DATA = CPU_TO_BE16(0x09), |
|
624 |
|
+ SCTP_ERROR_COOKIE_IN_SHUTDOWN = CPU_TO_BE16(0x0a), |
649 |
625 |
|
|
650 |
626 |
|
|
651 |
627 |
/* SCTP Implementation Guide: |
/* SCTP Implementation Guide: |
|
... |
... |
index bb1926589693..a448cd89a503 100644 |
657 |
633 |
- SCTP_ERROR_USER_ABORT = cpu_to_be16(0x0c), |
- SCTP_ERROR_USER_ABORT = cpu_to_be16(0x0c), |
658 |
634 |
- SCTP_ERROR_PROTO_VIOLATION = cpu_to_be16(0x0d), |
- SCTP_ERROR_PROTO_VIOLATION = cpu_to_be16(0x0d), |
659 |
635 |
- SCTP_ERROR_NEW_ENCAP_PORT = cpu_to_be16(0x0e), |
- SCTP_ERROR_NEW_ENCAP_PORT = cpu_to_be16(0x0e), |
660 |
|
+ SCTP_ERROR_RESTART = __constant_cpu_to_be16(0x0b), |
|
661 |
|
+ SCTP_ERROR_USER_ABORT = __constant_cpu_to_be16(0x0c), |
|
662 |
|
+ SCTP_ERROR_PROTO_VIOLATION = __constant_cpu_to_be16(0x0d), |
|
663 |
|
+ SCTP_ERROR_NEW_ENCAP_PORT = __constant_cpu_to_be16(0x0e), |
|
|
636 |
|
+ SCTP_ERROR_RESTART = CPU_TO_BE16(0x0b), |
|
637 |
|
+ SCTP_ERROR_USER_ABORT = CPU_TO_BE16(0x0c), |
|
638 |
|
+ SCTP_ERROR_PROTO_VIOLATION = CPU_TO_BE16(0x0d), |
|
639 |
|
+ SCTP_ERROR_NEW_ENCAP_PORT = CPU_TO_BE16(0x0e), |
664 |
640 |
|
|
665 |
641 |
/* ADDIP Section 3.3 New Error Causes |
/* ADDIP Section 3.3 New Error Causes |
666 |
642 |
* |
* |
|
... |
... |
index bb1926589693..a448cd89a503 100644 |
673 |
649 |
- SCTP_ERROR_DEL_SRC_IP = cpu_to_be16(0x00A2), |
- SCTP_ERROR_DEL_SRC_IP = cpu_to_be16(0x00A2), |
674 |
650 |
- SCTP_ERROR_ASCONF_ACK = cpu_to_be16(0x00A3), |
- SCTP_ERROR_ASCONF_ACK = cpu_to_be16(0x00A3), |
675 |
651 |
- SCTP_ERROR_REQ_REFUSED = cpu_to_be16(0x00A4), |
- SCTP_ERROR_REQ_REFUSED = cpu_to_be16(0x00A4), |
676 |
|
+ SCTP_ERROR_DEL_LAST_IP = __constant_cpu_to_be16(0x00A0), |
|
677 |
|
+ SCTP_ERROR_RSRC_LOW = __constant_cpu_to_be16(0x00A1), |
|
678 |
|
+ SCTP_ERROR_DEL_SRC_IP = __constant_cpu_to_be16(0x00A2), |
|
679 |
|
+ SCTP_ERROR_ASCONF_ACK = __constant_cpu_to_be16(0x00A3), |
|
680 |
|
+ SCTP_ERROR_REQ_REFUSED = __constant_cpu_to_be16(0x00A4), |
|
|
652 |
|
+ SCTP_ERROR_DEL_LAST_IP = CPU_TO_BE16(0x00A0), |
|
653 |
|
+ SCTP_ERROR_RSRC_LOW = CPU_TO_BE16(0x00A1), |
|
654 |
|
+ SCTP_ERROR_DEL_SRC_IP = CPU_TO_BE16(0x00A2), |
|
655 |
|
+ SCTP_ERROR_ASCONF_ACK = CPU_TO_BE16(0x00A3), |
|
656 |
|
+ SCTP_ERROR_REQ_REFUSED = CPU_TO_BE16(0x00A4), |
681 |
657 |
|
|
682 |
658 |
/* AUTH Section 4. New Error Cause |
/* AUTH Section 4. New Error Cause |
683 |
659 |
* |
* |
|
... |
... |
index bb1926589693..a448cd89a503 100644 |
686 |
662 |
* 0x0105 Unsupported HMAC Identifier |
* 0x0105 Unsupported HMAC Identifier |
687 |
663 |
*/ |
*/ |
688 |
664 |
- SCTP_ERROR_UNSUP_HMAC = cpu_to_be16(0x0105) |
- SCTP_ERROR_UNSUP_HMAC = cpu_to_be16(0x0105) |
689 |
|
+ SCTP_ERROR_UNSUP_HMAC = __constant_cpu_to_be16(0x0105) |
|
|
665 |
|
+ SCTP_ERROR_UNSUP_HMAC = CPU_TO_BE16(0x0105) |
690 |
666 |
}; |
}; |
691 |
|
|
|
692 |
|
|
|
|
667 |
|
|
|
668 |
|
|
693 |
669 |
diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h |
diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h |
694 |
670 |
index 2f7bb92b4c9e..74925c6a88f0 100644 |
index 2f7bb92b4c9e..74925c6a88f0 100644 |
695 |
671 |
--- a/include/linux/seqlock.h |
--- a/include/linux/seqlock.h |
|
... |
... |
index ba77f47ef61e..01b3cba4152d 100644 |
733 |
709 |
{ |
{ |
734 |
710 |
switch (skb_protocol(skb, true)) { |
switch (skb_protocol(skb, true)) { |
735 |
711 |
- case cpu_to_be16(ETH_P_IP): |
- case cpu_to_be16(ETH_P_IP): |
736 |
|
+ case __constant_cpu_to_be16(ETH_P_IP): |
|
|
712 |
|
+ case CPU_TO_BE16(ETH_P_IP): |
737 |
713 |
if (skb_network_header(skb) + sizeof(struct iphdr) <= |
if (skb_network_header(skb) + sizeof(struct iphdr) <= |
738 |
714 |
skb_tail_pointer(skb)) |
skb_tail_pointer(skb)) |
739 |
715 |
return IP_ECN_set_ce(ip_hdr(skb)); |
return IP_ECN_set_ce(ip_hdr(skb)); |
740 |
716 |
break; |
break; |
741 |
717 |
|
|
742 |
718 |
- case cpu_to_be16(ETH_P_IPV6): |
- case cpu_to_be16(ETH_P_IPV6): |
743 |
|
+ case __constant_cpu_to_be16(ETH_P_IPV6): |
|
|
719 |
|
+ case CPU_TO_BE16(ETH_P_IPV6): |
744 |
720 |
if (skb_network_header(skb) + sizeof(struct ipv6hdr) <= |
if (skb_network_header(skb) + sizeof(struct ipv6hdr) <= |
745 |
721 |
skb_tail_pointer(skb)) |
skb_tail_pointer(skb)) |
746 |
722 |
return IP6_ECN_set_ce(skb, ipv6_hdr(skb)); |
return IP6_ECN_set_ce(skb, ipv6_hdr(skb)); |
|
... |
... |
index ba77f47ef61e..01b3cba4152d 100644 |
749 |
725 |
{ |
{ |
750 |
726 |
switch (skb_protocol(skb, true)) { |
switch (skb_protocol(skb, true)) { |
751 |
727 |
- case cpu_to_be16(ETH_P_IP): |
- case cpu_to_be16(ETH_P_IP): |
752 |
|
+ case __constant_cpu_to_be16(ETH_P_IP): |
|
|
728 |
|
+ case CPU_TO_BE16(ETH_P_IP): |
753 |
729 |
if (skb_network_header(skb) + sizeof(struct iphdr) <= |
if (skb_network_header(skb) + sizeof(struct iphdr) <= |
754 |
730 |
skb_tail_pointer(skb)) |
skb_tail_pointer(skb)) |
755 |
731 |
return IP_ECN_set_ect1(ip_hdr(skb)); |
return IP_ECN_set_ect1(ip_hdr(skb)); |
756 |
732 |
break; |
break; |
757 |
733 |
|
|
758 |
734 |
- case cpu_to_be16(ETH_P_IPV6): |
- case cpu_to_be16(ETH_P_IPV6): |
759 |
|
+ case __constant_cpu_to_be16(ETH_P_IPV6): |
|
|
735 |
|
+ case CPU_TO_BE16(ETH_P_IPV6): |
760 |
736 |
if (skb_network_header(skb) + sizeof(struct ipv6hdr) <= |
if (skb_network_header(skb) + sizeof(struct ipv6hdr) <= |
761 |
737 |
skb_tail_pointer(skb)) |
skb_tail_pointer(skb)) |
762 |
738 |
return IP6_ECN_set_ect1(skb, ipv6_hdr(skb)); |
return IP6_ECN_set_ect1(skb, ipv6_hdr(skb)); |
|
... |
... |
index ba77f47ef61e..01b3cba4152d 100644 |
765 |
741 |
|
|
766 |
742 |
switch (skb_protocol(skb, true)) { |
switch (skb_protocol(skb, true)) { |
767 |
743 |
- case htons(ETH_P_IP): |
- case htons(ETH_P_IP): |
768 |
|
+ case __constant_htons(ETH_P_IP): |
|
|
744 |
|
+ case HTONS(ETH_P_IP): |
769 |
745 |
inner = ip_hdr(skb)->tos; |
inner = ip_hdr(skb)->tos; |
770 |
746 |
break; |
break; |
771 |
747 |
- case htons(ETH_P_IPV6): |
- case htons(ETH_P_IPV6): |
772 |
|
+ case __constant_htons(ETH_P_IPV6): |
|
|
748 |
|
+ case HTONS(ETH_P_IPV6): |
773 |
749 |
inner = ipv6_get_dsfield(ipv6_hdr(skb)); |
inner = ipv6_get_dsfield(ipv6_hdr(skb)); |
774 |
750 |
break; |
break; |
775 |
751 |
default: |
default: |
|
... |
... |
index ba77f47ef61e..01b3cba4152d 100644 |
778 |
754 |
|
|
779 |
755 |
switch (skb_protocol(skb, true)) { |
switch (skb_protocol(skb, true)) { |
780 |
756 |
- case htons(ETH_P_IP): |
- case htons(ETH_P_IP): |
781 |
|
+ case __constant_htons(ETH_P_IP): |
|
|
757 |
|
+ case HTONS(ETH_P_IP): |
782 |
758 |
inner = ip_hdr(skb)->tos; |
inner = ip_hdr(skb)->tos; |
783 |
759 |
break; |
break; |
784 |
760 |
- case htons(ETH_P_IPV6): |
- case htons(ETH_P_IPV6): |
785 |
|
+ case __constant_htons(ETH_P_IPV6): |
|
|
761 |
|
+ case HTONS(ETH_P_IPV6): |
786 |
762 |
inner = ipv6_get_dsfield(ipv6_hdr(skb)); |
inner = ipv6_get_dsfield(ipv6_hdr(skb)); |
787 |
763 |
break; |
break; |
788 |
764 |
default: |
default: |
|
... |
... |
index 548b65bd3973..6744709d8a81 100644 |
795 |
771 |
switch (skb->protocol) { |
switch (skb->protocol) { |
796 |
772 |
#if IS_ENABLED(CONFIG_IPV6) |
#if IS_ENABLED(CONFIG_IPV6) |
797 |
773 |
- case htons(ETH_P_IPV6): |
- case htons(ETH_P_IPV6): |
798 |
|
+ case __constant_htons(ETH_P_IPV6): |
|
|
774 |
|
+ case HTONS(ETH_P_IPV6): |
799 |
775 |
nhlen = sizeof(struct ipv6hdr); |
nhlen = sizeof(struct ipv6hdr); |
800 |
776 |
break; |
break; |
801 |
777 |
#endif |
#endif |
802 |
778 |
- case htons(ETH_P_IP): |
- case htons(ETH_P_IP): |
803 |
|
+ case __constant_htons(ETH_P_IP): |
|
|
779 |
|
+ case HTONS(ETH_P_IP): |
804 |
780 |
nhlen = sizeof(struct iphdr); |
nhlen = sizeof(struct iphdr); |
805 |
781 |
break; |
break; |
806 |
782 |
default: |
default: |
|
... |
... |
index 08537aa14f7c..4d3a279508b1 100644 |
871 |
847 |
|
|
872 |
848 |
switch (vlan_get_protocol(skb)) { |
switch (vlan_get_protocol(skb)) { |
873 |
849 |
- case htons(ETH_P_IP): |
- case htons(ETH_P_IP): |
874 |
|
+ case __constant_htons(ETH_P_IP): |
|
|
850 |
|
+ case HTONS(ETH_P_IP): |
875 |
851 |
l4_hdr = ip_hdr(skb)->protocol; |
l4_hdr = ip_hdr(skb)->protocol; |
876 |
852 |
break; |
break; |
877 |
853 |
- case htons(ETH_P_IPV6): |
- case htons(ETH_P_IPV6): |
878 |
|
+ case __constant_htons(ETH_P_IPV6): |
|
|
854 |
|
+ case HTONS(ETH_P_IPV6): |
879 |
855 |
l4_hdr = ipv6_hdr(skb)->nexthdr; |
l4_hdr = ipv6_hdr(skb)->nexthdr; |
880 |
856 |
break; |
break; |
881 |
857 |
default: |
default: |
|
... |
... |
index 449b45b843d4..b0547f740e73 100644 |
892 |
868 |
- case htons(ETH_P_IPV6): |
- case htons(ETH_P_IPV6): |
893 |
869 |
- case htons(ETH_P_8021Q): |
- case htons(ETH_P_8021Q): |
894 |
870 |
- case htons(ETH_P_8021AD): |
- case htons(ETH_P_8021AD): |
895 |
|
+ case __constant_htons(ETH_P_ARP): |
|
896 |
|
+ case __constant_htons(ETH_P_IP): |
|
897 |
|
+ case __constant_htons(ETH_P_IPV6): |
|
898 |
|
+ case __constant_htons(ETH_P_8021Q): |
|
899 |
|
+ case __constant_htons(ETH_P_8021AD): |
|
|
871 |
|
+ case HTONS(ETH_P_ARP): |
|
872 |
|
+ case HTONS(ETH_P_IP): |
|
873 |
|
+ case HTONS(ETH_P_IPV6): |
|
874 |
|
+ case HTONS(ETH_P_8021Q): |
|
875 |
|
+ case HTONS(ETH_P_8021AD): |
900 |
876 |
return true; |
return true; |
901 |
877 |
default: |
default: |
902 |
878 |
return false; |
return false; |
|
... |
... |
index 255aeee72402..a2a1685b34bb 100644 |
909 |
885 |
{ |
{ |
910 |
886 |
switch (skb->protocol) { |
switch (skb->protocol) { |
911 |
887 |
- case htons(ETH_P_IP): |
- case htons(ETH_P_IP): |
912 |
|
+ case __constant_htons(ETH_P_IP): |
|
|
888 |
|
+ case HTONS(ETH_P_IP): |
913 |
889 |
return sizeof(struct iphdr); |
return sizeof(struct iphdr); |
914 |
890 |
- case htons(ETH_P_IPV6): |
- case htons(ETH_P_IPV6): |
915 |
|
+ case __constant_htons(ETH_P_IPV6): |
|
|
891 |
|
+ case HTONS(ETH_P_IPV6): |
916 |
892 |
return sizeof(struct ipv6hdr); |
return sizeof(struct ipv6hdr); |
917 |
893 |
default: |
default: |
918 |
894 |
return ~0U; |
return ~0U; |
|
... |
... |
index 255aeee72402..a2a1685b34bb 100644 |
921 |
897 |
|
|
922 |
898 |
switch (skb_protocol(skb, true)) { |
switch (skb_protocol(skb, true)) { |
923 |
899 |
- case cpu_to_be16(ETH_P_IP): |
- case cpu_to_be16(ETH_P_IP): |
924 |
|
+ case __constant_cpu_to_be16(ETH_P_IP): |
|
|
900 |
|
+ case CPU_TO_BE16(ETH_P_IP): |
925 |
901 |
iphdr_len = sizeof(struct iphdr); |
iphdr_len = sizeof(struct iphdr); |
926 |
902 |
break; |
break; |
927 |
903 |
- case cpu_to_be16(ETH_P_IPV6): |
- case cpu_to_be16(ETH_P_IPV6): |
928 |
|
+ case __constant_cpu_to_be16(ETH_P_IPV6): |
|
|
904 |
|
+ case CPU_TO_BE16(ETH_P_IPV6): |
929 |
905 |
iphdr_len = sizeof(struct ipv6hdr); |
iphdr_len = sizeof(struct ipv6hdr); |
930 |
906 |
break; |
break; |
931 |
907 |
default: |
default: |
|
... |
... |
index 6f1adba6695f..0c7e38931594 100644 |
938 |
914 |
|
|
939 |
915 |
switch (proto) { |
switch (proto) { |
940 |
916 |
- case htons(ETH_P_IP): { |
- case htons(ETH_P_IP): { |
941 |
|
+ case __constant_htons(ETH_P_IP): { |
|
|
917 |
|
+ case HTONS(ETH_P_IP): { |
942 |
918 |
const struct iphdr *iph; |
const struct iphdr *iph; |
943 |
919 |
struct iphdr _iph; |
struct iphdr _iph; |
944 |
920 |
|
|
|
... |
... |
index 6f1adba6695f..0c7e38931594 100644 |
947 |
923 |
break; |
break; |
948 |
924 |
} |
} |
949 |
925 |
- case htons(ETH_P_IPV6): { |
- case htons(ETH_P_IPV6): { |
950 |
|
+ case __constant_htons(ETH_P_IPV6): { |
|
|
926 |
|
+ case HTONS(ETH_P_IPV6): { |
951 |
927 |
const struct ipv6hdr *iph; |
const struct ipv6hdr *iph; |
952 |
928 |
struct ipv6hdr _iph; |
struct ipv6hdr _iph; |
953 |
929 |
|
|
|
... |
... |
index 6f1adba6695f..0c7e38931594 100644 |
957 |
933 |
} |
} |
958 |
934 |
- case htons(ETH_P_8021AD): |
- case htons(ETH_P_8021AD): |
959 |
935 |
- case htons(ETH_P_8021Q): { |
- case htons(ETH_P_8021Q): { |
960 |
|
+ case __constant_htons(ETH_P_8021AD): |
|
961 |
|
+ case __constant_htons(ETH_P_8021Q): { |
|
|
936 |
|
+ case HTONS(ETH_P_8021AD): |
|
937 |
|
+ case HTONS(ETH_P_8021Q): { |
962 |
938 |
const struct vlan_hdr *vlan = NULL; |
const struct vlan_hdr *vlan = NULL; |
963 |
939 |
struct vlan_hdr _vlan; |
struct vlan_hdr _vlan; |
964 |
940 |
__be16 saved_vlan_tpid = proto; |
__be16 saved_vlan_tpid = proto; |
|
... |
... |
index 6f1adba6695f..0c7e38931594 100644 |
967 |
943 |
break; |
break; |
968 |
944 |
} |
} |
969 |
945 |
- case htons(ETH_P_PPP_SES): { |
- case htons(ETH_P_PPP_SES): { |
970 |
|
+ case __constant_htons(ETH_P_PPP_SES): { |
|
|
946 |
|
+ case HTONS(ETH_P_PPP_SES): { |
971 |
947 |
struct { |
struct { |
972 |
948 |
struct pppoe_hdr hdr; |
struct pppoe_hdr hdr; |
973 |
949 |
__be16 proto; |
__be16 proto; |
|
... |
... |
index 6f1adba6695f..0c7e38931594 100644 |
976 |
952 |
nhoff += PPPOE_SES_HLEN; |
nhoff += PPPOE_SES_HLEN; |
977 |
953 |
switch (proto) { |
switch (proto) { |
978 |
954 |
- case htons(PPP_IP): |
- case htons(PPP_IP): |
979 |
|
+ case __constant_htons(PPP_IP): |
|
|
955 |
|
+ case HTONS(PPP_IP): |
980 |
956 |
proto = htons(ETH_P_IP); |
proto = htons(ETH_P_IP); |
981 |
957 |
fdret = FLOW_DISSECT_RET_PROTO_AGAIN; |
fdret = FLOW_DISSECT_RET_PROTO_AGAIN; |
982 |
958 |
break; |
break; |
983 |
959 |
- case htons(PPP_IPV6): |
- case htons(PPP_IPV6): |
984 |
|
+ case __constant_htons(PPP_IPV6): |
|
|
960 |
|
+ case HTONS(PPP_IPV6): |
985 |
961 |
proto = htons(ETH_P_IPV6); |
proto = htons(ETH_P_IPV6); |
986 |
962 |
fdret = FLOW_DISSECT_RET_PROTO_AGAIN; |
fdret = FLOW_DISSECT_RET_PROTO_AGAIN; |
987 |
963 |
break; |
break; |
|
... |
... |
index 6f1adba6695f..0c7e38931594 100644 |
990 |
966 |
break; |
break; |
991 |
967 |
} |
} |
992 |
968 |
- case htons(ETH_P_TIPC): { |
- case htons(ETH_P_TIPC): { |
993 |
|
+ case __constant_htons(ETH_P_TIPC): { |
|
|
969 |
|
+ case HTONS(ETH_P_TIPC): { |
994 |
970 |
struct tipc_basic_hdr *hdr, _hdr; |
struct tipc_basic_hdr *hdr, _hdr; |
995 |
971 |
|
|
996 |
972 |
hdr = __skb_header_pointer(skb, nhoff, sizeof(_hdr), |
hdr = __skb_header_pointer(skb, nhoff, sizeof(_hdr), |
|
... |
... |
index 6f1adba6695f..0c7e38931594 100644 |
1000 |
976 |
|
|
1001 |
977 |
- case htons(ETH_P_MPLS_UC): |
- case htons(ETH_P_MPLS_UC): |
1002 |
978 |
- case htons(ETH_P_MPLS_MC): |
- case htons(ETH_P_MPLS_MC): |
1003 |
|
+ case __constant_htons(ETH_P_MPLS_UC): |
|
1004 |
|
+ case __constant_htons(ETH_P_MPLS_MC): |
|
|
979 |
|
+ case HTONS(ETH_P_MPLS_UC): |
|
980 |
|
+ case HTONS(ETH_P_MPLS_MC): |
1005 |
981 |
fdret = __skb_flow_dissect_mpls(skb, flow_dissector, |
fdret = __skb_flow_dissect_mpls(skb, flow_dissector, |
1006 |
982 |
target_container, data, |
target_container, data, |
1007 |
983 |
nhoff, hlen, mpls_lse, |
nhoff, hlen, mpls_lse, |
|
... |
... |
index 6f1adba6695f..0c7e38931594 100644 |
1010 |
986 |
mpls_lse++; |
mpls_lse++; |
1011 |
987 |
break; |
break; |
1012 |
988 |
- case htons(ETH_P_FCOE): |
- case htons(ETH_P_FCOE): |
1013 |
|
+ case __constant_htons(ETH_P_FCOE): |
|
|
989 |
|
+ case HTONS(ETH_P_FCOE): |
1014 |
990 |
if ((hlen - nhoff) < FCOE_HEADER_LEN) { |
if ((hlen - nhoff) < FCOE_HEADER_LEN) { |
1015 |
991 |
fdret = FLOW_DISSECT_RET_OUT_BAD; |
fdret = FLOW_DISSECT_RET_OUT_BAD; |
1016 |
992 |
break; |
break; |
|
... |
... |
index 6f1adba6695f..0c7e38931594 100644 |
1020 |
996 |
|
|
1021 |
997 |
- case htons(ETH_P_ARP): |
- case htons(ETH_P_ARP): |
1022 |
998 |
- case htons(ETH_P_RARP): |
- case htons(ETH_P_RARP): |
1023 |
|
+ case __constant_htons(ETH_P_ARP): |
|
1024 |
|
+ case __constant_htons(ETH_P_RARP): |
|
|
999 |
|
+ case HTONS(ETH_P_ARP): |
|
1000 |
|
+ case HTONS(ETH_P_RARP): |
1025 |
1001 |
fdret = __skb_flow_dissect_arp(skb, flow_dissector, |
fdret = __skb_flow_dissect_arp(skb, flow_dissector, |
1026 |
1002 |
target_container, data, |
target_container, data, |
1027 |
1003 |
nhoff, hlen); |
nhoff, hlen); |
1028 |
1004 |
break; |
break; |
1029 |
1005 |
|
|
1030 |
1006 |
- case htons(ETH_P_BATMAN): |
- case htons(ETH_P_BATMAN): |
1031 |
|
+ case __constant_htons(ETH_P_BATMAN): |
|
|
1007 |
|
+ case HTONS(ETH_P_BATMAN): |
1032 |
1008 |
fdret = __skb_flow_dissect_batadv(skb, key_control, data, |
fdret = __skb_flow_dissect_batadv(skb, key_control, data, |
1033 |
1009 |
&proto, &nhoff, hlen, flags); |
&proto, &nhoff, hlen, flags); |
1034 |
1010 |
break; |
break; |
|
... |
... |
index 785daff48030..5f402b5e9f6c 100644 |
1041 |
1017 |
|
|
1042 |
1018 |
switch (skb->protocol) { |
switch (skb->protocol) { |
1043 |
1019 |
- case htons(ETH_P_IP): |
- case htons(ETH_P_IP): |
1044 |
|
+ case __constant_htons(ETH_P_IP): |
|
|
1020 |
|
+ case HTONS(ETH_P_IP): |
1045 |
1021 |
err = skb_checksum_setup_ipv4(skb, recalculate); |
err = skb_checksum_setup_ipv4(skb, recalculate); |
1046 |
1022 |
break; |
break; |
1047 |
1023 |
|
|
1048 |
1024 |
- case htons(ETH_P_IPV6): |
- case htons(ETH_P_IPV6): |
1049 |
|
+ case __constant_htons(ETH_P_IPV6): |
|
|
1025 |
|
+ case HTONS(ETH_P_IPV6): |
1050 |
1026 |
err = skb_checksum_setup_ipv6(skb, recalculate); |
err = skb_checksum_setup_ipv6(skb, recalculate); |
1051 |
1027 |
break; |
break; |
1052 |
|
|
|
|
1028 |
|
|
1053 |
1029 |
diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c |
diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c |
1054 |
1030 |
index 4106373180c6..ff03f3e0243a 100644 |
index 4106373180c6..ff03f3e0243a 100644 |
1055 |
1031 |
--- a/net/ethernet/eth.c |
--- a/net/ethernet/eth.c |
|
... |
... |
index 4106373180c6..ff03f3e0243a 100644 |
1059 |
1035 |
|
|
1060 |
1036 |
static struct packet_offload eth_packet_offload __read_mostly = { |
static struct packet_offload eth_packet_offload __read_mostly = { |
1061 |
1037 |
- .type = cpu_to_be16(ETH_P_TEB), |
- .type = cpu_to_be16(ETH_P_TEB), |
1062 |
|
+ .type = __constant_cpu_to_be16(ETH_P_TEB), |
|
|
1038 |
|
+ .type = CPU_TO_BE16(ETH_P_TEB), |
1063 |
1039 |
.priority = 10, |
.priority = 10, |
1064 |
1040 |
.callbacks = { |
.callbacks = { |
1065 |
1041 |
.gro_receive = eth_gro_receive, |
.gro_receive = eth_gro_receive, |
|
... |
... |
index b94fa8eb831b..f1f86db1829e 100644 |
1072 |
1048 |
|
|
1073 |
1049 |
static struct packet_offload ip_packet_offload __read_mostly = { |
static struct packet_offload ip_packet_offload __read_mostly = { |
1074 |
1050 |
- .type = cpu_to_be16(ETH_P_IP), |
- .type = cpu_to_be16(ETH_P_IP), |
1075 |
|
+ .type = __constant_cpu_to_be16(ETH_P_IP), |
|
|
1051 |
|
+ .type = CPU_TO_BE16(ETH_P_IP), |
1076 |
1052 |
.callbacks = { |
.callbacks = { |
1077 |
1053 |
.gso_segment = inet_gso_segment, |
.gso_segment = inet_gso_segment, |
1078 |
1054 |
.gro_receive = inet_gro_receive, |
.gro_receive = inet_gro_receive, |
|
... |
... |
index b94fa8eb831b..f1f86db1829e 100644 |
1081 |
1057 |
|
|
1082 |
1058 |
static struct packet_type ip_packet_type __read_mostly = { |
static struct packet_type ip_packet_type __read_mostly = { |
1083 |
1059 |
- .type = cpu_to_be16(ETH_P_IP), |
- .type = cpu_to_be16(ETH_P_IP), |
1084 |
|
+ .type = __constant_cpu_to_be16(ETH_P_IP), |
|
|
1060 |
|
+ .type = CPU_TO_BE16(ETH_P_IP), |
1085 |
1061 |
.func = ip_rcv, |
.func = ip_rcv, |
1086 |
1062 |
.list_func = ip_list_rcv, |
.list_func = ip_list_rcv, |
1087 |
1063 |
}; |
}; |
|
... |
... |
index 922dd73e5740..d8ef2692d8d5 100644 |
1094 |
1070 |
.family = AF_INET, |
.family = AF_INET, |
1095 |
1071 |
.key_len = 4, |
.key_len = 4, |
1096 |
1072 |
- .protocol = cpu_to_be16(ETH_P_IP), |
- .protocol = cpu_to_be16(ETH_P_IP), |
1097 |
|
+ .protocol = __constant_cpu_to_be16(ETH_P_IP), |
|
|
1073 |
|
+ .protocol = CPU_TO_BE16(ETH_P_IP), |
1098 |
1074 |
.hash = arp_hash, |
.hash = arp_hash, |
1099 |
1075 |
.key_eq = arp_key_eq, |
.key_eq = arp_key_eq, |
1100 |
1076 |
.constructor = arp_constructor, |
.constructor = arp_constructor, |
|
... |
... |
index 922dd73e5740..d8ef2692d8d5 100644 |
1103 |
1079 |
|
|
1104 |
1080 |
static struct packet_type arp_packet_type __read_mostly = { |
static struct packet_type arp_packet_type __read_mostly = { |
1105 |
1081 |
- .type = cpu_to_be16(ETH_P_ARP), |
- .type = cpu_to_be16(ETH_P_ARP), |
1106 |
|
+ .type = __constant_cpu_to_be16(ETH_P_ARP), |
|
|
1082 |
|
+ .type = CPU_TO_BE16(ETH_P_ARP), |
1107 |
1083 |
.func = arp_rcv, |
.func = arp_rcv, |
1108 |
1084 |
}; |
}; |
1109 |
|
|
|
|
1085 |
|
|
1110 |
1086 |
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c |
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c |
1111 |
1087 |
index 8e9c3e9ea36e..9c8d277f85df 100644 |
index 8e9c3e9ea36e..9c8d277f85df 100644 |
1112 |
1088 |
--- a/net/ipv6/af_inet6.c |
--- a/net/ipv6/af_inet6.c |
|
... |
... |
index 8e9c3e9ea36e..9c8d277f85df 100644 |
1116 |
1092 |
|
|
1117 |
1093 |
static struct packet_type ipv6_packet_type __read_mostly = { |
static struct packet_type ipv6_packet_type __read_mostly = { |
1118 |
1094 |
- .type = cpu_to_be16(ETH_P_IPV6), |
- .type = cpu_to_be16(ETH_P_IPV6), |
1119 |
|
+ .type = __constant_cpu_to_be16(ETH_P_IPV6), |
|
|
1095 |
|
+ .type = CPU_TO_BE16(ETH_P_IPV6), |
1120 |
1096 |
.func = ipv6_rcv, |
.func = ipv6_rcv, |
1121 |
1097 |
.list_func = ipv6_list_rcv, |
.list_func = ipv6_list_rcv, |
1122 |
1098 |
}; |
}; |
|
... |
... |
index a80f90bf3ae7..df5df372da61 100644 |
1129 |
1105 |
fptr->frag_off = htons(offset); |
fptr->frag_off = htons(offset); |
1130 |
1106 |
if (skb->next) |
if (skb->next) |
1131 |
1107 |
- fptr->frag_off |= htons(IP6_MF); |
- fptr->frag_off |= htons(IP6_MF); |
1132 |
|
+ fptr->frag_off |= __constant_htons(IP6_MF); |
|
|
1108 |
|
+ fptr->frag_off |= HTONS(IP6_MF); |
1133 |
1109 |
offset += (ntohs(ipv6h->payload_len) - |
offset += (ntohs(ipv6h->payload_len) - |
1134 |
1110 |
sizeof(struct frag_hdr)); |
sizeof(struct frag_hdr)); |
1135 |
1111 |
} |
} |
|
... |
... |
index a80f90bf3ae7..df5df372da61 100644 |
1138 |
1114 |
|
|
1139 |
1115 |
if (skb->encapsulation) { |
if (skb->encapsulation) { |
1140 |
1116 |
- skb_set_inner_protocol(skb, cpu_to_be16(ETH_P_IPV6)); |
- skb_set_inner_protocol(skb, cpu_to_be16(ETH_P_IPV6)); |
1141 |
|
+ skb_set_inner_protocol(skb, __constant_cpu_to_be16(ETH_P_IPV6)); |
|
|
1117 |
|
+ skb_set_inner_protocol(skb, CPU_TO_BE16(ETH_P_IPV6)); |
1142 |
1118 |
skb_set_inner_network_header(skb, nhoff); |
skb_set_inner_network_header(skb, nhoff); |
1143 |
1119 |
} |
} |
1144 |
1120 |
|
|
|
... |
... |
index a80f90bf3ae7..df5df372da61 100644 |
1147 |
1123 |
|
|
1148 |
1124 |
static struct packet_offload ipv6_packet_offload __read_mostly = { |
static struct packet_offload ipv6_packet_offload __read_mostly = { |
1149 |
1125 |
- .type = cpu_to_be16(ETH_P_IPV6), |
- .type = cpu_to_be16(ETH_P_IPV6), |
1150 |
|
+ .type = __constant_cpu_to_be16(ETH_P_IPV6), |
|
|
1126 |
|
+ .type = CPU_TO_BE16(ETH_P_IPV6), |
1151 |
1127 |
.callbacks = { |
.callbacks = { |
1152 |
1128 |
.gso_segment = ipv6_gso_segment, |
.gso_segment = ipv6_gso_segment, |
1153 |
1129 |
.gro_receive = ipv6_gro_receive, |
.gro_receive = ipv6_gro_receive, |
|
... |
... |
index 76717478f173..fc5e724abbc5 100644 |
1160 |
1136 |
.family = AF_INET6, |
.family = AF_INET6, |
1161 |
1137 |
.key_len = sizeof(struct in6_addr), |
.key_len = sizeof(struct in6_addr), |
1162 |
1138 |
- .protocol = cpu_to_be16(ETH_P_IPV6), |
- .protocol = cpu_to_be16(ETH_P_IPV6), |
1163 |
|
+ .protocol = __constant_cpu_to_be16(ETH_P_IPV6), |
|
|
1139 |
|
+ .protocol = CPU_TO_BE16(ETH_P_IPV6), |
1164 |
1140 |
.hash = ndisc_hash, |
.hash = ndisc_hash, |
1165 |
1141 |
.key_eq = ndisc_key_eq, |
.key_eq = ndisc_key_eq, |
1166 |
1142 |
.constructor = ndisc_constructor, |
.constructor = ndisc_constructor, |
|
... |
... |
index 2b88710994d7..641dcd863eb2 100644 |
1173 |
1149 |
|
|
1174 |
1150 |
switch (skb_protocol(skb, true)) { |
switch (skb_protocol(skb, true)) { |
1175 |
1151 |
- case htons(ETH_P_IP): |
- case htons(ETH_P_IP): |
1176 |
|
+ case __constant_htons(ETH_P_IP): |
|
|
1152 |
|
+ case HTONS(ETH_P_IP): |
1177 |
1153 |
wlen += sizeof(struct iphdr); |
wlen += sizeof(struct iphdr); |
1178 |
1154 |
if (!pskb_may_pull(skb, wlen) || |
if (!pskb_may_pull(skb, wlen) || |
1179 |
1155 |
skb_try_make_writable(skb, wlen)) |
skb_try_make_writable(skb, wlen)) |
|
... |
... |
index 2b88710994d7..641dcd863eb2 100644 |
1182 |
1158 |
break; |
break; |
1183 |
1159 |
|
|
1184 |
1160 |
- case htons(ETH_P_IPV6): |
- case htons(ETH_P_IPV6): |
1185 |
|
+ case __constant_htons(ETH_P_IPV6): |
|
|
1161 |
|
+ case HTONS(ETH_P_IPV6): |
1186 |
1162 |
wlen += sizeof(struct ipv6hdr); |
wlen += sizeof(struct ipv6hdr); |
1187 |
1163 |
if (!pskb_may_pull(skb, wlen) || |
if (!pskb_may_pull(skb, wlen) || |
1188 |
1164 |
skb_try_make_writable(skb, wlen)) |
skb_try_make_writable(skb, wlen)) |
|
... |
... |
index 2b88710994d7..641dcd863eb2 100644 |
1191 |
1167 |
|
|
1192 |
1168 |
switch (skb_protocol(skb, true)) { |
switch (skb_protocol(skb, true)) { |
1193 |
1169 |
- case htons(ETH_P_IP): |
- case htons(ETH_P_IP): |
1194 |
|
+ case __constant_htons(ETH_P_IP): |
|
|
1170 |
|
+ case HTONS(ETH_P_IP): |
1195 |
1171 |
ipv4_change_dsfield(ip_hdr(skb), p->mv[index].mask, |
ipv4_change_dsfield(ip_hdr(skb), p->mv[index].mask, |
1196 |
1172 |
p->mv[index].value); |
p->mv[index].value); |
1197 |
1173 |
break; |
break; |
1198 |
1174 |
- case htons(ETH_P_IPV6): |
- case htons(ETH_P_IPV6): |
1199 |
|
+ case __constant_htons(ETH_P_IPV6): |
|
|
1175 |
|
+ case HTONS(ETH_P_IPV6): |
1200 |
1176 |
ipv6_change_dsfield(ipv6_hdr(skb), p->mv[index].mask, |
ipv6_change_dsfield(ipv6_hdr(skb), p->mv[index].mask, |
1201 |
1177 |
p->mv[index].value); |
p->mv[index].value); |
1202 |
1178 |
break; |
break; |
1203 |
|
diff --git a/scripts/ld-version.sh b/scripts/ld-version.sh |
|
1204 |
|
index f2be0ff9a738..3cf20535db10 100755 |
|
1205 |
|
--- a/scripts/ld-version.sh |
|
1206 |
|
+++ b/scripts/ld-version.sh |
|
1207 |
|
@@ -1,4 +1,4 @@ |
|
1208 |
|
-#!/usr/bin/awk -f |
|
1209 |
|
+#!/nyan/busybox/current/bin/awk -f |
|
1210 |
|
# SPDX-License-Identifier: GPL-2.0 |
|
1211 |
|
# extract linker version number from stdin and turn into single number |
|
1212 |
|
{ |
|
|
1179 |
|
diff --git a/scripts/min-tool-version.sh b/scripts/min-tool-version.sh |
|
1180 |
|
index d22cf91212b0..d679e1e252b9 100755 |
|
1181 |
|
--- a/scripts/min-tool-version.sh |
|
1182 |
|
+++ b/scripts/min-tool-version.sh |
|
1183 |
|
@@ -22,7 +22,7 @@ gcc) |
|
1184 |
|
if [ "$SRCARCH" = arm64 ]; then |
|
1185 |
|
echo 5.1.0 |
|
1186 |
|
else |
|
1187 |
|
- echo 4.9.0 |
|
1188 |
|
+ echo 4.7.4 |
|
1189 |
|
fi |
|
1190 |
|
;; |
|
1191 |
|
icc) |
|
1192 |
|
diff --git a/include/uapi/linux/byteorder/little_endian.h b/include/uapi/linux/byteorder/little_endian.h |
|
1193 |
|
index 601c904fd5cd..226d82794e8e 100644 |
|
1194 |
|
--- a/include/uapi/linux/byteorder/little_endian.h |
|
1195 |
|
+++ b/include/uapi/linux/byteorder/little_endian.h |
|
1196 |
|
@@ -15,6 +15,7 @@ |
|
1197 |
|
#define __constant_htonl(x) ((__force __be32)___constant_swab32((x))) |
|
1198 |
|
#define __constant_ntohl(x) ___constant_swab32((__force __be32)(x)) |
|
1199 |
|
#define __constant_htons(x) ((__force __be16)___constant_swab16((x))) |
|
1200 |
|
+#define HTONS(x) __constant_htons(x) |
|
1201 |
|
#define __constant_ntohs(x) ___constant_swab16((__force __be16)(x)) |
|
1202 |
|
#define __constant_cpu_to_le64(x) ((__force __le64)(__u64)(x)) |
|
1203 |
|
#define __constant_le64_to_cpu(x) ((__force __u64)(__le64)(x)) |
|
1204 |
|
@@ -27,7 +28,9 @@ |
|
1205 |
|
#define __constant_cpu_to_be32(x) ((__force __be32)___constant_swab32((x))) |
|
1206 |
|
#define __constant_be32_to_cpu(x) ___constant_swab32((__force __u32)(__be32)(x)) |
|
1207 |
|
#define __constant_cpu_to_be16(x) ((__force __be16)___constant_swab16((x))) |
|
1208 |
|
+#define CPU_TO_BE16(x) __constant_cpu_to_be16(x) |
|
1209 |
|
#define __constant_be16_to_cpu(x) ___constant_swab16((__force __u16)(__be16)(x)) |
|
1210 |
|
+#define BE16_TO_CPU(x) __constant_be16_to_cpu(x) |
|
1211 |
|
#define __cpu_to_le64(x) ((__force __le64)(__u64)(x)) |
|
1212 |
|
#define __le64_to_cpu(x) ((__force __u64)(__le64)(x)) |
|
1213 |
|
#define __cpu_to_le32(x) ((__force __le32)(__u32)(x)) |
File builders/linux-amd/config changed (mode: 100644) (index 08287de..5bc2b9e) |
1 |
1 |
# |
# |
2 |
2 |
# Automatically generated file; DO NOT EDIT. |
# Automatically generated file; DO NOT EDIT. |
3 |
|
# Linux/x86_64 5.11.0 Kernel Configuration |
|
|
3 |
|
# Linux/x86_64 5.13.0 Kernel Configuration |
4 |
4 |
# |
# |
5 |
5 |
CONFIG_CC_VERSION_TEXT="x86_64-nyan2-linux-gnu-gcc (GCC) 4.7.4" |
CONFIG_CC_VERSION_TEXT="x86_64-nyan2-linux-gnu-gcc (GCC) 4.7.4" |
6 |
6 |
CONFIG_CC_IS_GCC=y |
CONFIG_CC_IS_GCC=y |
7 |
7 |
CONFIG_GCC_VERSION=40704 |
CONFIG_GCC_VERSION=40704 |
8 |
|
CONFIG_LD_VERSION=236010000 |
|
9 |
8 |
CONFIG_CLANG_VERSION=0 |
CONFIG_CLANG_VERSION=0 |
|
9 |
|
CONFIG_AS_IS_GNU=y |
|
10 |
|
CONFIG_AS_VERSION=23601 |
|
11 |
|
CONFIG_LD_IS_BFD=y |
|
12 |
|
CONFIG_LD_VERSION=23601 |
10 |
13 |
CONFIG_LLD_VERSION=0 |
CONFIG_LLD_VERSION=0 |
11 |
14 |
CONFIG_CC_HAS_ASM_GOTO=y |
CONFIG_CC_HAS_ASM_GOTO=y |
12 |
15 |
CONFIG_IRQ_WORK=y |
CONFIG_IRQ_WORK=y |
|
... |
... |
CONFIG_HZ_PERIODIC=y |
89 |
92 |
CONFIG_HIGH_RES_TIMERS=y |
CONFIG_HIGH_RES_TIMERS=y |
90 |
93 |
# end of Timers subsystem |
# end of Timers subsystem |
91 |
94 |
|
|
|
95 |
|
CONFIG_BPF=y |
|
96 |
|
CONFIG_HAVE_EBPF_JIT=y |
|
97 |
|
CONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y |
|
98 |
|
|
|
99 |
|
# |
|
100 |
|
# BPF subsystem |
|
101 |
|
# |
|
102 |
|
# CONFIG_BPF_SYSCALL is not set |
|
103 |
|
# CONFIG_BPF_JIT is not set |
|
104 |
|
# end of BPF subsystem |
|
105 |
|
|
92 |
106 |
# CONFIG_PREEMPT_NONE is not set |
# CONFIG_PREEMPT_NONE is not set |
93 |
107 |
# CONFIG_PREEMPT_VOLUNTARY is not set |
# CONFIG_PREEMPT_VOLUNTARY is not set |
94 |
108 |
CONFIG_PREEMPT=y |
CONFIG_PREEMPT=y |
95 |
109 |
CONFIG_PREEMPT_COUNT=y |
CONFIG_PREEMPT_COUNT=y |
96 |
110 |
CONFIG_PREEMPTION=y |
CONFIG_PREEMPTION=y |
|
111 |
|
CONFIG_PREEMPT_DYNAMIC=y |
97 |
112 |
|
|
98 |
113 |
# |
# |
99 |
114 |
# CPU/Task time and stats accounting |
# CPU/Task time and stats accounting |
|
... |
... |
CONFIG_SYSCTL=y |
166 |
181 |
CONFIG_HAVE_UID16=y |
CONFIG_HAVE_UID16=y |
167 |
182 |
CONFIG_SYSCTL_EXCEPTION_TRACE=y |
CONFIG_SYSCTL_EXCEPTION_TRACE=y |
168 |
183 |
CONFIG_HAVE_PCSPKR_PLATFORM=y |
CONFIG_HAVE_PCSPKR_PLATFORM=y |
169 |
|
CONFIG_BPF=y |
|
170 |
184 |
CONFIG_EXPERT=y |
CONFIG_EXPERT=y |
171 |
185 |
# CONFIG_UID16 is not set |
# CONFIG_UID16 is not set |
172 |
186 |
CONFIG_MULTIUSER=y |
CONFIG_MULTIUSER=y |
173 |
187 |
# CONFIG_SGETMASK_SYSCALL is not set |
# CONFIG_SGETMASK_SYSCALL is not set |
174 |
|
CONFIG_SYSFS_SYSCALL=y |
|
|
188 |
|
# CONFIG_SYSFS_SYSCALL is not set |
175 |
189 |
CONFIG_FHANDLE=y |
CONFIG_FHANDLE=y |
176 |
190 |
CONFIG_POSIX_TIMERS=y |
CONFIG_POSIX_TIMERS=y |
177 |
191 |
CONFIG_PRINTK=y |
CONFIG_PRINTK=y |
|
... |
... |
CONFIG_IO_URING=y |
192 |
206 |
CONFIG_ADVISE_SYSCALLS=y |
CONFIG_ADVISE_SYSCALLS=y |
193 |
207 |
CONFIG_MEMBARRIER=y |
CONFIG_MEMBARRIER=y |
194 |
208 |
# CONFIG_KALLSYMS is not set |
# CONFIG_KALLSYMS is not set |
195 |
|
# CONFIG_BPF_SYSCALL is not set |
|
196 |
|
CONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y |
|
197 |
209 |
# CONFIG_USERFAULTFD is not set |
# CONFIG_USERFAULTFD is not set |
198 |
210 |
CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y |
CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y |
199 |
211 |
CONFIG_KCMP=y |
CONFIG_KCMP=y |
|
... |
... |
CONFIG_GENERIC_BUG=y |
240 |
252 |
CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y |
CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y |
241 |
253 |
CONFIG_GENERIC_CALIBRATE_DELAY=y |
CONFIG_GENERIC_CALIBRATE_DELAY=y |
242 |
254 |
CONFIG_ARCH_HAS_CPU_RELAX=y |
CONFIG_ARCH_HAS_CPU_RELAX=y |
243 |
|
CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y |
|
244 |
255 |
CONFIG_ARCH_HAS_FILTER_PGPROT=y |
CONFIG_ARCH_HAS_FILTER_PGPROT=y |
245 |
256 |
CONFIG_HAVE_SETUP_PER_CPU_AREA=y |
CONFIG_HAVE_SETUP_PER_CPU_AREA=y |
246 |
257 |
CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y |
CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y |
|
... |
... |
CONFIG_CC_HAS_SANE_STACKPROTECTOR=y |
263 |
274 |
CONFIG_SMP=y |
CONFIG_SMP=y |
264 |
275 |
CONFIG_X86_FEATURE_NAMES=y |
CONFIG_X86_FEATURE_NAMES=y |
265 |
276 |
CONFIG_X86_X2APIC=y |
CONFIG_X86_X2APIC=y |
266 |
|
CONFIG_X86_MPPARSE=y |
|
|
277 |
|
# CONFIG_X86_MPPARSE is not set |
267 |
278 |
# CONFIG_GOLDFISH is not set |
# CONFIG_GOLDFISH is not set |
268 |
279 |
# CONFIG_RETPOLINE is not set |
# CONFIG_RETPOLINE is not set |
269 |
280 |
# CONFIG_X86_CPU_RESCTRL is not set |
# CONFIG_X86_CPU_RESCTRL is not set |
|
... |
... |
CONFIG_HAVE_LIVEPATCH=y |
380 |
391 |
# end of Processor type and features |
# end of Processor type and features |
381 |
392 |
|
|
382 |
393 |
CONFIG_ARCH_HAS_ADD_PAGES=y |
CONFIG_ARCH_HAS_ADD_PAGES=y |
383 |
|
CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y |
|
|
394 |
|
CONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y |
384 |
395 |
CONFIG_USE_PERCPU_NUMA_NODE_ID=y |
CONFIG_USE_PERCPU_NUMA_NODE_ID=y |
385 |
|
CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=y |
|
386 |
|
CONFIG_ARCH_ENABLE_THP_MIGRATION=y |
|
387 |
396 |
|
|
388 |
397 |
# |
# |
389 |
398 |
# Power management and ACPI options |
# Power management and ACPI options |
|
... |
... |
CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=y |
399 |
408 |
CONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT=y |
CONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT=y |
400 |
409 |
# CONFIG_ACPI_DEBUGGER is not set |
# CONFIG_ACPI_DEBUGGER is not set |
401 |
410 |
# CONFIG_ACPI_SPCR_TABLE is not set |
# CONFIG_ACPI_SPCR_TABLE is not set |
|
411 |
|
# CONFIG_ACPI_FPDT is not set |
402 |
412 |
CONFIG_ACPI_LPIT=y |
CONFIG_ACPI_LPIT=y |
403 |
413 |
# CONFIG_ACPI_REV_OVERRIDE_POSSIBLE is not set |
# CONFIG_ACPI_REV_OVERRIDE_POSSIBLE is not set |
404 |
414 |
# CONFIG_ACPI_EC_DEBUGFS is not set |
# CONFIG_ACPI_EC_DEBUGFS is not set |
|
... |
... |
CONFIG_HAVE_ACPI_APEI_NMI=y |
435 |
445 |
# CONFIG_ACPI_CONFIGFS is not set |
# CONFIG_ACPI_CONFIGFS is not set |
436 |
446 |
# CONFIG_PMIC_OPREGION is not set |
# CONFIG_PMIC_OPREGION is not set |
437 |
447 |
CONFIG_X86_PM_TIMER=y |
CONFIG_X86_PM_TIMER=y |
438 |
|
# CONFIG_SFI is not set |
|
439 |
448 |
|
|
440 |
449 |
# |
# |
441 |
450 |
# CPU Frequency scaling |
# CPU Frequency scaling |
|
... |
... |
CONFIG_AS_TPAUSE=y |
556 |
565 |
# |
# |
557 |
566 |
CONFIG_HOTPLUG_SMT=y |
CONFIG_HOTPLUG_SMT=y |
558 |
567 |
CONFIG_GENERIC_ENTRY=y |
CONFIG_GENERIC_ENTRY=y |
559 |
|
CONFIG_HAVE_OPROFILE=y |
|
560 |
|
CONFIG_OPROFILE_NMI_TIMER=y |
|
561 |
568 |
# CONFIG_KPROBES is not set |
# CONFIG_KPROBES is not set |
562 |
569 |
# CONFIG_JUMP_LABEL is not set |
# CONFIG_JUMP_LABEL is not set |
563 |
570 |
# CONFIG_STATIC_CALL_SELFTEST is not set |
# CONFIG_STATIC_CALL_SELFTEST is not set |
|
... |
... |
CONFIG_HAVE_ARCH_SECCOMP_FILTER=y |
602 |
609 |
# CONFIG_SECCOMP is not set |
# CONFIG_SECCOMP is not set |
603 |
610 |
CONFIG_HAVE_ARCH_STACKLEAK=y |
CONFIG_HAVE_ARCH_STACKLEAK=y |
604 |
611 |
CONFIG_HAVE_STACKPROTECTOR=y |
CONFIG_HAVE_STACKPROTECTOR=y |
605 |
|
CONFIG_STACKPROTECTOR=y |
|
|
612 |
|
# CONFIG_STACKPROTECTOR is not set |
|
613 |
|
CONFIG_ARCH_SUPPORTS_LTO_CLANG=y |
|
614 |
|
CONFIG_ARCH_SUPPORTS_LTO_CLANG_THIN=y |
|
615 |
|
CONFIG_LTO_NONE=y |
606 |
616 |
CONFIG_HAVE_ARCH_WITHIN_STACK_FRAMES=y |
CONFIG_HAVE_ARCH_WITHIN_STACK_FRAMES=y |
607 |
617 |
CONFIG_HAVE_CONTEXT_TRACKING=y |
CONFIG_HAVE_CONTEXT_TRACKING=y |
608 |
618 |
CONFIG_HAVE_CONTEXT_TRACKING_OFFSTACK=y |
CONFIG_HAVE_CONTEXT_TRACKING_OFFSTACK=y |
|
... |
... |
CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y |
617 |
627 |
CONFIG_HAVE_ARCH_SOFT_DIRTY=y |
CONFIG_HAVE_ARCH_SOFT_DIRTY=y |
618 |
628 |
CONFIG_HAVE_MOD_ARCH_SPECIFIC=y |
CONFIG_HAVE_MOD_ARCH_SPECIFIC=y |
619 |
629 |
CONFIG_MODULES_USE_ELF_RELA=y |
CONFIG_MODULES_USE_ELF_RELA=y |
|
630 |
|
CONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK=y |
|
631 |
|
CONFIG_HAVE_SOFTIRQ_ON_OWN_STACK=y |
620 |
632 |
CONFIG_ARCH_HAS_ELF_RANDOMIZE=y |
CONFIG_ARCH_HAS_ELF_RANDOMIZE=y |
621 |
633 |
CONFIG_HAVE_ARCH_MMAP_RND_BITS=y |
CONFIG_HAVE_ARCH_MMAP_RND_BITS=y |
622 |
634 |
CONFIG_HAVE_EXIT_THREAD=y |
CONFIG_HAVE_EXIT_THREAD=y |
|
... |
... |
CONFIG_COMPAT_OLD_SIGACTION=y |
630 |
642 |
CONFIG_COMPAT_32BIT_TIME=y |
CONFIG_COMPAT_32BIT_TIME=y |
631 |
643 |
CONFIG_HAVE_ARCH_VMAP_STACK=y |
CONFIG_HAVE_ARCH_VMAP_STACK=y |
632 |
644 |
# CONFIG_VMAP_STACK is not set |
# CONFIG_VMAP_STACK is not set |
|
645 |
|
CONFIG_HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET=y |
|
646 |
|
# CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT is not set |
633 |
647 |
CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y |
CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y |
634 |
648 |
CONFIG_STRICT_KERNEL_RWX=y |
CONFIG_STRICT_KERNEL_RWX=y |
635 |
649 |
CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y |
CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y |
|
... |
... |
CONFIG_HAVE_ARCH_PREL32_RELOCATIONS=y |
638 |
652 |
CONFIG_ARCH_HAS_MEM_ENCRYPT=y |
CONFIG_ARCH_HAS_MEM_ENCRYPT=y |
639 |
653 |
CONFIG_HAVE_STATIC_CALL=y |
CONFIG_HAVE_STATIC_CALL=y |
640 |
654 |
CONFIG_HAVE_STATIC_CALL_INLINE=y |
CONFIG_HAVE_STATIC_CALL_INLINE=y |
|
655 |
|
CONFIG_HAVE_PREEMPT_DYNAMIC=y |
641 |
656 |
CONFIG_ARCH_WANT_LD_ORPHAN_WARN=y |
CONFIG_ARCH_WANT_LD_ORPHAN_WARN=y |
642 |
657 |
CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y |
CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y |
|
658 |
|
CONFIG_ARCH_HAS_ELFCORE_COMPAT=y |
643 |
659 |
|
|
644 |
660 |
# |
# |
645 |
661 |
# GCOV-based kernel profiling |
# GCOV-based kernel profiling |
|
... |
... |
CONFIG_MODULE_FORCE_UNLOAD=y |
659 |
675 |
# CONFIG_MODVERSIONS is not set |
# CONFIG_MODVERSIONS is not set |
660 |
676 |
# CONFIG_MODULE_SRCVERSION_ALL is not set |
# CONFIG_MODULE_SRCVERSION_ALL is not set |
661 |
677 |
# CONFIG_MODULE_SIG is not set |
# CONFIG_MODULE_SIG is not set |
662 |
|
# CONFIG_MODULE_COMPRESS is not set |
|
|
678 |
|
CONFIG_MODULE_COMPRESS_NONE=y |
|
679 |
|
# CONFIG_MODULE_COMPRESS_GZIP is not set |
|
680 |
|
# CONFIG_MODULE_COMPRESS_XZ is not set |
|
681 |
|
# CONFIG_MODULE_COMPRESS_ZSTD is not set |
663 |
682 |
# CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set |
# CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set |
664 |
|
# CONFIG_UNUSED_SYMBOLS is not set |
|
|
683 |
|
CONFIG_MODPROBE_PATH="/sbin/modprobe" |
665 |
684 |
# CONFIG_TRIM_UNUSED_KSYMS is not set |
# CONFIG_TRIM_UNUSED_KSYMS is not set |
666 |
685 |
CONFIG_MODULES_TREE_LOOKUP=y |
CONFIG_MODULES_TREE_LOOKUP=y |
667 |
686 |
CONFIG_BLOCK=y |
CONFIG_BLOCK=y |
|
... |
... |
CONFIG_SPARSEMEM_EXTREME=y |
747 |
766 |
CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y |
CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y |
748 |
767 |
CONFIG_SPARSEMEM_VMEMMAP=y |
CONFIG_SPARSEMEM_VMEMMAP=y |
749 |
768 |
CONFIG_HAVE_FAST_GUP=y |
CONFIG_HAVE_FAST_GUP=y |
|
769 |
|
CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y |
750 |
770 |
# CONFIG_MEMORY_HOTPLUG is not set |
# CONFIG_MEMORY_HOTPLUG is not set |
751 |
771 |
CONFIG_SPLIT_PTLOCK_CPUS=4 |
CONFIG_SPLIT_PTLOCK_CPUS=4 |
|
772 |
|
CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=y |
752 |
773 |
CONFIG_COMPACTION=y |
CONFIG_COMPACTION=y |
753 |
774 |
# CONFIG_PAGE_REPORTING is not set |
# CONFIG_PAGE_REPORTING is not set |
754 |
775 |
CONFIG_MIGRATION=y |
CONFIG_MIGRATION=y |
|
776 |
|
CONFIG_ARCH_ENABLE_THP_MIGRATION=y |
755 |
777 |
CONFIG_PHYS_ADDR_T_64BIT=y |
CONFIG_PHYS_ADDR_T_64BIT=y |
756 |
778 |
CONFIG_VIRT_TO_BUS=y |
CONFIG_VIRT_TO_BUS=y |
757 |
779 |
CONFIG_MMU_NOTIFIER=y |
CONFIG_MMU_NOTIFIER=y |
|
... |
... |
CONFIG_THP_SWAP=y |
773 |
795 |
CONFIG_GENERIC_EARLY_IOREMAP=y |
CONFIG_GENERIC_EARLY_IOREMAP=y |
774 |
796 |
# CONFIG_DEFERRED_STRUCT_PAGE_INIT is not set |
# CONFIG_DEFERRED_STRUCT_PAGE_INIT is not set |
775 |
797 |
# CONFIG_IDLE_PAGE_TRACKING is not set |
# CONFIG_IDLE_PAGE_TRACKING is not set |
|
798 |
|
CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y |
776 |
799 |
CONFIG_ARCH_HAS_PTE_DEVMAP=y |
CONFIG_ARCH_HAS_PTE_DEVMAP=y |
777 |
800 |
CONFIG_HMM_MIRROR=y |
CONFIG_HMM_MIRROR=y |
778 |
801 |
# CONFIG_PERCPU_STATS is not set |
# CONFIG_PERCPU_STATS is not set |
|
... |
... |
CONFIG_IPV6=m |
841 |
864 |
# CONFIG_ATM is not set |
# CONFIG_ATM is not set |
842 |
865 |
# CONFIG_L2TP is not set |
# CONFIG_L2TP is not set |
843 |
866 |
# CONFIG_BRIDGE is not set |
# CONFIG_BRIDGE is not set |
844 |
|
CONFIG_HAVE_NET_DSA=y |
|
845 |
867 |
# CONFIG_NET_DSA is not set |
# CONFIG_NET_DSA is not set |
846 |
868 |
# CONFIG_VLAN_8021Q is not set |
# CONFIG_VLAN_8021Q is not set |
847 |
869 |
# CONFIG_DECNET is not set |
# CONFIG_DECNET is not set |
|
... |
... |
CONFIG_NET_SCH_FIFO=y |
917 |
939 |
# CONFIG_NET_L3_MASTER_DEV is not set |
# CONFIG_NET_L3_MASTER_DEV is not set |
918 |
940 |
# CONFIG_QRTR is not set |
# CONFIG_QRTR is not set |
919 |
941 |
# CONFIG_NET_NCSI is not set |
# CONFIG_NET_NCSI is not set |
|
942 |
|
CONFIG_PCPU_DEV_REFCNT=y |
920 |
943 |
CONFIG_RPS=y |
CONFIG_RPS=y |
921 |
944 |
CONFIG_RFS_ACCEL=y |
CONFIG_RFS_ACCEL=y |
|
945 |
|
CONFIG_SOCK_RX_QUEUE_MAPPING=y |
922 |
946 |
CONFIG_XPS=y |
CONFIG_XPS=y |
923 |
947 |
CONFIG_NET_RX_BUSY_POLL=y |
CONFIG_NET_RX_BUSY_POLL=y |
924 |
948 |
CONFIG_BQL=y |
CONFIG_BQL=y |
925 |
|
# CONFIG_BPF_JIT is not set |
|
926 |
949 |
CONFIG_NET_FLOW_LIMIT=y |
CONFIG_NET_FLOW_LIMIT=y |
927 |
950 |
|
|
928 |
951 |
# |
# |
|
... |
... |
CONFIG_NET_FLOW_LIMIT=y |
946 |
969 |
# CONFIG_PSAMPLE is not set |
# CONFIG_PSAMPLE is not set |
947 |
970 |
# CONFIG_NET_IFE is not set |
# CONFIG_NET_IFE is not set |
948 |
971 |
# CONFIG_LWTUNNEL is not set |
# CONFIG_LWTUNNEL is not set |
|
972 |
|
CONFIG_NET_SELFTESTS=m |
949 |
973 |
# CONFIG_FAILOVER is not set |
# CONFIG_FAILOVER is not set |
950 |
974 |
# CONFIG_ETHTOOL_NETLINK is not set |
# CONFIG_ETHTOOL_NETLINK is not set |
951 |
|
CONFIG_HAVE_EBPF_JIT=y |
|
952 |
975 |
|
|
953 |
976 |
# |
# |
954 |
977 |
# Device Drivers |
# Device Drivers |
|
... |
... |
CONFIG_PCIEASPM_DEFAULT=y |
966 |
989 |
# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set |
# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set |
967 |
990 |
# CONFIG_PCIEASPM_PERFORMANCE is not set |
# CONFIG_PCIEASPM_PERFORMANCE is not set |
968 |
991 |
# CONFIG_PCIE_PTM is not set |
# CONFIG_PCIE_PTM is not set |
969 |
|
# CONFIG_PCIE_BW is not set |
|
970 |
992 |
CONFIG_PCI_MSI=y |
CONFIG_PCI_MSI=y |
971 |
993 |
CONFIG_PCI_MSI_IRQ_DOMAIN=y |
CONFIG_PCI_MSI_IRQ_DOMAIN=y |
972 |
994 |
CONFIG_PCI_QUIRKS=y |
CONFIG_PCI_QUIRKS=y |
|
... |
... |
CONFIG_PCIE_BUS_PERFORMANCE=y |
1020 |
1042 |
# CONFIG_PCI_SW_SWITCHTEC is not set |
# CONFIG_PCI_SW_SWITCHTEC is not set |
1021 |
1043 |
# end of PCI switch controller drivers |
# end of PCI switch controller drivers |
1022 |
1044 |
|
|
|
1045 |
|
# CONFIG_CXL_BUS is not set |
1023 |
1046 |
# CONFIG_PCCARD is not set |
# CONFIG_PCCARD is not set |
1024 |
1047 |
# CONFIG_RAPIDIO is not set |
# CONFIG_RAPIDIO is not set |
1025 |
1048 |
|
|
|
... |
... |
CONFIG_PNPACPI=y |
1080 |
1103 |
# |
# |
1081 |
1104 |
# CONFIG_BLK_DEV_NVME is not set |
# CONFIG_BLK_DEV_NVME is not set |
1082 |
1105 |
# CONFIG_NVME_FC is not set |
# CONFIG_NVME_FC is not set |
|
1106 |
|
# CONFIG_NVME_TCP is not set |
1083 |
1107 |
# end of NVME Support |
# end of NVME Support |
1084 |
1108 |
|
|
1085 |
1109 |
# |
# |
|
... |
... |
CONFIG_PNPACPI=y |
1102 |
1126 |
# CONFIG_HMC6352 is not set |
# CONFIG_HMC6352 is not set |
1103 |
1127 |
# CONFIG_DS1682 is not set |
# CONFIG_DS1682 is not set |
1104 |
1128 |
# CONFIG_SRAM is not set |
# CONFIG_SRAM is not set |
|
1129 |
|
# CONFIG_DW_XDATA_PCIE is not set |
1105 |
1130 |
# CONFIG_PCI_ENDPOINT_TEST is not set |
# CONFIG_PCI_ENDPOINT_TEST is not set |
1106 |
1131 |
# CONFIG_XILINX_SDFEC is not set |
# CONFIG_XILINX_SDFEC is not set |
1107 |
|
# CONFIG_PVPANIC is not set |
|
1108 |
1132 |
# CONFIG_C2PORT is not set |
# CONFIG_C2PORT is not set |
1109 |
1133 |
|
|
1110 |
1134 |
# |
# |
|
... |
... |
CONFIG_PNPACPI=y |
1137 |
1161 |
# CONFIG_VMWARE_VMCI is not set |
# CONFIG_VMWARE_VMCI is not set |
1138 |
1162 |
# CONFIG_GENWQE is not set |
# CONFIG_GENWQE is not set |
1139 |
1163 |
# CONFIG_ECHO is not set |
# CONFIG_ECHO is not set |
|
1164 |
|
# CONFIG_BCM_VK is not set |
1140 |
1165 |
# CONFIG_MISC_ALCOR_PCI is not set |
# CONFIG_MISC_ALCOR_PCI is not set |
1141 |
1166 |
# CONFIG_MISC_RTSX_PCI is not set |
# CONFIG_MISC_RTSX_PCI is not set |
1142 |
1167 |
# CONFIG_MISC_RTSX_USB is not set |
# CONFIG_MISC_RTSX_USB is not set |
1143 |
1168 |
# CONFIG_HABANA_AI is not set |
# CONFIG_HABANA_AI is not set |
1144 |
1169 |
# CONFIG_UACCE is not set |
# CONFIG_UACCE is not set |
|
1170 |
|
# CONFIG_PVPANIC is not set |
1145 |
1171 |
# end of Misc devices |
# end of Misc devices |
1146 |
1172 |
|
|
1147 |
1173 |
CONFIG_HAVE_IDE=y |
CONFIG_HAVE_IDE=y |
|
... |
... |
CONFIG_SATA_MOBILE_LPM_POLICY=0 |
1214 |
1240 |
CONFIG_NETDEVICES=y |
CONFIG_NETDEVICES=y |
1215 |
1241 |
# CONFIG_NET_CORE is not set |
# CONFIG_NET_CORE is not set |
1216 |
1242 |
# CONFIG_ARCNET is not set |
# CONFIG_ARCNET is not set |
1217 |
|
|
|
1218 |
|
# |
|
1219 |
|
# Distributed Switch Architecture drivers |
|
1220 |
|
# |
|
1221 |
|
# end of Distributed Switch Architecture drivers |
|
1222 |
|
|
|
1223 |
1243 |
CONFIG_ETHERNET=y |
CONFIG_ETHERNET=y |
1224 |
1244 |
# CONFIG_NET_VENDOR_3COM is not set |
# CONFIG_NET_VENDOR_3COM is not set |
1225 |
1245 |
# CONFIG_NET_VENDOR_ADAPTEC is not set |
# CONFIG_NET_VENDOR_ADAPTEC is not set |
|
... |
... |
CONFIG_ETHERNET=y |
1232 |
1252 |
# CONFIG_NET_VENDOR_AQUANTIA is not set |
# CONFIG_NET_VENDOR_AQUANTIA is not set |
1233 |
1253 |
# CONFIG_NET_VENDOR_ARC is not set |
# CONFIG_NET_VENDOR_ARC is not set |
1234 |
1254 |
# CONFIG_NET_VENDOR_ATHEROS is not set |
# CONFIG_NET_VENDOR_ATHEROS is not set |
1235 |
|
# CONFIG_NET_VENDOR_AURORA is not set |
|
1236 |
1255 |
# CONFIG_NET_VENDOR_BROADCOM is not set |
# CONFIG_NET_VENDOR_BROADCOM is not set |
1237 |
1256 |
# CONFIG_NET_VENDOR_BROCADE is not set |
# CONFIG_NET_VENDOR_BROCADE is not set |
1238 |
1257 |
# CONFIG_NET_VENDOR_CADENCE is not set |
# CONFIG_NET_VENDOR_CADENCE is not set |
|
... |
... |
CONFIG_ETHERNET=y |
1249 |
1268 |
# CONFIG_NET_VENDOR_GOOGLE is not set |
# CONFIG_NET_VENDOR_GOOGLE is not set |
1250 |
1269 |
# CONFIG_NET_VENDOR_HUAWEI is not set |
# CONFIG_NET_VENDOR_HUAWEI is not set |
1251 |
1270 |
# CONFIG_NET_VENDOR_INTEL is not set |
# CONFIG_NET_VENDOR_INTEL is not set |
|
1271 |
|
# CONFIG_NET_VENDOR_MICROSOFT is not set |
1252 |
1272 |
# CONFIG_JME is not set |
# CONFIG_JME is not set |
1253 |
1273 |
# CONFIG_NET_VENDOR_MARVELL is not set |
# CONFIG_NET_VENDOR_MARVELL is not set |
1254 |
1274 |
# CONFIG_NET_VENDOR_MELLANOX is not set |
# CONFIG_NET_VENDOR_MELLANOX is not set |
|
... |
... |
CONFIG_PHYLIB=m |
1318 |
1338 |
# CONFIG_LSI_ET1011C_PHY is not set |
# CONFIG_LSI_ET1011C_PHY is not set |
1319 |
1339 |
# CONFIG_MARVELL_PHY is not set |
# CONFIG_MARVELL_PHY is not set |
1320 |
1340 |
# CONFIG_MARVELL_10G_PHY is not set |
# CONFIG_MARVELL_10G_PHY is not set |
|
1341 |
|
# CONFIG_MARVELL_88X2222_PHY is not set |
1321 |
1342 |
# CONFIG_MICREL_PHY is not set |
# CONFIG_MICREL_PHY is not set |
1322 |
1343 |
# CONFIG_MICROCHIP_PHY is not set |
# CONFIG_MICROCHIP_PHY is not set |
1323 |
1344 |
# CONFIG_MICROCHIP_T1_PHY is not set |
# CONFIG_MICROCHIP_T1_PHY is not set |
1324 |
1345 |
# CONFIG_MICROSEMI_PHY is not set |
# CONFIG_MICROSEMI_PHY is not set |
1325 |
1346 |
# CONFIG_NATIONAL_PHY is not set |
# CONFIG_NATIONAL_PHY is not set |
|
1347 |
|
# CONFIG_NXP_C45_TJA11XX_PHY is not set |
1326 |
1348 |
# CONFIG_NXP_TJA11XX_PHY is not set |
# CONFIG_NXP_TJA11XX_PHY is not set |
1327 |
1349 |
# CONFIG_QSEMI_PHY is not set |
# CONFIG_QSEMI_PHY is not set |
1328 |
1350 |
CONFIG_REALTEK_PHY=m |
CONFIG_REALTEK_PHY=m |
|
... |
... |
CONFIG_MDIO_DEVRES=m |
1366 |
1388 |
# CONFIG_USB_NET_DRIVERS is not set |
# CONFIG_USB_NET_DRIVERS is not set |
1367 |
1389 |
# CONFIG_WLAN is not set |
# CONFIG_WLAN is not set |
1368 |
1390 |
# CONFIG_WAN is not set |
# CONFIG_WAN is not set |
|
1391 |
|
# CONFIG_WWAN is not set |
1369 |
1392 |
# CONFIG_VMXNET3 is not set |
# CONFIG_VMXNET3 is not set |
1370 |
1393 |
# CONFIG_FUJITSU_ES is not set |
# CONFIG_FUJITSU_ES is not set |
1371 |
1394 |
# CONFIG_NET_FAILOVER is not set |
# CONFIG_NET_FAILOVER is not set |
|
... |
... |
CONFIG_INPUT_UINPUT=m |
1442 |
1465 |
# CONFIG_INPUT_ADXL34X is not set |
# CONFIG_INPUT_ADXL34X is not set |
1443 |
1466 |
# CONFIG_INPUT_IMS_PCU is not set |
# CONFIG_INPUT_IMS_PCU is not set |
1444 |
1467 |
# CONFIG_INPUT_IQS269A is not set |
# CONFIG_INPUT_IQS269A is not set |
|
1468 |
|
# CONFIG_INPUT_IQS626A is not set |
1445 |
1469 |
# CONFIG_INPUT_CMA3000 is not set |
# CONFIG_INPUT_CMA3000 is not set |
1446 |
1470 |
# CONFIG_INPUT_DRV2665_HAPTICS is not set |
# CONFIG_INPUT_DRV2665_HAPTICS is not set |
1447 |
1471 |
# CONFIG_INPUT_DRV2667_HAPTICS is not set |
# CONFIG_INPUT_DRV2667_HAPTICS is not set |
|
... |
... |
CONFIG_UNIX98_PTYS=y |
1496 |
1520 |
# CONFIG_N_GSM is not set |
# CONFIG_N_GSM is not set |
1497 |
1521 |
# CONFIG_NOZOMI is not set |
# CONFIG_NOZOMI is not set |
1498 |
1522 |
# CONFIG_NULL_TTY is not set |
# CONFIG_NULL_TTY is not set |
1499 |
|
# CONFIG_TRACE_SINK is not set |
|
1500 |
1523 |
# CONFIG_SERIAL_DEV_BUS is not set |
# CONFIG_SERIAL_DEV_BUS is not set |
1501 |
1524 |
# CONFIG_TTY_PRINTK is not set |
# CONFIG_TTY_PRINTK is not set |
1502 |
1525 |
# CONFIG_VIRTIO_CONSOLE is not set |
# CONFIG_VIRTIO_CONSOLE is not set |
|
... |
... |
CONFIG_UNIX98_PTYS=y |
1505 |
1528 |
# CONFIG_APPLICOM is not set |
# CONFIG_APPLICOM is not set |
1506 |
1529 |
# CONFIG_MWAVE is not set |
# CONFIG_MWAVE is not set |
1507 |
1530 |
# CONFIG_DEVMEM is not set |
# CONFIG_DEVMEM is not set |
1508 |
|
# CONFIG_DEVKMEM is not set |
|
1509 |
1531 |
# CONFIG_NVRAM is not set |
# CONFIG_NVRAM is not set |
1510 |
1532 |
# CONFIG_RAW_DRIVER is not set |
# CONFIG_RAW_DRIVER is not set |
1511 |
1533 |
# CONFIG_DEVPORT is not set |
# CONFIG_DEVPORT is not set |
|
... |
... |
CONFIG_I2C_ALGOBIT=m |
1574 |
1596 |
# External I2C/SMBus adapter drivers |
# External I2C/SMBus adapter drivers |
1575 |
1597 |
# |
# |
1576 |
1598 |
# CONFIG_I2C_DIOLAN_U2C is not set |
# CONFIG_I2C_DIOLAN_U2C is not set |
|
1599 |
|
# CONFIG_I2C_CP2615 is not set |
1577 |
1600 |
# CONFIG_I2C_ROBOTFUZZ_OSIF is not set |
# CONFIG_I2C_ROBOTFUZZ_OSIF is not set |
1578 |
1601 |
# CONFIG_I2C_TAOS_EVM is not set |
# CONFIG_I2C_TAOS_EVM is not set |
1579 |
1602 |
# CONFIG_I2C_TINY_USB is not set |
# CONFIG_I2C_TINY_USB is not set |
|
... |
... |
CONFIG_POWER_SUPPLY=y |
1653 |
1676 |
# CONFIG_BATTERY_MAX17042 is not set |
# CONFIG_BATTERY_MAX17042 is not set |
1654 |
1677 |
# CONFIG_CHARGER_MAX8903 is not set |
# CONFIG_CHARGER_MAX8903 is not set |
1655 |
1678 |
# CONFIG_CHARGER_LP8727 is not set |
# CONFIG_CHARGER_LP8727 is not set |
|
1679 |
|
# CONFIG_CHARGER_LTC4162L is not set |
1656 |
1680 |
# CONFIG_CHARGER_BQ2415X is not set |
# CONFIG_CHARGER_BQ2415X is not set |
1657 |
1681 |
# CONFIG_CHARGER_SMB347 is not set |
# CONFIG_CHARGER_SMB347 is not set |
1658 |
1682 |
# CONFIG_BATTERY_GAUGE_LTC2941 is not set |
# CONFIG_BATTERY_GAUGE_LTC2941 is not set |
|
1683 |
|
# CONFIG_BATTERY_GOLDFISH is not set |
1659 |
1684 |
# CONFIG_CHARGER_BD99954 is not set |
# CONFIG_CHARGER_BD99954 is not set |
1660 |
1685 |
CONFIG_HWMON=m |
CONFIG_HWMON=m |
1661 |
1686 |
# CONFIG_HWMON_DEBUG_CHIP is not set |
# CONFIG_HWMON_DEBUG_CHIP is not set |
|
... |
... |
CONFIG_HWMON=m |
1679 |
1704 |
# CONFIG_SENSORS_ADT7462 is not set |
# CONFIG_SENSORS_ADT7462 is not set |
1680 |
1705 |
# CONFIG_SENSORS_ADT7470 is not set |
# CONFIG_SENSORS_ADT7470 is not set |
1681 |
1706 |
# CONFIG_SENSORS_ADT7475 is not set |
# CONFIG_SENSORS_ADT7475 is not set |
|
1707 |
|
# CONFIG_SENSORS_AHT10 is not set |
1682 |
1708 |
# CONFIG_SENSORS_AS370 is not set |
# CONFIG_SENSORS_AS370 is not set |
1683 |
1709 |
# CONFIG_SENSORS_ASC7621 is not set |
# CONFIG_SENSORS_ASC7621 is not set |
1684 |
1710 |
# CONFIG_SENSORS_AXI_FAN_CONTROL is not set |
# CONFIG_SENSORS_AXI_FAN_CONTROL is not set |
1685 |
1711 |
# CONFIG_SENSORS_K8TEMP is not set |
# CONFIG_SENSORS_K8TEMP is not set |
1686 |
1712 |
# CONFIG_SENSORS_K10TEMP is not set |
# CONFIG_SENSORS_K10TEMP is not set |
1687 |
1713 |
# CONFIG_SENSORS_FAM15H_POWER is not set |
# CONFIG_SENSORS_FAM15H_POWER is not set |
1688 |
|
# CONFIG_SENSORS_AMD_ENERGY is not set |
|
1689 |
1714 |
# CONFIG_SENSORS_APPLESMC is not set |
# CONFIG_SENSORS_APPLESMC is not set |
1690 |
1715 |
# CONFIG_SENSORS_ASB100 is not set |
# CONFIG_SENSORS_ASB100 is not set |
1691 |
1716 |
# CONFIG_SENSORS_ASPEED is not set |
# CONFIG_SENSORS_ASPEED is not set |
|
... |
... |
CONFIG_HWMON=m |
1735 |
1760 |
# CONFIG_SENSORS_MAX31790 is not set |
# CONFIG_SENSORS_MAX31790 is not set |
1736 |
1761 |
# CONFIG_SENSORS_MCP3021 is not set |
# CONFIG_SENSORS_MCP3021 is not set |
1737 |
1762 |
# CONFIG_SENSORS_TC654 is not set |
# CONFIG_SENSORS_TC654 is not set |
|
1763 |
|
# CONFIG_SENSORS_TPS23861 is not set |
1738 |
1764 |
# CONFIG_SENSORS_MR75203 is not set |
# CONFIG_SENSORS_MR75203 is not set |
1739 |
1765 |
# CONFIG_SENSORS_LM63 is not set |
# CONFIG_SENSORS_LM63 is not set |
1740 |
1766 |
# CONFIG_SENSORS_LM73 is not set |
# CONFIG_SENSORS_LM73 is not set |
|
... |
... |
CONFIG_HWMON=m |
1758 |
1784 |
# CONFIG_SENSORS_NCT6775 is not set |
# CONFIG_SENSORS_NCT6775 is not set |
1759 |
1785 |
# CONFIG_SENSORS_NCT7802 is not set |
# CONFIG_SENSORS_NCT7802 is not set |
1760 |
1786 |
# CONFIG_SENSORS_NPCM7XX is not set |
# CONFIG_SENSORS_NPCM7XX is not set |
|
1787 |
|
# CONFIG_SENSORS_NZXT_KRAKEN2 is not set |
1761 |
1788 |
# CONFIG_SENSORS_PCF8591 is not set |
# CONFIG_SENSORS_PCF8591 is not set |
1762 |
1789 |
# CONFIG_PMBUS is not set |
# CONFIG_PMBUS is not set |
1763 |
1790 |
# CONFIG_SENSORS_SBTSI is not set |
# CONFIG_SENSORS_SBTSI is not set |
|
... |
... |
CONFIG_THERMAL_GOV_STEP_WISE=y |
1834 |
1861 |
# end of ACPI INT340X thermal drivers |
# end of ACPI INT340X thermal drivers |
1835 |
1862 |
|
|
1836 |
1863 |
# CONFIG_INTEL_PCH_THERMAL is not set |
# CONFIG_INTEL_PCH_THERMAL is not set |
|
1864 |
|
# CONFIG_INTEL_TCC_COOLING is not set |
1837 |
1865 |
# end of Intel thermal drivers |
# end of Intel thermal drivers |
1838 |
1866 |
|
|
1839 |
1867 |
# CONFIG_WATCHDOG is not set |
# CONFIG_WATCHDOG is not set |
|
... |
... |
CONFIG_BCMA_POSSIBLE=y |
1881 |
1909 |
# CONFIG_MFD_SI476X_CORE is not set |
# CONFIG_MFD_SI476X_CORE is not set |
1882 |
1910 |
# CONFIG_MFD_SM501 is not set |
# CONFIG_MFD_SM501 is not set |
1883 |
1911 |
# CONFIG_MFD_SKY81452 is not set |
# CONFIG_MFD_SKY81452 is not set |
1884 |
|
# CONFIG_ABX500_CORE is not set |
|
1885 |
1912 |
# CONFIG_MFD_SYSCON is not set |
# CONFIG_MFD_SYSCON is not set |
1886 |
1913 |
# CONFIG_MFD_TI_AM335X_TSCADC is not set |
# CONFIG_MFD_TI_AM335X_TSCADC is not set |
1887 |
1914 |
# CONFIG_MFD_LP3943 is not set |
# CONFIG_MFD_LP3943 is not set |
|
... |
... |
CONFIG_BCMA_POSSIBLE=y |
1897 |
1924 |
# CONFIG_MFD_VX855 is not set |
# CONFIG_MFD_VX855 is not set |
1898 |
1925 |
# CONFIG_MFD_ARIZONA_I2C is not set |
# CONFIG_MFD_ARIZONA_I2C is not set |
1899 |
1926 |
# CONFIG_MFD_WM8994 is not set |
# CONFIG_MFD_WM8994 is not set |
|
1927 |
|
# CONFIG_MFD_ATC260X_I2C is not set |
1900 |
1928 |
# end of Multifunction device drivers |
# end of Multifunction device drivers |
1901 |
1929 |
|
|
1902 |
1930 |
# CONFIG_REGULATOR is not set |
# CONFIG_REGULATOR is not set |
|
... |
... |
CONFIG_MEDIA_ATTACH=y |
2158 |
2186 |
# CONFIG_VIDEO_NOON010PC30 is not set |
# CONFIG_VIDEO_NOON010PC30 is not set |
2159 |
2187 |
# CONFIG_VIDEO_M5MOLS is not set |
# CONFIG_VIDEO_M5MOLS is not set |
2160 |
2188 |
# CONFIG_VIDEO_RDACM20 is not set |
# CONFIG_VIDEO_RDACM20 is not set |
|
2189 |
|
# CONFIG_VIDEO_RDACM21 is not set |
2161 |
2190 |
# CONFIG_VIDEO_RJ54N1 is not set |
# CONFIG_VIDEO_RJ54N1 is not set |
2162 |
2191 |
# CONFIG_VIDEO_S5K6AA is not set |
# CONFIG_VIDEO_S5K6AA is not set |
2163 |
2192 |
# CONFIG_VIDEO_S5K6A3 is not set |
# CONFIG_VIDEO_S5K6A3 is not set |
|
... |
... |
CONFIG_MEDIA_TUNER=m |
2335 |
2364 |
# CONFIG_DVB_AU8522_DTV is not set |
# CONFIG_DVB_AU8522_DTV is not set |
2336 |
2365 |
# CONFIG_DVB_AU8522_V4L is not set |
# CONFIG_DVB_AU8522_V4L is not set |
2337 |
2366 |
# CONFIG_DVB_S5H1411 is not set |
# CONFIG_DVB_S5H1411 is not set |
|
2367 |
|
# CONFIG_DVB_MXL692 is not set |
2338 |
2368 |
|
|
2339 |
2369 |
# |
# |
2340 |
2370 |
# ISDB-T (terrestrial) frontends |
# ISDB-T (terrestrial) frontends |
|
... |
... |
CONFIG_DRM_AMD_DC=y |
2443 |
2473 |
CONFIG_DRM_AMD_DC_DCN=y |
CONFIG_DRM_AMD_DC_DCN=y |
2444 |
2474 |
# CONFIG_DRM_AMD_DC_HDCP is not set |
# CONFIG_DRM_AMD_DC_HDCP is not set |
2445 |
2475 |
# CONFIG_DRM_AMD_DC_SI is not set |
# CONFIG_DRM_AMD_DC_SI is not set |
2446 |
|
# CONFIG_DRM_AMD_DC_DCN3_1 is not set |
|
2447 |
2476 |
# end of Display Engine Configuration |
# end of Display Engine Configuration |
2448 |
2477 |
|
|
2449 |
2478 |
# CONFIG_HSA_AMD is not set |
# CONFIG_HSA_AMD is not set |
|
... |
... |
CONFIG_DRM_PANEL_BRIDGE=y |
2477 |
2506 |
# CONFIG_DRM_ETNAVIV is not set |
# CONFIG_DRM_ETNAVIV is not set |
2478 |
2507 |
# CONFIG_DRM_CIRRUS_QEMU is not set |
# CONFIG_DRM_CIRRUS_QEMU is not set |
2479 |
2508 |
# CONFIG_DRM_GM12U320 is not set |
# CONFIG_DRM_GM12U320 is not set |
|
2509 |
|
# CONFIG_DRM_SIMPLEDRM is not set |
2480 |
2510 |
# CONFIG_DRM_VBOXVIDEO is not set |
# CONFIG_DRM_VBOXVIDEO is not set |
|
2511 |
|
# CONFIG_DRM_GUD is not set |
2481 |
2512 |
# CONFIG_DRM_LEGACY is not set |
# CONFIG_DRM_LEGACY is not set |
2482 |
2513 |
CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=m |
CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=m |
2483 |
2514 |
|
|
|
... |
... |
CONFIG_SND_VERBOSE_PROCFS=y |
2595 |
2626 |
# CONFIG_SND_DEBUG is not set |
# CONFIG_SND_DEBUG is not set |
2596 |
2627 |
CONFIG_SND_VMASTER=y |
CONFIG_SND_VMASTER=y |
2597 |
2628 |
CONFIG_SND_DMA_SGBUF=y |
CONFIG_SND_DMA_SGBUF=y |
|
2629 |
|
CONFIG_SND_CTL_LED=m |
2598 |
2630 |
# CONFIG_SND_SEQUENCER is not set |
# CONFIG_SND_SEQUENCER is not set |
2599 |
2631 |
# CONFIG_SND_DRIVERS is not set |
# CONFIG_SND_DRIVERS is not set |
2600 |
2632 |
CONFIG_SND_PCI=y |
CONFIG_SND_PCI=y |
|
... |
... |
CONFIG_SND_HDA_GENERIC=m |
2679 |
2711 |
|
|
2680 |
2712 |
CONFIG_SND_HDA_CORE=m |
CONFIG_SND_HDA_CORE=m |
2681 |
2713 |
CONFIG_SND_HDA_COMPONENT=y |
CONFIG_SND_HDA_COMPONENT=y |
2682 |
|
CONFIG_SND_HDA_PREALLOC_SIZE=2048 |
|
|
2714 |
|
CONFIG_SND_HDA_PREALLOC_SIZE=0 |
2683 |
2715 |
CONFIG_SND_INTEL_NHLT=y |
CONFIG_SND_INTEL_NHLT=y |
2684 |
2716 |
CONFIG_SND_INTEL_DSP_CONFIG=m |
CONFIG_SND_INTEL_DSP_CONFIG=m |
|
2717 |
|
CONFIG_SND_INTEL_SOUNDWIRE_ACPI=m |
2685 |
2718 |
CONFIG_SND_USB=y |
CONFIG_SND_USB=y |
2686 |
2719 |
CONFIG_SND_USB_AUDIO=m |
CONFIG_SND_USB_AUDIO=m |
2687 |
2720 |
# CONFIG_SND_USB_UA101 is not set |
# CONFIG_SND_USB_UA101 is not set |
|
... |
... |
CONFIG_HID_GENERIC=m |
2735 |
2768 |
# CONFIG_HID_ELECOM is not set |
# CONFIG_HID_ELECOM is not set |
2736 |
2769 |
# CONFIG_HID_ELO is not set |
# CONFIG_HID_ELO is not set |
2737 |
2770 |
# CONFIG_HID_EZKEY is not set |
# CONFIG_HID_EZKEY is not set |
|
2771 |
|
# CONFIG_HID_FT260 is not set |
2738 |
2772 |
# CONFIG_HID_GEMBIRD is not set |
# CONFIG_HID_GEMBIRD is not set |
2739 |
2773 |
# CONFIG_HID_GFRM is not set |
# CONFIG_HID_GFRM is not set |
2740 |
2774 |
# CONFIG_HID_GLORIOUS is not set |
# CONFIG_HID_GLORIOUS is not set |
|
... |
... |
CONFIG_HID_GENERIC=m |
2771 |
2805 |
# CONFIG_HID_PETALYNX is not set |
# CONFIG_HID_PETALYNX is not set |
2772 |
2806 |
# CONFIG_HID_PICOLCD is not set |
# CONFIG_HID_PICOLCD is not set |
2773 |
2807 |
# CONFIG_HID_PLANTRONICS is not set |
# CONFIG_HID_PLANTRONICS is not set |
|
2808 |
|
# CONFIG_HID_PLAYSTATION is not set |
2774 |
2809 |
# CONFIG_HID_PRIMAX is not set |
# CONFIG_HID_PRIMAX is not set |
2775 |
2810 |
# CONFIG_HID_RETRODE is not set |
# CONFIG_HID_RETRODE is not set |
2776 |
2811 |
# CONFIG_HID_ROCCAT is not set |
# CONFIG_HID_ROCCAT is not set |
2777 |
2812 |
# CONFIG_HID_SAITEK is not set |
# CONFIG_HID_SAITEK is not set |
2778 |
2813 |
# CONFIG_HID_SAMSUNG is not set |
# CONFIG_HID_SAMSUNG is not set |
|
2814 |
|
# CONFIG_HID_SEMITEK is not set |
2779 |
2815 |
# CONFIG_HID_SONY is not set |
# CONFIG_HID_SONY is not set |
2780 |
2816 |
# CONFIG_HID_SPEEDLINK is not set |
# CONFIG_HID_SPEEDLINK is not set |
2781 |
2817 |
# CONFIG_HID_STEAM is not set |
# CONFIG_HID_STEAM is not set |
|
... |
... |
CONFIG_USB_HIDDEV=y |
2816 |
2852 |
# |
# |
2817 |
2853 |
# I2C HID support |
# I2C HID support |
2818 |
2854 |
# |
# |
2819 |
|
# CONFIG_I2C_HID is not set |
|
|
2855 |
|
# CONFIG_I2C_HID_ACPI is not set |
2820 |
2856 |
# end of I2C HID support |
# end of I2C HID support |
2821 |
2857 |
|
|
2822 |
2858 |
# |
# |
|
... |
... |
CONFIG_USB_UAS=m |
2918 |
2954 |
# CONFIG_USB_MDC800 is not set |
# CONFIG_USB_MDC800 is not set |
2919 |
2955 |
# CONFIG_USB_MICROTEK is not set |
# CONFIG_USB_MICROTEK is not set |
2920 |
2956 |
# CONFIG_USBIP_CORE is not set |
# CONFIG_USBIP_CORE is not set |
2921 |
|
# CONFIG_USB_CDNS3 is not set |
|
|
2957 |
|
# CONFIG_USB_CDNS_SUPPORT is not set |
2922 |
2958 |
# CONFIG_USB_MUSB_HDRC is not set |
# CONFIG_USB_MUSB_HDRC is not set |
2923 |
2959 |
# CONFIG_USB_DWC3 is not set |
# CONFIG_USB_DWC3 is not set |
2924 |
2960 |
# CONFIG_USB_DWC2 is not set |
# CONFIG_USB_DWC2 is not set |
|
... |
... |
CONFIG_LEDS_TRIGGERS=y |
3030 |
3066 |
# CONFIG_LEDS_TRIGGER_NETDEV is not set |
# CONFIG_LEDS_TRIGGER_NETDEV is not set |
3031 |
3067 |
# CONFIG_LEDS_TRIGGER_PATTERN is not set |
# CONFIG_LEDS_TRIGGER_PATTERN is not set |
3032 |
3068 |
CONFIG_LEDS_TRIGGER_AUDIO=m |
CONFIG_LEDS_TRIGGER_AUDIO=m |
|
3069 |
|
# CONFIG_LEDS_TRIGGER_TTY is not set |
3033 |
3070 |
# CONFIG_ACCESSIBILITY is not set |
# CONFIG_ACCESSIBILITY is not set |
3034 |
3071 |
# CONFIG_INFINIBAND is not set |
# CONFIG_INFINIBAND is not set |
3035 |
3072 |
CONFIG_EDAC_ATOMIC_SCRUB=y |
CONFIG_EDAC_ATOMIC_SCRUB=y |
|
... |
... |
CONFIG_RTC_DRV_CMOS=m |
3123 |
3160 |
# |
# |
3124 |
3161 |
# HID Sensor RTC drivers |
# HID Sensor RTC drivers |
3125 |
3162 |
# |
# |
|
3163 |
|
# CONFIG_RTC_DRV_GOLDFISH is not set |
3126 |
3164 |
# CONFIG_DMADEVICES is not set |
# CONFIG_DMADEVICES is not set |
3127 |
3165 |
|
|
3128 |
3166 |
# |
# |
|
... |
... |
CONFIG_SYNC_FILE=y |
3150 |
3188 |
# end of Microsoft Hyper-V guest support |
# end of Microsoft Hyper-V guest support |
3151 |
3189 |
|
|
3152 |
3190 |
# CONFIG_GREYBUS is not set |
# CONFIG_GREYBUS is not set |
|
3191 |
|
# CONFIG_COMEDI is not set |
3153 |
3192 |
# CONFIG_STAGING is not set |
# CONFIG_STAGING is not set |
3154 |
3193 |
# CONFIG_X86_PLATFORM_DEVICES is not set |
# CONFIG_X86_PLATFORM_DEVICES is not set |
3155 |
3194 |
CONFIG_PMC_ATOM=y |
CONFIG_PMC_ATOM=y |
|
... |
... |
CONFIG_COMMON_CLK=y |
3166 |
3205 |
# CONFIG_COMMON_CLK_SI544 is not set |
# CONFIG_COMMON_CLK_SI544 is not set |
3167 |
3206 |
# CONFIG_COMMON_CLK_CDCE706 is not set |
# CONFIG_COMMON_CLK_CDCE706 is not set |
3168 |
3207 |
# CONFIG_COMMON_CLK_CS2000_CP is not set |
# CONFIG_COMMON_CLK_CS2000_CP is not set |
|
3208 |
|
# CONFIG_XILINX_VCU is not set |
3169 |
3209 |
# CONFIG_HWSPINLOCK is not set |
# CONFIG_HWSPINLOCK is not set |
3170 |
3210 |
|
|
3171 |
3211 |
# |
# |
|
... |
... |
CONFIG_IOMMU_SUPPORT=y |
3183 |
3223 |
# |
# |
3184 |
3224 |
# Generic IOMMU Pagetable Support |
# Generic IOMMU Pagetable Support |
3185 |
3225 |
# |
# |
|
3226 |
|
CONFIG_IOMMU_IO_PGTABLE=y |
3186 |
3227 |
# end of Generic IOMMU Pagetable Support |
# end of Generic IOMMU Pagetable Support |
3187 |
3228 |
|
|
3188 |
3229 |
# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set |
# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set |
|
... |
... |
CONFIG_IRQ_REMAP=y |
3246 |
3287 |
# |
# |
3247 |
3288 |
# Xilinx SoC drivers |
# Xilinx SoC drivers |
3248 |
3289 |
# |
# |
3249 |
|
# CONFIG_XILINX_VCU is not set |
|
3250 |
3290 |
# end of Xilinx SoC drivers |
# end of Xilinx SoC drivers |
3251 |
3291 |
# end of SOC (System On Chip) specific Drivers |
# end of SOC (System On Chip) specific Drivers |
3252 |
3292 |
|
|
|
... |
... |
CONFIG_IRQ_REMAP=y |
3297 |
3337 |
# CONFIG_DAX is not set |
# CONFIG_DAX is not set |
3298 |
3338 |
CONFIG_NVMEM=y |
CONFIG_NVMEM=y |
3299 |
3339 |
# CONFIG_NVMEM_SYSFS is not set |
# CONFIG_NVMEM_SYSFS is not set |
|
3340 |
|
# CONFIG_NVMEM_RMEM is not set |
3300 |
3341 |
|
|
3301 |
3342 |
# |
# |
3302 |
3343 |
# HW tracing support |
# HW tracing support |
|
... |
... |
CONFIG_CRYPTO_HASH2=m |
3514 |
3555 |
# CONFIG_CRYPTO_RSA is not set |
# CONFIG_CRYPTO_RSA is not set |
3515 |
3556 |
# CONFIG_CRYPTO_DH is not set |
# CONFIG_CRYPTO_DH is not set |
3516 |
3557 |
# CONFIG_CRYPTO_ECDH is not set |
# CONFIG_CRYPTO_ECDH is not set |
|
3558 |
|
# CONFIG_CRYPTO_ECDSA is not set |
3517 |
3559 |
# CONFIG_CRYPTO_ECRDSA is not set |
# CONFIG_CRYPTO_ECRDSA is not set |
3518 |
3560 |
# CONFIG_CRYPTO_SM2 is not set |
# CONFIG_CRYPTO_SM2 is not set |
3519 |
3561 |
# CONFIG_CRYPTO_CURVE25519 is not set |
# CONFIG_CRYPTO_CURVE25519 is not set |
|
... |
... |
CONFIG_CRYPTO_CRC32C_INTEL=m |
3574 |
3616 |
# CONFIG_CRYPTO_MD4 is not set |
# CONFIG_CRYPTO_MD4 is not set |
3575 |
3617 |
# CONFIG_CRYPTO_MD5 is not set |
# CONFIG_CRYPTO_MD5 is not set |
3576 |
3618 |
# CONFIG_CRYPTO_MICHAEL_MIC is not set |
# CONFIG_CRYPTO_MICHAEL_MIC is not set |
3577 |
|
# CONFIG_CRYPTO_RMD128 is not set |
|
3578 |
3619 |
# CONFIG_CRYPTO_RMD160 is not set |
# CONFIG_CRYPTO_RMD160 is not set |
3579 |
|
# CONFIG_CRYPTO_RMD256 is not set |
|
3580 |
|
# CONFIG_CRYPTO_RMD320 is not set |
|
3581 |
3620 |
# CONFIG_CRYPTO_SHA1 is not set |
# CONFIG_CRYPTO_SHA1 is not set |
3582 |
3621 |
# CONFIG_CRYPTO_SHA1_SSSE3 is not set |
# CONFIG_CRYPTO_SHA1_SSSE3 is not set |
3583 |
3622 |
# CONFIG_CRYPTO_SHA256_SSSE3 is not set |
# CONFIG_CRYPTO_SHA256_SSSE3 is not set |
|
... |
... |
CONFIG_CRYPTO_CRC32C_INTEL=m |
3587 |
3626 |
# CONFIG_CRYPTO_SHA3 is not set |
# CONFIG_CRYPTO_SHA3 is not set |
3588 |
3627 |
# CONFIG_CRYPTO_SM3 is not set |
# CONFIG_CRYPTO_SM3 is not set |
3589 |
3628 |
# CONFIG_CRYPTO_STREEBOG is not set |
# CONFIG_CRYPTO_STREEBOG is not set |
3590 |
|
# CONFIG_CRYPTO_TGR192 is not set |
|
3591 |
3629 |
# CONFIG_CRYPTO_WP512 is not set |
# CONFIG_CRYPTO_WP512 is not set |
3592 |
3630 |
# CONFIG_CRYPTO_GHASH_CLMUL_NI_INTEL is not set |
# CONFIG_CRYPTO_GHASH_CLMUL_NI_INTEL is not set |
3593 |
3631 |
|
|
|
... |
... |
CONFIG_CRYPTO_CRC32C_INTEL=m |
3610 |
3648 |
# CONFIG_CRYPTO_DES is not set |
# CONFIG_CRYPTO_DES is not set |
3611 |
3649 |
# CONFIG_CRYPTO_DES3_EDE_X86_64 is not set |
# CONFIG_CRYPTO_DES3_EDE_X86_64 is not set |
3612 |
3650 |
# CONFIG_CRYPTO_FCRYPT is not set |
# CONFIG_CRYPTO_FCRYPT is not set |
3613 |
|
# CONFIG_CRYPTO_SALSA20 is not set |
|
3614 |
3651 |
# CONFIG_CRYPTO_CHACHA20 is not set |
# CONFIG_CRYPTO_CHACHA20 is not set |
3615 |
3652 |
# CONFIG_CRYPTO_CHACHA20_X86_64 is not set |
# CONFIG_CRYPTO_CHACHA20_X86_64 is not set |
3616 |
3653 |
# CONFIG_CRYPTO_SERPENT is not set |
# CONFIG_CRYPTO_SERPENT is not set |
|
... |
... |
CONFIG_FRAME_WARN=2048 |
3763 |
3800 |
# CONFIG_SECTION_MISMATCH_WARN_ONLY is not set |
# CONFIG_SECTION_MISMATCH_WARN_ONLY is not set |
3764 |
3801 |
# CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_32B is not set |
# CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_32B is not set |
3765 |
3802 |
CONFIG_STACK_VALIDATION=y |
CONFIG_STACK_VALIDATION=y |
|
3803 |
|
# CONFIG_VMLINUX_MAP is not set |
3766 |
3804 |
# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set |
# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set |
3767 |
3805 |
# end of Compile-time checks and compiler options |
# end of Compile-time checks and compiler options |
3768 |
3806 |
|
|
|
... |
... |
CONFIG_ARCH_SUPPORTS_KMAP_LOCAL_FORCE_MAP=y |
3809 |
3847 |
# CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP is not set |
# CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP is not set |
3810 |
3848 |
CONFIG_HAVE_ARCH_KASAN=y |
CONFIG_HAVE_ARCH_KASAN=y |
3811 |
3849 |
CONFIG_HAVE_ARCH_KASAN_VMALLOC=y |
CONFIG_HAVE_ARCH_KASAN_VMALLOC=y |
|
3850 |
|
CONFIG_HAVE_ARCH_KFENCE=y |
|
3851 |
|
# CONFIG_KFENCE is not set |
3812 |
3852 |
# end of Memory Debugging |
# end of Memory Debugging |
3813 |
3853 |
|
|
3814 |
3854 |
# CONFIG_DEBUG_SHIRQ is not set |
# CONFIG_DEBUG_SHIRQ is not set |
|
... |
... |
CONFIG_LOCK_DEBUGGING_SUPPORT=y |
3857 |
3897 |
# CONFIG_CSD_LOCK_WAIT_DEBUG is not set |
# CONFIG_CSD_LOCK_WAIT_DEBUG is not set |
3858 |
3898 |
# end of Lock Debugging (spinlocks, mutexes, etc...) |
# end of Lock Debugging (spinlocks, mutexes, etc...) |
3859 |
3899 |
|
|
|
3900 |
|
# CONFIG_DEBUG_IRQFLAGS is not set |
3860 |
3901 |
# CONFIG_STACKTRACE is not set |
# CONFIG_STACKTRACE is not set |
3861 |
3902 |
# CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set |
# CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set |
3862 |
3903 |
# CONFIG_DEBUG_KOBJECT is not set |
# CONFIG_DEBUG_KOBJECT is not set |
|
... |
... |
CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS=y |
3898 |
3939 |
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y |
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y |
3899 |
3940 |
CONFIG_HAVE_SYSCALL_TRACEPOINTS=y |
CONFIG_HAVE_SYSCALL_TRACEPOINTS=y |
3900 |
3941 |
CONFIG_HAVE_FENTRY=y |
CONFIG_HAVE_FENTRY=y |
|
3942 |
|
CONFIG_HAVE_OBJTOOL_MCOUNT=y |
3901 |
3943 |
CONFIG_HAVE_C_RECORDMCOUNT=y |
CONFIG_HAVE_C_RECORDMCOUNT=y |
3902 |
3944 |
CONFIG_TRACING_SUPPORT=y |
CONFIG_TRACING_SUPPORT=y |
3903 |
3945 |
# CONFIG_FTRACE is not set |
# CONFIG_FTRACE is not set |
|
... |
... |
CONFIG_UNWINDER_GUESS=y |
3938 |
3980 |
# CONFIG_FAULT_INJECTION is not set |
# CONFIG_FAULT_INJECTION is not set |
3939 |
3981 |
CONFIG_ARCH_HAS_KCOV=y |
CONFIG_ARCH_HAS_KCOV=y |
3940 |
3982 |
# CONFIG_RUNTIME_TESTING_MENU is not set |
# CONFIG_RUNTIME_TESTING_MENU is not set |
|
3983 |
|
CONFIG_ARCH_USE_MEMTEST=y |
3941 |
3984 |
# CONFIG_MEMTEST is not set |
# CONFIG_MEMTEST is not set |
3942 |
3985 |
# end of Kernel Testing and Coverage |
# end of Kernel Testing and Coverage |
3943 |
3986 |
# end of Kernel hacking |
# end of Kernel hacking |
File builders/linux-amd/flow_dissector.c added (mode: 100644) (index 0000000..888d423) |
|
1 |
|
// SPDX-License-Identifier: GPL-2.0-only |
|
2 |
|
#include <linux/kernel.h> |
|
3 |
|
#include <linux/skbuff.h> |
|
4 |
|
#include <linux/export.h> |
|
5 |
|
#include <linux/ip.h> |
|
6 |
|
#include <linux/ipv6.h> |
|
7 |
|
#include <linux/if_vlan.h> |
|
8 |
|
#include <net/dsa.h> |
|
9 |
|
#include <net/dst_metadata.h> |
|
10 |
|
#include <net/ip.h> |
|
11 |
|
#include <net/ipv6.h> |
|
12 |
|
#include <net/gre.h> |
|
13 |
|
#include <net/pptp.h> |
|
14 |
|
#include <net/tipc.h> |
|
15 |
|
#include <linux/igmp.h> |
|
16 |
|
#include <linux/icmp.h> |
|
17 |
|
#include <linux/sctp.h> |
|
18 |
|
#include <linux/dccp.h> |
|
19 |
|
#include <linux/if_tunnel.h> |
|
20 |
|
#include <linux/if_pppox.h> |
|
21 |
|
#include <linux/ppp_defs.h> |
|
22 |
|
#include <linux/stddef.h> |
|
23 |
|
#include <linux/if_ether.h> |
|
24 |
|
#include <linux/mpls.h> |
|
25 |
|
#include <linux/tcp.h> |
|
26 |
|
#include <linux/ptp_classify.h> |
|
27 |
|
#include <net/flow_dissector.h> |
|
28 |
|
#include <scsi/fc/fc_fcoe.h> |
|
29 |
|
#include <uapi/linux/batadv_packet.h> |
|
30 |
|
#include <linux/bpf.h> |
|
31 |
|
#if IS_ENABLED(CONFIG_NF_CONNTRACK) |
|
32 |
|
#include <net/netfilter/nf_conntrack_core.h> |
|
33 |
|
#include <net/netfilter/nf_conntrack_labels.h> |
|
34 |
|
#endif |
|
35 |
|
#include <linux/bpf-netns.h> |
|
36 |
|
|
|
37 |
|
static void dissector_set_key(struct flow_dissector *flow_dissector, |
|
38 |
|
enum flow_dissector_key_id key_id) |
|
39 |
|
{ |
|
40 |
|
flow_dissector->used_keys |= (1 << key_id); |
|
41 |
|
} |
|
42 |
|
|
|
43 |
|
void skb_flow_dissector_init(struct flow_dissector *flow_dissector, |
|
44 |
|
const struct flow_dissector_key *key, |
|
45 |
|
unsigned int key_count) |
|
46 |
|
{ |
|
47 |
|
unsigned int i; |
|
48 |
|
|
|
49 |
|
memset(flow_dissector, 0, sizeof(*flow_dissector)); |
|
50 |
|
|
|
51 |
|
for (i = 0; i < key_count; i++, key++) { |
|
52 |
|
/* User should make sure that every key target offset is within |
|
53 |
|
* boundaries of unsigned short. |
|
54 |
|
*/ |
|
55 |
|
BUG_ON(key->offset > USHRT_MAX); |
|
56 |
|
BUG_ON(dissector_uses_key(flow_dissector, |
|
57 |
|
key->key_id)); |
|
58 |
|
|
|
59 |
|
dissector_set_key(flow_dissector, key->key_id); |
|
60 |
|
flow_dissector->offset[key->key_id] = key->offset; |
|
61 |
|
} |
|
62 |
|
|
|
63 |
|
/* Ensure that the dissector always includes control and basic key. |
|
64 |
|
* That way we are able to avoid handling lack of these in fast path. |
|
65 |
|
*/ |
|
66 |
|
BUG_ON(!dissector_uses_key(flow_dissector, |
|
67 |
|
FLOW_DISSECTOR_KEY_CONTROL)); |
|
68 |
|
BUG_ON(!dissector_uses_key(flow_dissector, |
|
69 |
|
FLOW_DISSECTOR_KEY_BASIC)); |
|
70 |
|
} |
|
71 |
|
EXPORT_SYMBOL(skb_flow_dissector_init); |
|
72 |
|
|
|
73 |
|
#ifdef CONFIG_BPF_SYSCALL |
|
74 |
|
int flow_dissector_bpf_prog_attach_check(struct net *net, |
|
75 |
|
struct bpf_prog *prog) |
|
76 |
|
{ |
|
77 |
|
enum netns_bpf_attach_type type = NETNS_BPF_FLOW_DISSECTOR; |
|
78 |
|
|
|
79 |
|
if (net == &init_net) { |
|
80 |
|
/* BPF flow dissector in the root namespace overrides |
|
81 |
|
* any per-net-namespace one. When attaching to root, |
|
82 |
|
* make sure we don't have any BPF program attached |
|
83 |
|
* to the non-root namespaces. |
|
84 |
|
*/ |
|
85 |
|
struct net *ns; |
|
86 |
|
|
|
87 |
|
for_each_net(ns) { |
|
88 |
|
if (ns == &init_net) |
|
89 |
|
continue; |
|
90 |
|
if (rcu_access_pointer(ns->bpf.run_array[type])) |
|
91 |
|
return -EEXIST; |
|
92 |
|
} |
|
93 |
|
} else { |
|
94 |
|
/* Make sure root flow dissector is not attached |
|
95 |
|
* when attaching to the non-root namespace. |
|
96 |
|
*/ |
|
97 |
|
if (rcu_access_pointer(init_net.bpf.run_array[type])) |
|
98 |
|
return -EEXIST; |
|
99 |
|
} |
|
100 |
|
|
|
101 |
|
return 0; |
|
102 |
|
} |
|
103 |
|
#endif /* CONFIG_BPF_SYSCALL */ |
|
104 |
|
|
|
105 |
|
/** |
|
106 |
|
* __skb_flow_get_ports - extract the upper layer ports and return them |
|
107 |
|
* @skb: sk_buff to extract the ports from |
|
108 |
|
* @thoff: transport header offset |
|
109 |
|
* @ip_proto: protocol for which to get port offset |
|
110 |
|
* @data: raw buffer pointer to the packet, if NULL use skb->data |
|
111 |
|
* @hlen: packet header length, if @data is NULL use skb_headlen(skb) |
|
112 |
|
* |
|
113 |
|
* The function will try to retrieve the ports at offset thoff + poff where poff |
|
114 |
|
* is the protocol port offset returned from proto_ports_offset |
|
115 |
|
*/ |
|
116 |
|
__be32 __skb_flow_get_ports(const struct sk_buff *skb, int thoff, u8 ip_proto, |
|
117 |
|
const void *data, int hlen) |
|
118 |
|
{ |
|
119 |
|
int poff = proto_ports_offset(ip_proto); |
|
120 |
|
|
|
121 |
|
if (!data) { |
|
122 |
|
data = skb->data; |
|
123 |
|
hlen = skb_headlen(skb); |
|
124 |
|
} |
|
125 |
|
|
|
126 |
|
if (poff >= 0) { |
|
127 |
|
__be32 *ports, _ports; |
|
128 |
|
|
|
129 |
|
ports = __skb_header_pointer(skb, thoff + poff, |
|
130 |
|
sizeof(_ports), data, hlen, &_ports); |
|
131 |
|
if (ports) |
|
132 |
|
return *ports; |
|
133 |
|
} |
|
134 |
|
|
|
135 |
|
return 0; |
|
136 |
|
} |
|
137 |
|
EXPORT_SYMBOL(__skb_flow_get_ports); |
|
138 |
|
|
|
139 |
|
static bool icmp_has_id(u8 type) |
|
140 |
|
{ |
|
141 |
|
switch (type) { |
|
142 |
|
case ICMP_ECHO: |
|
143 |
|
case ICMP_ECHOREPLY: |
|
144 |
|
case ICMP_TIMESTAMP: |
|
145 |
|
case ICMP_TIMESTAMPREPLY: |
|
146 |
|
case ICMPV6_ECHO_REQUEST: |
|
147 |
|
case ICMPV6_ECHO_REPLY: |
|
148 |
|
return true; |
|
149 |
|
} |
|
150 |
|
|
|
151 |
|
return false; |
|
152 |
|
} |
|
153 |
|
|
|
154 |
|
/** |
|
155 |
|
* skb_flow_get_icmp_tci - extract ICMP(6) Type, Code and Identifier fields |
|
156 |
|
* @skb: sk_buff to extract from |
|
157 |
|
* @key_icmp: struct flow_dissector_key_icmp to fill |
|
158 |
|
* @data: raw buffer pointer to the packet |
|
159 |
|
* @thoff: offset to extract at |
|
160 |
|
* @hlen: packet header length |
|
161 |
|
*/ |
|
162 |
|
void skb_flow_get_icmp_tci(const struct sk_buff *skb, |
|
163 |
|
struct flow_dissector_key_icmp *key_icmp, |
|
164 |
|
const void *data, int thoff, int hlen) |
|
165 |
|
{ |
|
166 |
|
struct icmphdr *ih, _ih; |
|
167 |
|
|
|
168 |
|
ih = __skb_header_pointer(skb, thoff, sizeof(_ih), data, hlen, &_ih); |
|
169 |
|
if (!ih) |
|
170 |
|
return; |
|
171 |
|
|
|
172 |
|
key_icmp->type = ih->type; |
|
173 |
|
key_icmp->code = ih->code; |
|
174 |
|
|
|
175 |
|
/* As we use 0 to signal that the Id field is not present, |
|
176 |
|
* avoid confusion with packets without such field |
|
177 |
|
*/ |
|
178 |
|
if (icmp_has_id(ih->type)) |
|
179 |
|
key_icmp->id = ih->un.echo.id ? ntohs(ih->un.echo.id) : 1; |
|
180 |
|
else |
|
181 |
|
key_icmp->id = 0; |
|
182 |
|
} |
|
183 |
|
EXPORT_SYMBOL(skb_flow_get_icmp_tci); |
|
184 |
|
|
|
185 |
|
/* If FLOW_DISSECTOR_KEY_ICMP is set, dissect an ICMP packet |
|
186 |
|
* using skb_flow_get_icmp_tci(). |
|
187 |
|
*/ |
|
188 |
|
static void __skb_flow_dissect_icmp(const struct sk_buff *skb, |
|
189 |
|
struct flow_dissector *flow_dissector, |
|
190 |
|
void *target_container, const void *data, |
|
191 |
|
int thoff, int hlen) |
|
192 |
|
{ |
|
193 |
|
struct flow_dissector_key_icmp *key_icmp; |
|
194 |
|
|
|
195 |
|
if (!dissector_uses_key(flow_dissector, FLOW_DISSECTOR_KEY_ICMP)) |
|
196 |
|
return; |
|
197 |
|
|
|
198 |
|
key_icmp = skb_flow_dissector_target(flow_dissector, |
|
199 |
|
FLOW_DISSECTOR_KEY_ICMP, |
|
200 |
|
target_container); |
|
201 |
|
|
|
202 |
|
skb_flow_get_icmp_tci(skb, key_icmp, data, thoff, hlen); |
|
203 |
|
} |
|
204 |
|
|
|
205 |
|
void skb_flow_dissect_meta(const struct sk_buff *skb, |
|
206 |
|
struct flow_dissector *flow_dissector, |
|
207 |
|
void *target_container) |
|
208 |
|
{ |
|
209 |
|
struct flow_dissector_key_meta *meta; |
|
210 |
|
|
|
211 |
|
if (!dissector_uses_key(flow_dissector, FLOW_DISSECTOR_KEY_META)) |
|
212 |
|
return; |
|
213 |
|
|
|
214 |
|
meta = skb_flow_dissector_target(flow_dissector, |
|
215 |
|
FLOW_DISSECTOR_KEY_META, |
|
216 |
|
target_container); |
|
217 |
|
meta->ingress_ifindex = skb->skb_iif; |
|
218 |
|
} |
|
219 |
|
EXPORT_SYMBOL(skb_flow_dissect_meta); |
|
220 |
|
|
|
221 |
|
static void |
|
222 |
|
skb_flow_dissect_set_enc_addr_type(enum flow_dissector_key_id type, |
|
223 |
|
struct flow_dissector *flow_dissector, |
|
224 |
|
void *target_container) |
|
225 |
|
{ |
|
226 |
|
struct flow_dissector_key_control *ctrl; |
|
227 |
|
|
|
228 |
|
if (!dissector_uses_key(flow_dissector, FLOW_DISSECTOR_KEY_ENC_CONTROL)) |
|
229 |
|
return; |
|
230 |
|
|
|
231 |
|
ctrl = skb_flow_dissector_target(flow_dissector, |
|
232 |
|
FLOW_DISSECTOR_KEY_ENC_CONTROL, |
|
233 |
|
target_container); |
|
234 |
|
ctrl->addr_type = type; |
|
235 |
|
} |
|
236 |
|
|
|
237 |
|
void |
|
238 |
|
skb_flow_dissect_ct(const struct sk_buff *skb, |
|
239 |
|
struct flow_dissector *flow_dissector, |
|
240 |
|
void *target_container, u16 *ctinfo_map, |
|
241 |
|
size_t mapsize, bool post_ct) |
|
242 |
|
{ |
|
243 |
|
#if IS_ENABLED(CONFIG_NF_CONNTRACK) |
|
244 |
|
struct flow_dissector_key_ct *key; |
|
245 |
|
enum ip_conntrack_info ctinfo; |
|
246 |
|
struct nf_conn_labels *cl; |
|
247 |
|
struct nf_conn *ct; |
|
248 |
|
|
|
249 |
|
if (!dissector_uses_key(flow_dissector, FLOW_DISSECTOR_KEY_CT)) |
|
250 |
|
return; |
|
251 |
|
|
|
252 |
|
ct = nf_ct_get(skb, &ctinfo); |
|
253 |
|
if (!ct && !post_ct) |
|
254 |
|
return; |
|
255 |
|
|
|
256 |
|
key = skb_flow_dissector_target(flow_dissector, |
|
257 |
|
FLOW_DISSECTOR_KEY_CT, |
|
258 |
|
target_container); |
|
259 |
|
|
|
260 |
|
if (!ct) { |
|
261 |
|
key->ct_state = TCA_FLOWER_KEY_CT_FLAGS_TRACKED | |
|
262 |
|
TCA_FLOWER_KEY_CT_FLAGS_INVALID; |
|
263 |
|
return; |
|
264 |
|
} |
|
265 |
|
|
|
266 |
|
if (ctinfo < mapsize) |
|
267 |
|
key->ct_state = ctinfo_map[ctinfo]; |
|
268 |
|
#if IS_ENABLED(CONFIG_NF_CONNTRACK_ZONES) |
|
269 |
|
key->ct_zone = ct->zone.id; |
|
270 |
|
#endif |
|
271 |
|
#if IS_ENABLED(CONFIG_NF_CONNTRACK_MARK) |
|
272 |
|
key->ct_mark = ct->mark; |
|
273 |
|
#endif |
|
274 |
|
|
|
275 |
|
cl = nf_ct_labels_find(ct); |
|
276 |
|
if (cl) |
|
277 |
|
memcpy(key->ct_labels, cl->bits, sizeof(key->ct_labels)); |
|
278 |
|
#endif /* CONFIG_NF_CONNTRACK */ |
|
279 |
|
} |
|
280 |
|
EXPORT_SYMBOL(skb_flow_dissect_ct); |
|
281 |
|
|
|
282 |
|
void |
|
283 |
|
skb_flow_dissect_tunnel_info(const struct sk_buff *skb, |
|
284 |
|
struct flow_dissector *flow_dissector, |
|
285 |
|
void *target_container) |
|
286 |
|
{ |
|
287 |
|
struct ip_tunnel_info *info; |
|
288 |
|
struct ip_tunnel_key *key; |
|
289 |
|
|
|
290 |
|
/* A quick check to see if there might be something to do. */ |
|
291 |
|
if (!dissector_uses_key(flow_dissector, |
|
292 |
|
FLOW_DISSECTOR_KEY_ENC_KEYID) && |
|
293 |
|
!dissector_uses_key(flow_dissector, |
|
294 |
|
FLOW_DISSECTOR_KEY_ENC_IPV4_ADDRS) && |
|
295 |
|
!dissector_uses_key(flow_dissector, |
|
296 |
|
FLOW_DISSECTOR_KEY_ENC_IPV6_ADDRS) && |
|
297 |
|
!dissector_uses_key(flow_dissector, |
|
298 |
|
FLOW_DISSECTOR_KEY_ENC_CONTROL) && |
|
299 |
|
!dissector_uses_key(flow_dissector, |
|
300 |
|
FLOW_DISSECTOR_KEY_ENC_PORTS) && |
|
301 |
|
!dissector_uses_key(flow_dissector, |
|
302 |
|
FLOW_DISSECTOR_KEY_ENC_IP) && |
|
303 |
|
!dissector_uses_key(flow_dissector, |
|
304 |
|
FLOW_DISSECTOR_KEY_ENC_OPTS)) |
|
305 |
|
return; |
|
306 |
|
|
|
307 |
|
info = skb_tunnel_info(skb); |
|
308 |
|
if (!info) |
|
309 |
|
return; |
|
310 |
|
|
|
311 |
|
key = &info->key; |
|
312 |
|
|
|
313 |
|
switch (ip_tunnel_info_af(info)) { |
|
314 |
|
case AF_INET: |
|
315 |
|
skb_flow_dissect_set_enc_addr_type(FLOW_DISSECTOR_KEY_IPV4_ADDRS, |
|
316 |
|
flow_dissector, |
|
317 |
|
target_container); |
|
318 |
|
if (dissector_uses_key(flow_dissector, |
|
319 |
|
FLOW_DISSECTOR_KEY_ENC_IPV4_ADDRS)) { |
|
320 |
|
struct flow_dissector_key_ipv4_addrs *ipv4; |
|
321 |
|
|
|
322 |
|
ipv4 = skb_flow_dissector_target(flow_dissector, |
|
323 |
|
FLOW_DISSECTOR_KEY_ENC_IPV4_ADDRS, |
|
324 |
|
target_container); |
|
325 |
|
ipv4->src = key->u.ipv4.src; |
|
326 |
|
ipv4->dst = key->u.ipv4.dst; |
|
327 |
|
} |
|
328 |
|
break; |
|
329 |
|
case AF_INET6: |
|
330 |
|
skb_flow_dissect_set_enc_addr_type(FLOW_DISSECTOR_KEY_IPV6_ADDRS, |
|
331 |
|
flow_dissector, |
|
332 |
|
target_container); |
|
333 |
|
if (dissector_uses_key(flow_dissector, |
|
334 |
|
FLOW_DISSECTOR_KEY_ENC_IPV6_ADDRS)) { |
|
335 |
|
struct flow_dissector_key_ipv6_addrs *ipv6; |
|
336 |
|
|
|
337 |
|
ipv6 = skb_flow_dissector_target(flow_dissector, |
|
338 |
|
FLOW_DISSECTOR_KEY_ENC_IPV6_ADDRS, |
|
339 |
|
target_container); |
|
340 |
|
ipv6->src = key->u.ipv6.src; |
|
341 |
|
ipv6->dst = key->u.ipv6.dst; |
|
342 |
|
} |
|
343 |
|
break; |
|
344 |
|
} |
|
345 |
|
|
|
346 |
|
if (dissector_uses_key(flow_dissector, FLOW_DISSECTOR_KEY_ENC_KEYID)) { |
|
347 |
|
struct flow_dissector_key_keyid *keyid; |
|
348 |
|
|
|
349 |
|
keyid = skb_flow_dissector_target(flow_dissector, |
|
350 |
|
FLOW_DISSECTOR_KEY_ENC_KEYID, |
|
351 |
|
target_container); |
|
352 |
|
keyid->keyid = tunnel_id_to_key32(key->tun_id); |
|
353 |
|
} |
|
354 |
|
|
|
355 |
|
if (dissector_uses_key(flow_dissector, FLOW_DISSECTOR_KEY_ENC_PORTS)) { |
|
356 |
|
struct flow_dissector_key_ports *tp; |
|
357 |
|
|
|
358 |
|
tp = skb_flow_dissector_target(flow_dissector, |
|
359 |
|
FLOW_DISSECTOR_KEY_ENC_PORTS, |
|
360 |
|
target_container); |
|
361 |
|
tp->src = key->tp_src; |
|
362 |
|
tp->dst = key->tp_dst; |
|
363 |
|
} |
|
364 |
|
|
|
365 |
|
if (dissector_uses_key(flow_dissector, FLOW_DISSECTOR_KEY_ENC_IP)) { |
|
366 |
|
struct flow_dissector_key_ip *ip; |
|
367 |
|
|
|
368 |
|
ip = skb_flow_dissector_target(flow_dissector, |
|
369 |
|
FLOW_DISSECTOR_KEY_ENC_IP, |
|
370 |
|
target_container); |
|
371 |
|
ip->tos = key->tos; |
|
372 |
|
ip->ttl = key->ttl; |
|
373 |
|
} |
|
374 |
|
|
|
375 |
|
if (dissector_uses_key(flow_dissector, FLOW_DISSECTOR_KEY_ENC_OPTS)) { |
|
376 |
|
struct flow_dissector_key_enc_opts *enc_opt; |
|
377 |
|
|
|
378 |
|
enc_opt = skb_flow_dissector_target(flow_dissector, |
|
379 |
|
FLOW_DISSECTOR_KEY_ENC_OPTS, |
|
380 |
|
target_container); |
|
381 |
|
|
|
382 |
|
if (info->options_len) { |
|
383 |
|
enc_opt->len = info->options_len; |
|
384 |
|
ip_tunnel_info_opts_get(enc_opt->data, info); |
|
385 |
|
enc_opt->dst_opt_type = info->key.tun_flags & |
|
386 |
|
TUNNEL_OPTIONS_PRESENT; |
|
387 |
|
} |
|
388 |
|
} |
|
389 |
|
} |
|
390 |
|
EXPORT_SYMBOL(skb_flow_dissect_tunnel_info); |
|
391 |
|
|
|
392 |
|
void skb_flow_dissect_hash(const struct sk_buff *skb, |
|
393 |
|
struct flow_dissector *flow_dissector, |
|
394 |
|
void *target_container) |
|
395 |
|
{ |
|
396 |
|
struct flow_dissector_key_hash *key; |
|
397 |
|
|
|
398 |
|
if (!dissector_uses_key(flow_dissector, FLOW_DISSECTOR_KEY_HASH)) |
|
399 |
|
return; |
|
400 |
|
|
|
401 |
|
key = skb_flow_dissector_target(flow_dissector, |
|
402 |
|
FLOW_DISSECTOR_KEY_HASH, |
|
403 |
|
target_container); |
|
404 |
|
|
|
405 |
|
key->hash = skb_get_hash_raw(skb); |
|
406 |
|
} |
|
407 |
|
EXPORT_SYMBOL(skb_flow_dissect_hash); |
|
408 |
|
|
|
409 |
|
static enum flow_dissect_ret |
|
410 |
|
__skb_flow_dissect_mpls(const struct sk_buff *skb, |
|
411 |
|
struct flow_dissector *flow_dissector, |
|
412 |
|
void *target_container, const void *data, int nhoff, |
|
413 |
|
int hlen, int lse_index, bool *entropy_label) |
|
414 |
|
{ |
|
415 |
|
struct mpls_label *hdr, _hdr; |
|
416 |
|
u32 entry, label, bos; |
|
417 |
|
|
|
418 |
|
if (!dissector_uses_key(flow_dissector, |
|
419 |
|
FLOW_DISSECTOR_KEY_MPLS_ENTROPY) && |
|
420 |
|
!dissector_uses_key(flow_dissector, FLOW_DISSECTOR_KEY_MPLS)) |
|
421 |
|
return FLOW_DISSECT_RET_OUT_GOOD; |
|
422 |
|
|
|
423 |
|
if (lse_index >= FLOW_DIS_MPLS_MAX) |
|
424 |
|
return FLOW_DISSECT_RET_OUT_GOOD; |
|
425 |
|
|
|
426 |
|
hdr = __skb_header_pointer(skb, nhoff, sizeof(_hdr), data, |
|
427 |
|
hlen, &_hdr); |
|
428 |
|
if (!hdr) |
|
429 |
|
return FLOW_DISSECT_RET_OUT_BAD; |
|
430 |
|
|
|
431 |
|
entry = ntohl(hdr->entry); |
|
432 |
|
label = (entry & MPLS_LS_LABEL_MASK) >> MPLS_LS_LABEL_SHIFT; |
|
433 |
|
bos = (entry & MPLS_LS_S_MASK) >> MPLS_LS_S_SHIFT; |
|
434 |
|
|
|
435 |
|
if (dissector_uses_key(flow_dissector, FLOW_DISSECTOR_KEY_MPLS)) { |
|
436 |
|
struct flow_dissector_key_mpls *key_mpls; |
|
437 |
|
struct flow_dissector_mpls_lse *lse; |
|
438 |
|
|
|
439 |
|
key_mpls = skb_flow_dissector_target(flow_dissector, |
|
440 |
|
FLOW_DISSECTOR_KEY_MPLS, |
|
441 |
|
target_container); |
|
442 |
|
lse = &key_mpls->ls[lse_index]; |
|
443 |
|
|
|
444 |
|
lse->mpls_ttl = (entry & MPLS_LS_TTL_MASK) >> MPLS_LS_TTL_SHIFT; |
|
445 |
|
lse->mpls_bos = bos; |
|
446 |
|
lse->mpls_tc = (entry & MPLS_LS_TC_MASK) >> MPLS_LS_TC_SHIFT; |
|
447 |
|
lse->mpls_label = label; |
|
448 |
|
dissector_set_mpls_lse(key_mpls, lse_index); |
|
449 |
|
} |
|
450 |
|
|
|
451 |
|
if (*entropy_label && |
|
452 |
|
dissector_uses_key(flow_dissector, |
|
453 |
|
FLOW_DISSECTOR_KEY_MPLS_ENTROPY)) { |
|
454 |
|
struct flow_dissector_key_keyid *key_keyid; |
|
455 |
|
|
|
456 |
|
key_keyid = skb_flow_dissector_target(flow_dissector, |
|
457 |
|
FLOW_DISSECTOR_KEY_MPLS_ENTROPY, |
|
458 |
|
target_container); |
|
459 |
|
key_keyid->keyid = cpu_to_be32(label); |
|
460 |
|
} |
|
461 |
|
|
|
462 |
|
*entropy_label = label == MPLS_LABEL_ENTROPY; |
|
463 |
|
|
|
464 |
|
return bos ? FLOW_DISSECT_RET_OUT_GOOD : FLOW_DISSECT_RET_PROTO_AGAIN; |
|
465 |
|
} |
|
466 |
|
|
|
467 |
|
static enum flow_dissect_ret |
|
468 |
|
__skb_flow_dissect_arp(const struct sk_buff *skb, |
|
469 |
|
struct flow_dissector *flow_dissector, |
|
470 |
|
void *target_container, const void *data, |
|
471 |
|
int nhoff, int hlen) |
|
472 |
|
{ |
|
473 |
|
struct flow_dissector_key_arp *key_arp; |
|
474 |
|
struct { |
|
475 |
|
unsigned char ar_sha[ETH_ALEN]; |
|
476 |
|
unsigned char ar_sip[4]; |
|
477 |
|
unsigned char ar_tha[ETH_ALEN]; |
|
478 |
|
unsigned char ar_tip[4]; |
|
479 |
|
} *arp_eth, _arp_eth; |
|
480 |
|
const struct arphdr *arp; |
|
481 |
|
struct arphdr _arp; |
|
482 |
|
|
|
483 |
|
if (!dissector_uses_key(flow_dissector, FLOW_DISSECTOR_KEY_ARP)) |
|
484 |
|
return FLOW_DISSECT_RET_OUT_GOOD; |
|
485 |
|
|
|
486 |
|
arp = __skb_header_pointer(skb, nhoff, sizeof(_arp), data, |
|
487 |
|
hlen, &_arp); |
|
488 |
|
if (!arp) |
|
489 |
|
return FLOW_DISSECT_RET_OUT_BAD; |
|
490 |
|
|
|
491 |
|
if (arp->ar_hrd != HTONS(ARPHRD_ETHER) || |
|
492 |
|
arp->ar_pro != HTONS(ETH_P_IP) || |
|
493 |
|
arp->ar_hln != ETH_ALEN || |
|
494 |
|
arp->ar_pln != 4 || |
|
495 |
|
(arp->ar_op != HTONS(ARPOP_REPLY) && |
|
496 |
|
arp->ar_op != HTONS(ARPOP_REQUEST))) |
|
497 |
|
return FLOW_DISSECT_RET_OUT_BAD; |
|
498 |
|
|
|
499 |
|
arp_eth = __skb_header_pointer(skb, nhoff + sizeof(_arp), |
|
500 |
|
sizeof(_arp_eth), data, |
|
501 |
|
hlen, &_arp_eth); |
|
502 |
|
if (!arp_eth) |
|
503 |
|
return FLOW_DISSECT_RET_OUT_BAD; |
|
504 |
|
|
|
505 |
|
key_arp = skb_flow_dissector_target(flow_dissector, |
|
506 |
|
FLOW_DISSECTOR_KEY_ARP, |
|
507 |
|
target_container); |
|
508 |
|
|
|
509 |
|
memcpy(&key_arp->sip, arp_eth->ar_sip, sizeof(key_arp->sip)); |
|
510 |
|
memcpy(&key_arp->tip, arp_eth->ar_tip, sizeof(key_arp->tip)); |
|
511 |
|
|
|
512 |
|
/* Only store the lower byte of the opcode; |
|
513 |
|
* this covers ARPOP_REPLY and ARPOP_REQUEST. |
|
514 |
|
*/ |
|
515 |
|
key_arp->op = ntohs(arp->ar_op) & 0xff; |
|
516 |
|
|
|
517 |
|
ether_addr_copy(key_arp->sha, arp_eth->ar_sha); |
|
518 |
|
ether_addr_copy(key_arp->tha, arp_eth->ar_tha); |
|
519 |
|
|
|
520 |
|
return FLOW_DISSECT_RET_OUT_GOOD; |
|
521 |
|
} |
|
522 |
|
|
|
523 |
|
static enum flow_dissect_ret |
|
524 |
|
__skb_flow_dissect_gre(const struct sk_buff *skb, |
|
525 |
|
struct flow_dissector_key_control *key_control, |
|
526 |
|
struct flow_dissector *flow_dissector, |
|
527 |
|
void *target_container, const void *data, |
|
528 |
|
__be16 *p_proto, int *p_nhoff, int *p_hlen, |
|
529 |
|
unsigned int flags) |
|
530 |
|
{ |
|
531 |
|
struct flow_dissector_key_keyid *key_keyid; |
|
532 |
|
struct gre_base_hdr *hdr, _hdr; |
|
533 |
|
int offset = 0; |
|
534 |
|
u16 gre_ver; |
|
535 |
|
|
|
536 |
|
hdr = __skb_header_pointer(skb, *p_nhoff, sizeof(_hdr), |
|
537 |
|
data, *p_hlen, &_hdr); |
|
538 |
|
if (!hdr) |
|
539 |
|
return FLOW_DISSECT_RET_OUT_BAD; |
|
540 |
|
|
|
541 |
|
/* Only look inside GRE without routing */ |
|
542 |
|
if (hdr->flags & GRE_ROUTING) |
|
543 |
|
return FLOW_DISSECT_RET_OUT_GOOD; |
|
544 |
|
|
|
545 |
|
/* Only look inside GRE for version 0 and 1 */ |
|
546 |
|
gre_ver = ntohs(hdr->flags & GRE_VERSION); |
|
547 |
|
if (gre_ver > 1) |
|
548 |
|
return FLOW_DISSECT_RET_OUT_GOOD; |
|
549 |
|
|
|
550 |
|
*p_proto = hdr->protocol; |
|
551 |
|
if (gre_ver) { |
|
552 |
|
/* Version1 must be PPTP, and check the flags */ |
|
553 |
|
if (!(*p_proto == GRE_PROTO_PPP && (hdr->flags & GRE_KEY))) |
|
554 |
|
return FLOW_DISSECT_RET_OUT_GOOD; |
|
555 |
|
} |
|
556 |
|
|
|
557 |
|
offset += sizeof(struct gre_base_hdr); |
|
558 |
|
|
|
559 |
|
if (hdr->flags & GRE_CSUM) |
|
560 |
|
offset += sizeof_field(struct gre_full_hdr, csum) + |
|
561 |
|
sizeof_field(struct gre_full_hdr, reserved1); |
|
562 |
|
|
|
563 |
|
if (hdr->flags & GRE_KEY) { |
|
564 |
|
const __be32 *keyid; |
|
565 |
|
__be32 _keyid; |
|
566 |
|
|
|
567 |
|
keyid = __skb_header_pointer(skb, *p_nhoff + offset, |
|
568 |
|
sizeof(_keyid), |
|
569 |
|
data, *p_hlen, &_keyid); |
|
570 |
|
if (!keyid) |
|
571 |
|
return FLOW_DISSECT_RET_OUT_BAD; |
|
572 |
|
|
|
573 |
|
if (dissector_uses_key(flow_dissector, |
|
574 |
|
FLOW_DISSECTOR_KEY_GRE_KEYID)) { |
|
575 |
|
key_keyid = skb_flow_dissector_target(flow_dissector, |
|
576 |
|
FLOW_DISSECTOR_KEY_GRE_KEYID, |
|
577 |
|
target_container); |
|
578 |
|
if (gre_ver == 0) |
|
579 |
|
key_keyid->keyid = *keyid; |
|
580 |
|
else |
|
581 |
|
key_keyid->keyid = *keyid & GRE_PPTP_KEY_MASK; |
|
582 |
|
} |
|
583 |
|
offset += sizeof_field(struct gre_full_hdr, key); |
|
584 |
|
} |
|
585 |
|
|
|
586 |
|
if (hdr->flags & GRE_SEQ) |
|
587 |
|
offset += sizeof_field(struct pptp_gre_header, seq); |
|
588 |
|
|
|
589 |
|
if (gre_ver == 0) { |
|
590 |
|
if (*p_proto == HTONS(ETH_P_TEB)) { |
|
591 |
|
const struct ethhdr *eth; |
|
592 |
|
struct ethhdr _eth; |
|
593 |
|
|
|
594 |
|
eth = __skb_header_pointer(skb, *p_nhoff + offset, |
|
595 |
|
sizeof(_eth), |
|
596 |
|
data, *p_hlen, &_eth); |
|
597 |
|
if (!eth) |
|
598 |
|
return FLOW_DISSECT_RET_OUT_BAD; |
|
599 |
|
*p_proto = eth->h_proto; |
|
600 |
|
offset += sizeof(*eth); |
|
601 |
|
|
|
602 |
|
/* Cap headers that we access via pointers at the |
|
603 |
|
* end of the Ethernet header as our maximum alignment |
|
604 |
|
* at that point is only 2 bytes. |
|
605 |
|
*/ |
|
606 |
|
if (NET_IP_ALIGN) |
|
607 |
|
*p_hlen = *p_nhoff + offset; |
|
608 |
|
} |
|
609 |
|
} else { /* version 1, must be PPTP */ |
|
610 |
|
u8 _ppp_hdr[PPP_HDRLEN]; |
|
611 |
|
u8 *ppp_hdr; |
|
612 |
|
|
|
613 |
|
if (hdr->flags & GRE_ACK) |
|
614 |
|
offset += sizeof_field(struct pptp_gre_header, ack); |
|
615 |
|
|
|
616 |
|
ppp_hdr = __skb_header_pointer(skb, *p_nhoff + offset, |
|
617 |
|
sizeof(_ppp_hdr), |
|
618 |
|
data, *p_hlen, _ppp_hdr); |
|
619 |
|
if (!ppp_hdr) |
|
620 |
|
return FLOW_DISSECT_RET_OUT_BAD; |
|
621 |
|
|
|
622 |
|
switch (PPP_PROTOCOL(ppp_hdr)) { |
|
623 |
|
case PPP_IP: |
|
624 |
|
*p_proto = HTONS(ETH_P_IP); |
|
625 |
|
break; |
|
626 |
|
case PPP_IPV6: |
|
627 |
|
*p_proto = HTONS(ETH_P_IPV6); |
|
628 |
|
break; |
|
629 |
|
default: |
|
630 |
|
/* Could probably catch some more like MPLS */ |
|
631 |
|
break; |
|
632 |
|
} |
|
633 |
|
|
|
634 |
|
offset += PPP_HDRLEN; |
|
635 |
|
} |
|
636 |
|
|
|
637 |
|
*p_nhoff += offset; |
|
638 |
|
key_control->flags |= FLOW_DIS_ENCAPSULATION; |
|
639 |
|
if (flags & FLOW_DISSECTOR_F_STOP_AT_ENCAP) |
|
640 |
|
return FLOW_DISSECT_RET_OUT_GOOD; |
|
641 |
|
|
|
642 |
|
return FLOW_DISSECT_RET_PROTO_AGAIN; |
|
643 |
|
} |
|
644 |
|
|
|
645 |
|
/** |
|
646 |
|
* __skb_flow_dissect_batadv() - dissect batman-adv header |
|
647 |
|
* @skb: sk_buff to with the batman-adv header |
|
648 |
|
* @key_control: flow dissectors control key |
|
649 |
|
* @data: raw buffer pointer to the packet, if NULL use skb->data |
|
650 |
|
* @p_proto: pointer used to update the protocol to process next |
|
651 |
|
* @p_nhoff: pointer used to update inner network header offset |
|
652 |
|
* @hlen: packet header length |
|
653 |
|
* @flags: any combination of FLOW_DISSECTOR_F_* |
|
654 |
|
* |
|
655 |
|
* ETH_P_BATMAN packets are tried to be dissected. Only |
|
656 |
|
* &struct batadv_unicast packets are actually processed because they contain an |
|
657 |
|
* inner ethernet header and are usually followed by actual network header. This |
|
658 |
|
* allows the flow dissector to continue processing the packet. |
|
659 |
|
* |
|
660 |
|
* Return: FLOW_DISSECT_RET_PROTO_AGAIN when &struct batadv_unicast was found, |
|
661 |
|
* FLOW_DISSECT_RET_OUT_GOOD when dissector should stop after encapsulation, |
|
662 |
|
* otherwise FLOW_DISSECT_RET_OUT_BAD |
|
663 |
|
*/ |
|
664 |
|
static enum flow_dissect_ret |
|
665 |
|
__skb_flow_dissect_batadv(const struct sk_buff *skb, |
|
666 |
|
struct flow_dissector_key_control *key_control, |
|
667 |
|
const void *data, __be16 *p_proto, int *p_nhoff, |
|
668 |
|
int hlen, unsigned int flags) |
|
669 |
|
{ |
|
670 |
|
struct { |
|
671 |
|
struct batadv_unicast_packet batadv_unicast; |
|
672 |
|
struct ethhdr eth; |
|
673 |
|
} *hdr, _hdr; |
|
674 |
|
|
|
675 |
|
hdr = __skb_header_pointer(skb, *p_nhoff, sizeof(_hdr), data, hlen, |
|
676 |
|
&_hdr); |
|
677 |
|
if (!hdr) |
|
678 |
|
return FLOW_DISSECT_RET_OUT_BAD; |
|
679 |
|
|
|
680 |
|
if (hdr->batadv_unicast.version != BATADV_COMPAT_VERSION) |
|
681 |
|
return FLOW_DISSECT_RET_OUT_BAD; |
|
682 |
|
|
|
683 |
|
if (hdr->batadv_unicast.packet_type != BATADV_UNICAST) |
|
684 |
|
return FLOW_DISSECT_RET_OUT_BAD; |
|
685 |
|
|
|
686 |
|
*p_proto = hdr->eth.h_proto; |
|
687 |
|
*p_nhoff += sizeof(*hdr); |
|
688 |
|
|
|
689 |
|
key_control->flags |= FLOW_DIS_ENCAPSULATION; |
|
690 |
|
if (flags & FLOW_DISSECTOR_F_STOP_AT_ENCAP) |
|
691 |
|
return FLOW_DISSECT_RET_OUT_GOOD; |
|
692 |
|
|
|
693 |
|
return FLOW_DISSECT_RET_PROTO_AGAIN; |
|
694 |
|
} |
|
695 |
|
|
|
696 |
|
static void |
|
697 |
|
__skb_flow_dissect_tcp(const struct sk_buff *skb, |
|
698 |
|
struct flow_dissector *flow_dissector, |
|
699 |
|
void *target_container, const void *data, |
|
700 |
|
int thoff, int hlen) |
|
701 |
|
{ |
|
702 |
|
struct flow_dissector_key_tcp *key_tcp; |
|
703 |
|
struct tcphdr *th, _th; |
|
704 |
|
|
|
705 |
|
if (!dissector_uses_key(flow_dissector, FLOW_DISSECTOR_KEY_TCP)) |
|
706 |
|
return; |
|
707 |
|
|
|
708 |
|
th = __skb_header_pointer(skb, thoff, sizeof(_th), data, hlen, &_th); |
|
709 |
|
if (!th) |
|
710 |
|
return; |
|
711 |
|
|
|
712 |
|
if (unlikely(__tcp_hdrlen(th) < sizeof(_th))) |
|
713 |
|
return; |
|
714 |
|
|
|
715 |
|
key_tcp = skb_flow_dissector_target(flow_dissector, |
|
716 |
|
FLOW_DISSECTOR_KEY_TCP, |
|
717 |
|
target_container); |
|
718 |
|
key_tcp->flags = (*(__be16 *) &tcp_flag_word(th) & HTONS(0x0FFF)); |
|
719 |
|
} |
|
720 |
|
|
|
721 |
|
static void |
|
722 |
|
__skb_flow_dissect_ports(const struct sk_buff *skb, |
|
723 |
|
struct flow_dissector *flow_dissector, |
|
724 |
|
void *target_container, const void *data, |
|
725 |
|
int nhoff, u8 ip_proto, int hlen) |
|
726 |
|
{ |
|
727 |
|
enum flow_dissector_key_id dissector_ports = FLOW_DISSECTOR_KEY_MAX; |
|
728 |
|
struct flow_dissector_key_ports *key_ports; |
|
729 |
|
|
|
730 |
|
if (dissector_uses_key(flow_dissector, FLOW_DISSECTOR_KEY_PORTS)) |
|
731 |
|
dissector_ports = FLOW_DISSECTOR_KEY_PORTS; |
|
732 |
|
else if (dissector_uses_key(flow_dissector, |
|
733 |
|
FLOW_DISSECTOR_KEY_PORTS_RANGE)) |
|
734 |
|
dissector_ports = FLOW_DISSECTOR_KEY_PORTS_RANGE; |
|
735 |
|
|
|
736 |
|
if (dissector_ports == FLOW_DISSECTOR_KEY_MAX) |
|
737 |
|
return; |
|
738 |
|
|
|
739 |
|
key_ports = skb_flow_dissector_target(flow_dissector, |
|
740 |
|
dissector_ports, |
|
741 |
|
target_container); |
|
742 |
|
key_ports->ports = __skb_flow_get_ports(skb, nhoff, ip_proto, |
|
743 |
|
data, hlen); |
|
744 |
|
} |
|
745 |
|
|
|
746 |
|
static void |
|
747 |
|
__skb_flow_dissect_ipv4(const struct sk_buff *skb, |
|
748 |
|
struct flow_dissector *flow_dissector, |
|
749 |
|
void *target_container, const void *data, |
|
750 |
|
const struct iphdr *iph) |
|
751 |
|
{ |
|
752 |
|
struct flow_dissector_key_ip *key_ip; |
|
753 |
|
|
|
754 |
|
if (!dissector_uses_key(flow_dissector, FLOW_DISSECTOR_KEY_IP)) |
|
755 |
|
return; |
|
756 |
|
|
|
757 |
|
key_ip = skb_flow_dissector_target(flow_dissector, |
|
758 |
|
FLOW_DISSECTOR_KEY_IP, |
|
759 |
|
target_container); |
|
760 |
|
key_ip->tos = iph->tos; |
|
761 |
|
key_ip->ttl = iph->ttl; |
|
762 |
|
} |
|
763 |
|
|
|
764 |
|
static void |
|
765 |
|
__skb_flow_dissect_ipv6(const struct sk_buff *skb, |
|
766 |
|
struct flow_dissector *flow_dissector, |
|
767 |
|
void *target_container, const void *data, |
|
768 |
|
const struct ipv6hdr *iph) |
|
769 |
|
{ |
|
770 |
|
struct flow_dissector_key_ip *key_ip; |
|
771 |
|
|
|
772 |
|
if (!dissector_uses_key(flow_dissector, FLOW_DISSECTOR_KEY_IP)) |
|
773 |
|
return; |
|
774 |
|
|
|
775 |
|
key_ip = skb_flow_dissector_target(flow_dissector, |
|
776 |
|
FLOW_DISSECTOR_KEY_IP, |
|
777 |
|
target_container); |
|
778 |
|
key_ip->tos = ipv6_get_dsfield(iph); |
|
779 |
|
key_ip->ttl = iph->hop_limit; |
|
780 |
|
} |
|
781 |
|
|
|
782 |
|
/* Maximum number of protocol headers that can be parsed in |
|
783 |
|
* __skb_flow_dissect |
|
784 |
|
*/ |
|
785 |
|
#define MAX_FLOW_DISSECT_HDRS 15 |
|
786 |
|
|
|
787 |
|
static bool skb_flow_dissect_allowed(int *num_hdrs) |
|
788 |
|
{ |
|
789 |
|
++*num_hdrs; |
|
790 |
|
|
|
791 |
|
return (*num_hdrs <= MAX_FLOW_DISSECT_HDRS); |
|
792 |
|
} |
|
793 |
|
|
|
794 |
|
static void __skb_flow_bpf_to_target(const struct bpf_flow_keys *flow_keys, |
|
795 |
|
struct flow_dissector *flow_dissector, |
|
796 |
|
void *target_container) |
|
797 |
|
{ |
|
798 |
|
struct flow_dissector_key_ports *key_ports = NULL; |
|
799 |
|
struct flow_dissector_key_control *key_control; |
|
800 |
|
struct flow_dissector_key_basic *key_basic; |
|
801 |
|
struct flow_dissector_key_addrs *key_addrs; |
|
802 |
|
struct flow_dissector_key_tags *key_tags; |
|
803 |
|
|
|
804 |
|
key_control = skb_flow_dissector_target(flow_dissector, |
|
805 |
|
FLOW_DISSECTOR_KEY_CONTROL, |
|
806 |
|
target_container); |
|
807 |
|
key_control->thoff = flow_keys->thoff; |
|
808 |
|
if (flow_keys->is_frag) |
|
809 |
|
key_control->flags |= FLOW_DIS_IS_FRAGMENT; |
|
810 |
|
if (flow_keys->is_first_frag) |
|
811 |
|
key_control->flags |= FLOW_DIS_FIRST_FRAG; |
|
812 |
|
if (flow_keys->is_encap) |
|
813 |
|
key_control->flags |= FLOW_DIS_ENCAPSULATION; |
|
814 |
|
|
|
815 |
|
key_basic = skb_flow_dissector_target(flow_dissector, |
|
816 |
|
FLOW_DISSECTOR_KEY_BASIC, |
|
817 |
|
target_container); |
|
818 |
|
key_basic->n_proto = flow_keys->n_proto; |
|
819 |
|
key_basic->ip_proto = flow_keys->ip_proto; |
|
820 |
|
|
|
821 |
|
if (flow_keys->addr_proto == ETH_P_IP && |
|
822 |
|
dissector_uses_key(flow_dissector, FLOW_DISSECTOR_KEY_IPV4_ADDRS)) { |
|
823 |
|
key_addrs = skb_flow_dissector_target(flow_dissector, |
|
824 |
|
FLOW_DISSECTOR_KEY_IPV4_ADDRS, |
|
825 |
|
target_container); |
|
826 |
|
key_addrs->v4addrs.src = flow_keys->ipv4_src; |
|
827 |
|
key_addrs->v4addrs.dst = flow_keys->ipv4_dst; |
|
828 |
|
key_control->addr_type = FLOW_DISSECTOR_KEY_IPV4_ADDRS; |
|
829 |
|
} else if (flow_keys->addr_proto == ETH_P_IPV6 && |
|
830 |
|
dissector_uses_key(flow_dissector, |
|
831 |
|
FLOW_DISSECTOR_KEY_IPV6_ADDRS)) { |
|
832 |
|
key_addrs = skb_flow_dissector_target(flow_dissector, |
|
833 |
|
FLOW_DISSECTOR_KEY_IPV6_ADDRS, |
|
834 |
|
target_container); |
|
835 |
|
memcpy(&key_addrs->v6addrs.src, &flow_keys->ipv6_src, |
|
836 |
|
sizeof(key_addrs->v6addrs.src)); |
|
837 |
|
memcpy(&key_addrs->v6addrs.dst, &flow_keys->ipv6_dst, |
|
838 |
|
sizeof(key_addrs->v6addrs.dst)); |
|
839 |
|
key_control->addr_type = FLOW_DISSECTOR_KEY_IPV6_ADDRS; |
|
840 |
|
} |
|
841 |
|
|
|
842 |
|
if (dissector_uses_key(flow_dissector, FLOW_DISSECTOR_KEY_PORTS)) |
|
843 |
|
key_ports = skb_flow_dissector_target(flow_dissector, |
|
844 |
|
FLOW_DISSECTOR_KEY_PORTS, |
|
845 |
|
target_container); |
|
846 |
|
else if (dissector_uses_key(flow_dissector, |
|
847 |
|
FLOW_DISSECTOR_KEY_PORTS_RANGE)) |
|
848 |
|
key_ports = skb_flow_dissector_target(flow_dissector, |
|
849 |
|
FLOW_DISSECTOR_KEY_PORTS_RANGE, |
|
850 |
|
target_container); |
|
851 |
|
|
|
852 |
|
if (key_ports) { |
|
853 |
|
key_ports->src = flow_keys->sport; |
|
854 |
|
key_ports->dst = flow_keys->dport; |
|
855 |
|
} |
|
856 |
|
|
|
857 |
|
if (dissector_uses_key(flow_dissector, |
|
858 |
|
FLOW_DISSECTOR_KEY_FLOW_LABEL)) { |
|
859 |
|
key_tags = skb_flow_dissector_target(flow_dissector, |
|
860 |
|
FLOW_DISSECTOR_KEY_FLOW_LABEL, |
|
861 |
|
target_container); |
|
862 |
|
key_tags->flow_label = ntohl(flow_keys->flow_label); |
|
863 |
|
} |
|
864 |
|
} |
|
865 |
|
|
|
866 |
|
bool bpf_flow_dissect(struct bpf_prog *prog, struct bpf_flow_dissector *ctx, |
|
867 |
|
__be16 proto, int nhoff, int hlen, unsigned int flags) |
|
868 |
|
{ |
|
869 |
|
struct bpf_flow_keys *flow_keys = ctx->flow_keys; |
|
870 |
|
u32 result; |
|
871 |
|
|
|
872 |
|
/* Pass parameters to the BPF program */ |
|
873 |
|
memset(flow_keys, 0, sizeof(*flow_keys)); |
|
874 |
|
flow_keys->n_proto = proto; |
|
875 |
|
flow_keys->nhoff = nhoff; |
|
876 |
|
flow_keys->thoff = flow_keys->nhoff; |
|
877 |
|
|
|
878 |
|
BUILD_BUG_ON((int)BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG != |
|
879 |
|
(int)FLOW_DISSECTOR_F_PARSE_1ST_FRAG); |
|
880 |
|
BUILD_BUG_ON((int)BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL != |
|
881 |
|
(int)FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL); |
|
882 |
|
BUILD_BUG_ON((int)BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP != |
|
883 |
|
(int)FLOW_DISSECTOR_F_STOP_AT_ENCAP); |
|
884 |
|
flow_keys->flags = flags; |
|
885 |
|
|
|
886 |
|
result = bpf_prog_run_pin_on_cpu(prog, ctx); |
|
887 |
|
|
|
888 |
|
flow_keys->nhoff = clamp_t(u16, flow_keys->nhoff, nhoff, hlen); |
|
889 |
|
flow_keys->thoff = clamp_t(u16, flow_keys->thoff, |
|
890 |
|
flow_keys->nhoff, hlen); |
|
891 |
|
|
|
892 |
|
return result == BPF_OK; |
|
893 |
|
} |
|
894 |
|
|
|
895 |
|
/** |
|
896 |
|
* __skb_flow_dissect - extract the flow_keys struct and return it |
|
897 |
|
* @net: associated network namespace, derived from @skb if NULL |
|
898 |
|
* @skb: sk_buff to extract the flow from, can be NULL if the rest are specified |
|
899 |
|
* @flow_dissector: list of keys to dissect |
|
900 |
|
* @target_container: target structure to put dissected values into |
|
901 |
|
* @data: raw buffer pointer to the packet, if NULL use skb->data |
|
902 |
|
* @proto: protocol for which to get the flow, if @data is NULL use skb->protocol |
|
903 |
|
* @nhoff: network header offset, if @data is NULL use skb_network_offset(skb) |
|
904 |
|
* @hlen: packet header length, if @data is NULL use skb_headlen(skb) |
|
905 |
|
* @flags: flags that control the dissection process, e.g. |
|
906 |
|
* FLOW_DISSECTOR_F_STOP_AT_ENCAP. |
|
907 |
|
* |
|
908 |
|
* The function will try to retrieve individual keys into target specified |
|
909 |
|
* by flow_dissector from either the skbuff or a raw buffer specified by the |
|
910 |
|
* rest parameters. |
|
911 |
|
* |
|
912 |
|
* Caller must take care of zeroing target container memory. |
|
913 |
|
*/ |
|
914 |
|
bool __skb_flow_dissect(const struct net *net, |
|
915 |
|
const struct sk_buff *skb, |
|
916 |
|
struct flow_dissector *flow_dissector, |
|
917 |
|
void *target_container, const void *data, |
|
918 |
|
__be16 proto, int nhoff, int hlen, unsigned int flags) |
|
919 |
|
{ |
|
920 |
|
struct flow_dissector_key_control *key_control; |
|
921 |
|
struct flow_dissector_key_basic *key_basic; |
|
922 |
|
struct flow_dissector_key_addrs *key_addrs; |
|
923 |
|
struct flow_dissector_key_tags *key_tags; |
|
924 |
|
struct flow_dissector_key_vlan *key_vlan; |
|
925 |
|
enum flow_dissect_ret fdret; |
|
926 |
|
enum flow_dissector_key_id dissector_vlan = FLOW_DISSECTOR_KEY_MAX; |
|
927 |
|
bool mpls_el = false; |
|
928 |
|
int mpls_lse = 0; |
|
929 |
|
int num_hdrs = 0; |
|
930 |
|
u8 ip_proto = 0; |
|
931 |
|
bool ret; |
|
932 |
|
|
|
933 |
|
if (!data) { |
|
934 |
|
data = skb->data; |
|
935 |
|
proto = skb_vlan_tag_present(skb) ? |
|
936 |
|
skb->vlan_proto : skb->protocol; |
|
937 |
|
nhoff = skb_network_offset(skb); |
|
938 |
|
hlen = skb_headlen(skb); |
|
939 |
|
#if IS_ENABLED(CONFIG_NET_DSA) |
|
940 |
|
if (unlikely(skb->dev && netdev_uses_dsa(skb->dev) && |
|
941 |
|
proto == HTONS(ETH_P_XDSA))) { |
|
942 |
|
const struct dsa_device_ops *ops; |
|
943 |
|
int offset = 0; |
|
944 |
|
|
|
945 |
|
ops = skb->dev->dsa_ptr->tag_ops; |
|
946 |
|
/* Tail taggers don't break flow dissection */ |
|
947 |
|
if (!ops->tail_tag) { |
|
948 |
|
if (ops->flow_dissect) |
|
949 |
|
ops->flow_dissect(skb, &proto, &offset); |
|
950 |
|
else |
|
951 |
|
dsa_tag_generic_flow_dissect(skb, |
|
952 |
|
&proto, |
|
953 |
|
&offset); |
|
954 |
|
hlen -= offset; |
|
955 |
|
nhoff += offset; |
|
956 |
|
} |
|
957 |
|
} |
|
958 |
|
#endif |
|
959 |
|
} |
|
960 |
|
|
|
961 |
|
/* It is ensured by skb_flow_dissector_init() that control key will |
|
962 |
|
* be always present. |
|
963 |
|
*/ |
|
964 |
|
key_control = skb_flow_dissector_target(flow_dissector, |
|
965 |
|
FLOW_DISSECTOR_KEY_CONTROL, |
|
966 |
|
target_container); |
|
967 |
|
|
|
968 |
|
/* It is ensured by skb_flow_dissector_init() that basic key will |
|
969 |
|
* be always present. |
|
970 |
|
*/ |
|
971 |
|
key_basic = skb_flow_dissector_target(flow_dissector, |
|
972 |
|
FLOW_DISSECTOR_KEY_BASIC, |
|
973 |
|
target_container); |
|
974 |
|
|
|
975 |
|
if (skb) { |
|
976 |
|
if (!net) { |
|
977 |
|
if (skb->dev) |
|
978 |
|
net = dev_net(skb->dev); |
|
979 |
|
else if (skb->sk) |
|
980 |
|
net = sock_net(skb->sk); |
|
981 |
|
} |
|
982 |
|
} |
|
983 |
|
|
|
984 |
|
WARN_ON_ONCE(!net); |
|
985 |
|
if (net) { |
|
986 |
|
enum netns_bpf_attach_type type = NETNS_BPF_FLOW_DISSECTOR; |
|
987 |
|
struct bpf_prog_array *run_array; |
|
988 |
|
|
|
989 |
|
rcu_read_lock(); |
|
990 |
|
run_array = rcu_dereference(init_net.bpf.run_array[type]); |
|
991 |
|
if (!run_array) |
|
992 |
|
run_array = rcu_dereference(net->bpf.run_array[type]); |
|
993 |
|
|
|
994 |
|
if (run_array) { |
|
995 |
|
struct bpf_flow_keys flow_keys; |
|
996 |
|
struct bpf_flow_dissector ctx = { |
|
997 |
|
.flow_keys = &flow_keys, |
|
998 |
|
.data = data, |
|
999 |
|
.data_end = data + hlen, |
|
1000 |
|
}; |
|
1001 |
|
__be16 n_proto = proto; |
|
1002 |
|
struct bpf_prog *prog; |
|
1003 |
|
|
|
1004 |
|
if (skb) { |
|
1005 |
|
ctx.skb = skb; |
|
1006 |
|
/* we can't use 'proto' in the skb case |
|
1007 |
|
* because it might be set to skb->vlan_proto |
|
1008 |
|
* which has been pulled from the data |
|
1009 |
|
*/ |
|
1010 |
|
n_proto = skb->protocol; |
|
1011 |
|
} |
|
1012 |
|
|
|
1013 |
|
prog = READ_ONCE(run_array->items[0].prog); |
|
1014 |
|
ret = bpf_flow_dissect(prog, &ctx, n_proto, nhoff, |
|
1015 |
|
hlen, flags); |
|
1016 |
|
__skb_flow_bpf_to_target(&flow_keys, flow_dissector, |
|
1017 |
|
target_container); |
|
1018 |
|
rcu_read_unlock(); |
|
1019 |
|
return ret; |
|
1020 |
|
} |
|
1021 |
|
rcu_read_unlock(); |
|
1022 |
|
} |
|
1023 |
|
|
|
1024 |
|
if (dissector_uses_key(flow_dissector, |
|
1025 |
|
FLOW_DISSECTOR_KEY_ETH_ADDRS)) { |
|
1026 |
|
struct ethhdr *eth = eth_hdr(skb); |
|
1027 |
|
struct flow_dissector_key_eth_addrs *key_eth_addrs; |
|
1028 |
|
|
|
1029 |
|
key_eth_addrs = skb_flow_dissector_target(flow_dissector, |
|
1030 |
|
FLOW_DISSECTOR_KEY_ETH_ADDRS, |
|
1031 |
|
target_container); |
|
1032 |
|
memcpy(key_eth_addrs, ð->h_dest, sizeof(*key_eth_addrs)); |
|
1033 |
|
} |
|
1034 |
|
|
|
1035 |
|
proto_again: |
|
1036 |
|
fdret = FLOW_DISSECT_RET_CONTINUE; |
|
1037 |
|
|
|
1038 |
|
switch (proto) { |
|
1039 |
|
case HTONS(ETH_P_IP): { |
|
1040 |
|
const struct iphdr *iph; |
|
1041 |
|
struct iphdr _iph; |
|
1042 |
|
|
|
1043 |
|
iph = __skb_header_pointer(skb, nhoff, sizeof(_iph), data, hlen, &_iph); |
|
1044 |
|
if (!iph || iph->ihl < 5) { |
|
1045 |
|
fdret = FLOW_DISSECT_RET_OUT_BAD; |
|
1046 |
|
break; |
|
1047 |
|
} |
|
1048 |
|
|
|
1049 |
|
nhoff += iph->ihl * 4; |
|
1050 |
|
|
|
1051 |
|
ip_proto = iph->protocol; |
|
1052 |
|
|
|
1053 |
|
if (dissector_uses_key(flow_dissector, |
|
1054 |
|
FLOW_DISSECTOR_KEY_IPV4_ADDRS)) { |
|
1055 |
|
key_addrs = skb_flow_dissector_target(flow_dissector, |
|
1056 |
|
FLOW_DISSECTOR_KEY_IPV4_ADDRS, |
|
1057 |
|
target_container); |
|
1058 |
|
|
|
1059 |
|
memcpy(&key_addrs->v4addrs, &iph->saddr, |
|
1060 |
|
sizeof(key_addrs->v4addrs)); |
|
1061 |
|
key_control->addr_type = FLOW_DISSECTOR_KEY_IPV4_ADDRS; |
|
1062 |
|
} |
|
1063 |
|
|
|
1064 |
|
__skb_flow_dissect_ipv4(skb, flow_dissector, |
|
1065 |
|
target_container, data, iph); |
|
1066 |
|
|
|
1067 |
|
if (ip_is_fragment(iph)) { |
|
1068 |
|
key_control->flags |= FLOW_DIS_IS_FRAGMENT; |
|
1069 |
|
|
|
1070 |
|
if (iph->frag_off & HTONS(IP_OFFSET)) { |
|
1071 |
|
fdret = FLOW_DISSECT_RET_OUT_GOOD; |
|
1072 |
|
break; |
|
1073 |
|
} else { |
|
1074 |
|
key_control->flags |= FLOW_DIS_FIRST_FRAG; |
|
1075 |
|
if (!(flags & |
|
1076 |
|
FLOW_DISSECTOR_F_PARSE_1ST_FRAG)) { |
|
1077 |
|
fdret = FLOW_DISSECT_RET_OUT_GOOD; |
|
1078 |
|
break; |
|
1079 |
|
} |
|
1080 |
|
} |
|
1081 |
|
} |
|
1082 |
|
|
|
1083 |
|
break; |
|
1084 |
|
} |
|
1085 |
|
case HTONS(ETH_P_IPV6): { |
|
1086 |
|
const struct ipv6hdr *iph; |
|
1087 |
|
struct ipv6hdr _iph; |
|
1088 |
|
|
|
1089 |
|
iph = __skb_header_pointer(skb, nhoff, sizeof(_iph), data, hlen, &_iph); |
|
1090 |
|
if (!iph) { |
|
1091 |
|
fdret = FLOW_DISSECT_RET_OUT_BAD; |
|
1092 |
|
break; |
|
1093 |
|
} |
|
1094 |
|
|
|
1095 |
|
ip_proto = iph->nexthdr; |
|
1096 |
|
nhoff += sizeof(struct ipv6hdr); |
|
1097 |
|
|
|
1098 |
|
if (dissector_uses_key(flow_dissector, |
|
1099 |
|
FLOW_DISSECTOR_KEY_IPV6_ADDRS)) { |
|
1100 |
|
key_addrs = skb_flow_dissector_target(flow_dissector, |
|
1101 |
|
FLOW_DISSECTOR_KEY_IPV6_ADDRS, |
|
1102 |
|
target_container); |
|
1103 |
|
|
|
1104 |
|
memcpy(&key_addrs->v6addrs, &iph->saddr, |
|
1105 |
|
sizeof(key_addrs->v6addrs)); |
|
1106 |
|
key_control->addr_type = FLOW_DISSECTOR_KEY_IPV6_ADDRS; |
|
1107 |
|
} |
|
1108 |
|
|
|
1109 |
|
if ((dissector_uses_key(flow_dissector, |
|
1110 |
|
FLOW_DISSECTOR_KEY_FLOW_LABEL) || |
|
1111 |
|
(flags & FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL)) && |
|
1112 |
|
ip6_flowlabel(iph)) { |
|
1113 |
|
__be32 flow_label = ip6_flowlabel(iph); |
|
1114 |
|
|
|
1115 |
|
if (dissector_uses_key(flow_dissector, |
|
1116 |
|
FLOW_DISSECTOR_KEY_FLOW_LABEL)) { |
|
1117 |
|
key_tags = skb_flow_dissector_target(flow_dissector, |
|
1118 |
|
FLOW_DISSECTOR_KEY_FLOW_LABEL, |
|
1119 |
|
target_container); |
|
1120 |
|
key_tags->flow_label = ntohl(flow_label); |
|
1121 |
|
} |
|
1122 |
|
if (flags & FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL) { |
|
1123 |
|
fdret = FLOW_DISSECT_RET_OUT_GOOD; |
|
1124 |
|
break; |
|
1125 |
|
} |
|
1126 |
|
} |
|
1127 |
|
|
|
1128 |
|
__skb_flow_dissect_ipv6(skb, flow_dissector, |
|
1129 |
|
target_container, data, iph); |
|
1130 |
|
|
|
1131 |
|
break; |
|
1132 |
|
} |
|
1133 |
|
case HTONS(ETH_P_8021AD): |
|
1134 |
|
case HTONS(ETH_P_8021Q): { |
|
1135 |
|
const struct vlan_hdr *vlan = NULL; |
|
1136 |
|
struct vlan_hdr _vlan; |
|
1137 |
|
__be16 saved_vlan_tpid = proto; |
|
1138 |
|
|
|
1139 |
|
if (dissector_vlan == FLOW_DISSECTOR_KEY_MAX && |
|
1140 |
|
skb && skb_vlan_tag_present(skb)) { |
|
1141 |
|
proto = skb->protocol; |
|
1142 |
|
} else { |
|
1143 |
|
vlan = __skb_header_pointer(skb, nhoff, sizeof(_vlan), |
|
1144 |
|
data, hlen, &_vlan); |
|
1145 |
|
if (!vlan) { |
|
1146 |
|
fdret = FLOW_DISSECT_RET_OUT_BAD; |
|
1147 |
|
break; |
|
1148 |
|
} |
|
1149 |
|
|
|
1150 |
|
proto = vlan->h_vlan_encapsulated_proto; |
|
1151 |
|
nhoff += sizeof(*vlan); |
|
1152 |
|
} |
|
1153 |
|
|
|
1154 |
|
if (dissector_vlan == FLOW_DISSECTOR_KEY_MAX) { |
|
1155 |
|
dissector_vlan = FLOW_DISSECTOR_KEY_VLAN; |
|
1156 |
|
} else if (dissector_vlan == FLOW_DISSECTOR_KEY_VLAN) { |
|
1157 |
|
dissector_vlan = FLOW_DISSECTOR_KEY_CVLAN; |
|
1158 |
|
} else { |
|
1159 |
|
fdret = FLOW_DISSECT_RET_PROTO_AGAIN; |
|
1160 |
|
break; |
|
1161 |
|
} |
|
1162 |
|
|
|
1163 |
|
if (dissector_uses_key(flow_dissector, dissector_vlan)) { |
|
1164 |
|
key_vlan = skb_flow_dissector_target(flow_dissector, |
|
1165 |
|
dissector_vlan, |
|
1166 |
|
target_container); |
|
1167 |
|
|
|
1168 |
|
if (!vlan) { |
|
1169 |
|
key_vlan->vlan_id = skb_vlan_tag_get_id(skb); |
|
1170 |
|
key_vlan->vlan_priority = skb_vlan_tag_get_prio(skb); |
|
1171 |
|
} else { |
|
1172 |
|
key_vlan->vlan_id = ntohs(vlan->h_vlan_TCI) & |
|
1173 |
|
VLAN_VID_MASK; |
|
1174 |
|
key_vlan->vlan_priority = |
|
1175 |
|
(ntohs(vlan->h_vlan_TCI) & |
|
1176 |
|
VLAN_PRIO_MASK) >> VLAN_PRIO_SHIFT; |
|
1177 |
|
} |
|
1178 |
|
key_vlan->vlan_tpid = saved_vlan_tpid; |
|
1179 |
|
} |
|
1180 |
|
|
|
1181 |
|
fdret = FLOW_DISSECT_RET_PROTO_AGAIN; |
|
1182 |
|
break; |
|
1183 |
|
} |
|
1184 |
|
case HTONS(ETH_P_PPP_SES): { |
|
1185 |
|
struct { |
|
1186 |
|
struct pppoe_hdr hdr; |
|
1187 |
|
__be16 proto; |
|
1188 |
|
} *hdr, _hdr; |
|
1189 |
|
hdr = __skb_header_pointer(skb, nhoff, sizeof(_hdr), data, hlen, &_hdr); |
|
1190 |
|
if (!hdr) { |
|
1191 |
|
fdret = FLOW_DISSECT_RET_OUT_BAD; |
|
1192 |
|
break; |
|
1193 |
|
} |
|
1194 |
|
|
|
1195 |
|
proto = hdr->proto; |
|
1196 |
|
nhoff += PPPOE_SES_HLEN; |
|
1197 |
|
switch (proto) { |
|
1198 |
|
case HTONS(PPP_IP): |
|
1199 |
|
proto = HTONS(ETH_P_IP); |
|
1200 |
|
fdret = FLOW_DISSECT_RET_PROTO_AGAIN; |
|
1201 |
|
break; |
|
1202 |
|
case HTONS(PPP_IPV6): |
|
1203 |
|
proto = HTONS(ETH_P_IPV6); |
|
1204 |
|
fdret = FLOW_DISSECT_RET_PROTO_AGAIN; |
|
1205 |
|
break; |
|
1206 |
|
default: |
|
1207 |
|
fdret = FLOW_DISSECT_RET_OUT_BAD; |
|
1208 |
|
break; |
|
1209 |
|
} |
|
1210 |
|
break; |
|
1211 |
|
} |
|
1212 |
|
case HTONS(ETH_P_TIPC): { |
|
1213 |
|
struct tipc_basic_hdr *hdr, _hdr; |
|
1214 |
|
|
|
1215 |
|
hdr = __skb_header_pointer(skb, nhoff, sizeof(_hdr), |
|
1216 |
|
data, hlen, &_hdr); |
|
1217 |
|
if (!hdr) { |
|
1218 |
|
fdret = FLOW_DISSECT_RET_OUT_BAD; |
|
1219 |
|
break; |
|
1220 |
|
} |
|
1221 |
|
|
|
1222 |
|
if (dissector_uses_key(flow_dissector, |
|
1223 |
|
FLOW_DISSECTOR_KEY_TIPC)) { |
|
1224 |
|
key_addrs = skb_flow_dissector_target(flow_dissector, |
|
1225 |
|
FLOW_DISSECTOR_KEY_TIPC, |
|
1226 |
|
target_container); |
|
1227 |
|
key_addrs->tipckey.key = tipc_hdr_rps_key(hdr); |
|
1228 |
|
key_control->addr_type = FLOW_DISSECTOR_KEY_TIPC; |
|
1229 |
|
} |
|
1230 |
|
fdret = FLOW_DISSECT_RET_OUT_GOOD; |
|
1231 |
|
break; |
|
1232 |
|
} |
|
1233 |
|
|
|
1234 |
|
case HTONS(ETH_P_MPLS_UC): |
|
1235 |
|
case HTONS(ETH_P_MPLS_MC): |
|
1236 |
|
fdret = __skb_flow_dissect_mpls(skb, flow_dissector, |
|
1237 |
|
target_container, data, |
|
1238 |
|
nhoff, hlen, mpls_lse, |
|
1239 |
|
&mpls_el); |
|
1240 |
|
nhoff += sizeof(struct mpls_label); |
|
1241 |
|
mpls_lse++; |
|
1242 |
|
break; |
|
1243 |
|
case HTONS(ETH_P_FCOE): |
|
1244 |
|
if ((hlen - nhoff) < FCOE_HEADER_LEN) { |
|
1245 |
|
fdret = FLOW_DISSECT_RET_OUT_BAD; |
|
1246 |
|
break; |
|
1247 |
|
} |
|
1248 |
|
|
|
1249 |
|
nhoff += FCOE_HEADER_LEN; |
|
1250 |
|
fdret = FLOW_DISSECT_RET_OUT_GOOD; |
|
1251 |
|
break; |
|
1252 |
|
|
|
1253 |
|
case HTONS(ETH_P_ARP): |
|
1254 |
|
case HTONS(ETH_P_RARP): |
|
1255 |
|
fdret = __skb_flow_dissect_arp(skb, flow_dissector, |
|
1256 |
|
target_container, data, |
|
1257 |
|
nhoff, hlen); |
|
1258 |
|
break; |
|
1259 |
|
|
|
1260 |
|
case HTONS(ETH_P_BATMAN): |
|
1261 |
|
fdret = __skb_flow_dissect_batadv(skb, key_control, data, |
|
1262 |
|
&proto, &nhoff, hlen, flags); |
|
1263 |
|
break; |
|
1264 |
|
|
|
1265 |
|
case HTONS(ETH_P_1588): { |
|
1266 |
|
struct ptp_header *hdr, _hdr; |
|
1267 |
|
|
|
1268 |
|
hdr = __skb_header_pointer(skb, nhoff, sizeof(_hdr), data, |
|
1269 |
|
hlen, &_hdr); |
|
1270 |
|
if (!hdr) { |
|
1271 |
|
fdret = FLOW_DISSECT_RET_OUT_BAD; |
|
1272 |
|
break; |
|
1273 |
|
} |
|
1274 |
|
|
|
1275 |
|
nhoff += ntohs(hdr->message_length); |
|
1276 |
|
fdret = FLOW_DISSECT_RET_OUT_GOOD; |
|
1277 |
|
break; |
|
1278 |
|
} |
|
1279 |
|
|
|
1280 |
|
default: |
|
1281 |
|
fdret = FLOW_DISSECT_RET_OUT_BAD; |
|
1282 |
|
break; |
|
1283 |
|
} |
|
1284 |
|
|
|
1285 |
|
/* Process result of proto processing */ |
|
1286 |
|
switch (fdret) { |
|
1287 |
|
case FLOW_DISSECT_RET_OUT_GOOD: |
|
1288 |
|
goto out_good; |
|
1289 |
|
case FLOW_DISSECT_RET_PROTO_AGAIN: |
|
1290 |
|
if (skb_flow_dissect_allowed(&num_hdrs)) |
|
1291 |
|
goto proto_again; |
|
1292 |
|
goto out_good; |
|
1293 |
|
case FLOW_DISSECT_RET_CONTINUE: |
|
1294 |
|
case FLOW_DISSECT_RET_IPPROTO_AGAIN: |
|
1295 |
|
break; |
|
1296 |
|
case FLOW_DISSECT_RET_OUT_BAD: |
|
1297 |
|
default: |
|
1298 |
|
goto out_bad; |
|
1299 |
|
} |
|
1300 |
|
|
|
1301 |
|
ip_proto_again: |
|
1302 |
|
fdret = FLOW_DISSECT_RET_CONTINUE; |
|
1303 |
|
|
|
1304 |
|
switch (ip_proto) { |
|
1305 |
|
case IPPROTO_GRE: |
|
1306 |
|
fdret = __skb_flow_dissect_gre(skb, key_control, flow_dissector, |
|
1307 |
|
target_container, data, |
|
1308 |
|
&proto, &nhoff, &hlen, flags); |
|
1309 |
|
break; |
|
1310 |
|
|
|
1311 |
|
case NEXTHDR_HOP: |
|
1312 |
|
case NEXTHDR_ROUTING: |
|
1313 |
|
case NEXTHDR_DEST: { |
|
1314 |
|
u8 _opthdr[2], *opthdr; |
|
1315 |
|
|
|
1316 |
|
if (proto != HTONS(ETH_P_IPV6)) |
|
1317 |
|
break; |
|
1318 |
|
|
|
1319 |
|
opthdr = __skb_header_pointer(skb, nhoff, sizeof(_opthdr), |
|
1320 |
|
data, hlen, &_opthdr); |
|
1321 |
|
if (!opthdr) { |
|
1322 |
|
fdret = FLOW_DISSECT_RET_OUT_BAD; |
|
1323 |
|
break; |
|
1324 |
|
} |
|
1325 |
|
|
|
1326 |
|
ip_proto = opthdr[0]; |
|
1327 |
|
nhoff += (opthdr[1] + 1) << 3; |
|
1328 |
|
|
|
1329 |
|
fdret = FLOW_DISSECT_RET_IPPROTO_AGAIN; |
|
1330 |
|
break; |
|
1331 |
|
} |
|
1332 |
|
case NEXTHDR_FRAGMENT: { |
|
1333 |
|
struct frag_hdr _fh, *fh; |
|
1334 |
|
|
|
1335 |
|
if (proto != HTONS(ETH_P_IPV6)) |
|
1336 |
|
break; |
|
1337 |
|
|
|
1338 |
|
fh = __skb_header_pointer(skb, nhoff, sizeof(_fh), |
|
1339 |
|
data, hlen, &_fh); |
|
1340 |
|
|
|
1341 |
|
if (!fh) { |
|
1342 |
|
fdret = FLOW_DISSECT_RET_OUT_BAD; |
|
1343 |
|
break; |
|
1344 |
|
} |
|
1345 |
|
|
|
1346 |
|
key_control->flags |= FLOW_DIS_IS_FRAGMENT; |
|
1347 |
|
|
|
1348 |
|
nhoff += sizeof(_fh); |
|
1349 |
|
ip_proto = fh->nexthdr; |
|
1350 |
|
|
|
1351 |
|
if (!(fh->frag_off & HTONS(IP6_OFFSET))) { |
|
1352 |
|
key_control->flags |= FLOW_DIS_FIRST_FRAG; |
|
1353 |
|
if (flags & FLOW_DISSECTOR_F_PARSE_1ST_FRAG) { |
|
1354 |
|
fdret = FLOW_DISSECT_RET_IPPROTO_AGAIN; |
|
1355 |
|
break; |
|
1356 |
|
} |
|
1357 |
|
} |
|
1358 |
|
|
|
1359 |
|
fdret = FLOW_DISSECT_RET_OUT_GOOD; |
|
1360 |
|
break; |
|
1361 |
|
} |
|
1362 |
|
case IPPROTO_IPIP: |
|
1363 |
|
proto = HTONS(ETH_P_IP); |
|
1364 |
|
|
|
1365 |
|
key_control->flags |= FLOW_DIS_ENCAPSULATION; |
|
1366 |
|
if (flags & FLOW_DISSECTOR_F_STOP_AT_ENCAP) { |
|
1367 |
|
fdret = FLOW_DISSECT_RET_OUT_GOOD; |
|
1368 |
|
break; |
|
1369 |
|
} |
|
1370 |
|
|
|
1371 |
|
fdret = FLOW_DISSECT_RET_PROTO_AGAIN; |
|
1372 |
|
break; |
|
1373 |
|
|
|
1374 |
|
case IPPROTO_IPV6: |
|
1375 |
|
proto = HTONS(ETH_P_IPV6); |
|
1376 |
|
|
|
1377 |
|
key_control->flags |= FLOW_DIS_ENCAPSULATION; |
|
1378 |
|
if (flags & FLOW_DISSECTOR_F_STOP_AT_ENCAP) { |
|
1379 |
|
fdret = FLOW_DISSECT_RET_OUT_GOOD; |
|
1380 |
|
break; |
|
1381 |
|
} |
|
1382 |
|
|
|
1383 |
|
fdret = FLOW_DISSECT_RET_PROTO_AGAIN; |
|
1384 |
|
break; |
|
1385 |
|
|
|
1386 |
|
|
|
1387 |
|
case IPPROTO_MPLS: |
|
1388 |
|
proto = HTONS(ETH_P_MPLS_UC); |
|
1389 |
|
fdret = FLOW_DISSECT_RET_PROTO_AGAIN; |
|
1390 |
|
break; |
|
1391 |
|
|
|
1392 |
|
case IPPROTO_TCP: |
|
1393 |
|
__skb_flow_dissect_tcp(skb, flow_dissector, target_container, |
|
1394 |
|
data, nhoff, hlen); |
|
1395 |
|
break; |
|
1396 |
|
|
|
1397 |
|
case IPPROTO_ICMP: |
|
1398 |
|
case IPPROTO_ICMPV6: |
|
1399 |
|
__skb_flow_dissect_icmp(skb, flow_dissector, target_container, |
|
1400 |
|
data, nhoff, hlen); |
|
1401 |
|
break; |
|
1402 |
|
|
|
1403 |
|
default: |
|
1404 |
|
break; |
|
1405 |
|
} |
|
1406 |
|
|
|
1407 |
|
if (!(key_control->flags & FLOW_DIS_IS_FRAGMENT)) |
|
1408 |
|
__skb_flow_dissect_ports(skb, flow_dissector, target_container, |
|
1409 |
|
data, nhoff, ip_proto, hlen); |
|
1410 |
|
|
|
1411 |
|
/* Process result of IP proto processing */ |
|
1412 |
|
switch (fdret) { |
|
1413 |
|
case FLOW_DISSECT_RET_PROTO_AGAIN: |
|
1414 |
|
if (skb_flow_dissect_allowed(&num_hdrs)) |
|
1415 |
|
goto proto_again; |
|
1416 |
|
break; |
|
1417 |
|
case FLOW_DISSECT_RET_IPPROTO_AGAIN: |
|
1418 |
|
if (skb_flow_dissect_allowed(&num_hdrs)) |
|
1419 |
|
goto ip_proto_again; |
|
1420 |
|
break; |
|
1421 |
|
case FLOW_DISSECT_RET_OUT_GOOD: |
|
1422 |
|
case FLOW_DISSECT_RET_CONTINUE: |
|
1423 |
|
break; |
|
1424 |
|
case FLOW_DISSECT_RET_OUT_BAD: |
|
1425 |
|
default: |
|
1426 |
|
goto out_bad; |
|
1427 |
|
} |
|
1428 |
|
|
|
1429 |
|
out_good: |
|
1430 |
|
ret = true; |
|
1431 |
|
|
|
1432 |
|
out: |
|
1433 |
|
key_control->thoff = min_t(u16, nhoff, skb ? skb->len : hlen); |
|
1434 |
|
key_basic->n_proto = proto; |
|
1435 |
|
key_basic->ip_proto = ip_proto; |
|
1436 |
|
|
|
1437 |
|
return ret; |
|
1438 |
|
|
|
1439 |
|
out_bad: |
|
1440 |
|
ret = false; |
|
1441 |
|
goto out; |
|
1442 |
|
} |
|
1443 |
|
EXPORT_SYMBOL(__skb_flow_dissect); |
|
1444 |
|
|
|
1445 |
|
static siphash_key_t hashrnd __read_mostly; |
|
1446 |
|
static __always_inline void __flow_hash_secret_init(void) |
|
1447 |
|
{ |
|
1448 |
|
net_get_random_once(&hashrnd, sizeof(hashrnd)); |
|
1449 |
|
} |
|
1450 |
|
|
|
1451 |
|
static const void *flow_keys_hash_start(const struct flow_keys *flow) |
|
1452 |
|
{ |
|
1453 |
|
BUILD_BUG_ON(FLOW_KEYS_HASH_OFFSET % SIPHASH_ALIGNMENT); |
|
1454 |
|
return &flow->FLOW_KEYS_HASH_START_FIELD; |
|
1455 |
|
} |
|
1456 |
|
|
|
1457 |
|
static inline size_t flow_keys_hash_length(const struct flow_keys *flow) |
|
1458 |
|
{ |
|
1459 |
|
size_t diff = FLOW_KEYS_HASH_OFFSET + sizeof(flow->addrs); |
|
1460 |
|
|
|
1461 |
|
BUILD_BUG_ON((sizeof(*flow) - FLOW_KEYS_HASH_OFFSET) % sizeof(u32)); |
|
1462 |
|
|
|
1463 |
|
switch (flow->control.addr_type) { |
|
1464 |
|
case FLOW_DISSECTOR_KEY_IPV4_ADDRS: |
|
1465 |
|
diff -= sizeof(flow->addrs.v4addrs); |
|
1466 |
|
break; |
|
1467 |
|
case FLOW_DISSECTOR_KEY_IPV6_ADDRS: |
|
1468 |
|
diff -= sizeof(flow->addrs.v6addrs); |
|
1469 |
|
break; |
|
1470 |
|
case FLOW_DISSECTOR_KEY_TIPC: |
|
1471 |
|
diff -= sizeof(flow->addrs.tipckey); |
|
1472 |
|
break; |
|
1473 |
|
} |
|
1474 |
|
return sizeof(*flow) - diff; |
|
1475 |
|
} |
|
1476 |
|
|
|
1477 |
|
__be32 flow_get_u32_src(const struct flow_keys *flow) |
|
1478 |
|
{ |
|
1479 |
|
switch (flow->control.addr_type) { |
|
1480 |
|
case FLOW_DISSECTOR_KEY_IPV4_ADDRS: |
|
1481 |
|
return flow->addrs.v4addrs.src; |
|
1482 |
|
case FLOW_DISSECTOR_KEY_IPV6_ADDRS: |
|
1483 |
|
return (__force __be32)ipv6_addr_hash( |
|
1484 |
|
&flow->addrs.v6addrs.src); |
|
1485 |
|
case FLOW_DISSECTOR_KEY_TIPC: |
|
1486 |
|
return flow->addrs.tipckey.key; |
|
1487 |
|
default: |
|
1488 |
|
return 0; |
|
1489 |
|
} |
|
1490 |
|
} |
|
1491 |
|
EXPORT_SYMBOL(flow_get_u32_src); |
|
1492 |
|
|
|
1493 |
|
__be32 flow_get_u32_dst(const struct flow_keys *flow) |
|
1494 |
|
{ |
|
1495 |
|
switch (flow->control.addr_type) { |
|
1496 |
|
case FLOW_DISSECTOR_KEY_IPV4_ADDRS: |
|
1497 |
|
return flow->addrs.v4addrs.dst; |
|
1498 |
|
case FLOW_DISSECTOR_KEY_IPV6_ADDRS: |
|
1499 |
|
return (__force __be32)ipv6_addr_hash( |
|
1500 |
|
&flow->addrs.v6addrs.dst); |
|
1501 |
|
default: |
|
1502 |
|
return 0; |
|
1503 |
|
} |
|
1504 |
|
} |
|
1505 |
|
EXPORT_SYMBOL(flow_get_u32_dst); |
|
1506 |
|
|
|
1507 |
|
/* Sort the source and destination IP (and the ports if the IP are the same), |
|
1508 |
|
* to have consistent hash within the two directions |
|
1509 |
|
*/ |
|
1510 |
|
static inline void __flow_hash_consistentify(struct flow_keys *keys) |
|
1511 |
|
{ |
|
1512 |
|
int addr_diff, i; |
|
1513 |
|
|
|
1514 |
|
switch (keys->control.addr_type) { |
|
1515 |
|
case FLOW_DISSECTOR_KEY_IPV4_ADDRS: |
|
1516 |
|
addr_diff = (__force u32)keys->addrs.v4addrs.dst - |
|
1517 |
|
(__force u32)keys->addrs.v4addrs.src; |
|
1518 |
|
if ((addr_diff < 0) || |
|
1519 |
|
(addr_diff == 0 && |
|
1520 |
|
((__force u16)keys->ports.dst < |
|
1521 |
|
(__force u16)keys->ports.src))) { |
|
1522 |
|
swap(keys->addrs.v4addrs.src, keys->addrs.v4addrs.dst); |
|
1523 |
|
swap(keys->ports.src, keys->ports.dst); |
|
1524 |
|
} |
|
1525 |
|
break; |
|
1526 |
|
case FLOW_DISSECTOR_KEY_IPV6_ADDRS: |
|
1527 |
|
addr_diff = memcmp(&keys->addrs.v6addrs.dst, |
|
1528 |
|
&keys->addrs.v6addrs.src, |
|
1529 |
|
sizeof(keys->addrs.v6addrs.dst)); |
|
1530 |
|
if ((addr_diff < 0) || |
|
1531 |
|
(addr_diff == 0 && |
|
1532 |
|
((__force u16)keys->ports.dst < |
|
1533 |
|
(__force u16)keys->ports.src))) { |
|
1534 |
|
for (i = 0; i < 4; i++) |
|
1535 |
|
swap(keys->addrs.v6addrs.src.s6_addr32[i], |
|
1536 |
|
keys->addrs.v6addrs.dst.s6_addr32[i]); |
|
1537 |
|
swap(keys->ports.src, keys->ports.dst); |
|
1538 |
|
} |
|
1539 |
|
break; |
|
1540 |
|
} |
|
1541 |
|
} |
|
1542 |
|
|
|
1543 |
|
static inline u32 __flow_hash_from_keys(struct flow_keys *keys, |
|
1544 |
|
const siphash_key_t *keyval) |
|
1545 |
|
{ |
|
1546 |
|
u32 hash; |
|
1547 |
|
|
|
1548 |
|
__flow_hash_consistentify(keys); |
|
1549 |
|
|
|
1550 |
|
hash = siphash(flow_keys_hash_start(keys), |
|
1551 |
|
flow_keys_hash_length(keys), keyval); |
|
1552 |
|
if (!hash) |
|
1553 |
|
hash = 1; |
|
1554 |
|
|
|
1555 |
|
return hash; |
|
1556 |
|
} |
|
1557 |
|
|
|
1558 |
|
u32 flow_hash_from_keys(struct flow_keys *keys) |
|
1559 |
|
{ |
|
1560 |
|
__flow_hash_secret_init(); |
|
1561 |
|
return __flow_hash_from_keys(keys, &hashrnd); |
|
1562 |
|
} |
|
1563 |
|
EXPORT_SYMBOL(flow_hash_from_keys); |
|
1564 |
|
|
|
1565 |
|
static inline u32 ___skb_get_hash(const struct sk_buff *skb, |
|
1566 |
|
struct flow_keys *keys, |
|
1567 |
|
const siphash_key_t *keyval) |
|
1568 |
|
{ |
|
1569 |
|
skb_flow_dissect_flow_keys(skb, keys, |
|
1570 |
|
FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL); |
|
1571 |
|
|
|
1572 |
|
return __flow_hash_from_keys(keys, keyval); |
|
1573 |
|
} |
|
1574 |
|
|
|
1575 |
|
struct _flow_keys_digest_data { |
|
1576 |
|
__be16 n_proto; |
|
1577 |
|
u8 ip_proto; |
|
1578 |
|
u8 padding; |
|
1579 |
|
__be32 ports; |
|
1580 |
|
__be32 src; |
|
1581 |
|
__be32 dst; |
|
1582 |
|
}; |
|
1583 |
|
|
|
1584 |
|
void make_flow_keys_digest(struct flow_keys_digest *digest, |
|
1585 |
|
const struct flow_keys *flow) |
|
1586 |
|
{ |
|
1587 |
|
struct _flow_keys_digest_data *data = |
|
1588 |
|
(struct _flow_keys_digest_data *)digest; |
|
1589 |
|
|
|
1590 |
|
BUILD_BUG_ON(sizeof(*data) > sizeof(*digest)); |
|
1591 |
|
|
|
1592 |
|
memset(digest, 0, sizeof(*digest)); |
|
1593 |
|
|
|
1594 |
|
data->n_proto = flow->basic.n_proto; |
|
1595 |
|
data->ip_proto = flow->basic.ip_proto; |
|
1596 |
|
data->ports = flow->ports.ports; |
|
1597 |
|
data->src = flow->addrs.v4addrs.src; |
|
1598 |
|
data->dst = flow->addrs.v4addrs.dst; |
|
1599 |
|
} |
|
1600 |
|
EXPORT_SYMBOL(make_flow_keys_digest); |
|
1601 |
|
|
|
1602 |
|
static struct flow_dissector flow_keys_dissector_symmetric __read_mostly; |
|
1603 |
|
|
|
1604 |
|
u32 __skb_get_hash_symmetric(const struct sk_buff *skb) |
|
1605 |
|
{ |
|
1606 |
|
struct flow_keys keys; |
|
1607 |
|
|
|
1608 |
|
__flow_hash_secret_init(); |
|
1609 |
|
|
|
1610 |
|
memset(&keys, 0, sizeof(keys)); |
|
1611 |
|
__skb_flow_dissect(NULL, skb, &flow_keys_dissector_symmetric, |
|
1612 |
|
&keys, NULL, 0, 0, 0, |
|
1613 |
|
FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL); |
|
1614 |
|
|
|
1615 |
|
return __flow_hash_from_keys(&keys, &hashrnd); |
|
1616 |
|
} |
|
1617 |
|
EXPORT_SYMBOL_GPL(__skb_get_hash_symmetric); |
|
1618 |
|
|
|
1619 |
|
/** |
|
1620 |
|
* __skb_get_hash: calculate a flow hash |
|
1621 |
|
* @skb: sk_buff to calculate flow hash from |
|
1622 |
|
* |
|
1623 |
|
* This function calculates a flow hash based on src/dst addresses |
|
1624 |
|
* and src/dst port numbers. Sets hash in skb to non-zero hash value |
|
1625 |
|
* on success, zero indicates no valid hash. Also, sets l4_hash in skb |
|
1626 |
|
* if hash is a canonical 4-tuple hash over transport ports. |
|
1627 |
|
*/ |
|
1628 |
|
void __skb_get_hash(struct sk_buff *skb) |
|
1629 |
|
{ |
|
1630 |
|
struct flow_keys keys; |
|
1631 |
|
u32 hash; |
|
1632 |
|
|
|
1633 |
|
__flow_hash_secret_init(); |
|
1634 |
|
|
|
1635 |
|
hash = ___skb_get_hash(skb, &keys, &hashrnd); |
|
1636 |
|
|
|
1637 |
|
__skb_set_sw_hash(skb, hash, flow_keys_have_l4(&keys)); |
|
1638 |
|
} |
|
1639 |
|
EXPORT_SYMBOL(__skb_get_hash); |
|
1640 |
|
|
|
1641 |
|
__u32 skb_get_hash_perturb(const struct sk_buff *skb, |
|
1642 |
|
const siphash_key_t *perturb) |
|
1643 |
|
{ |
|
1644 |
|
struct flow_keys keys; |
|
1645 |
|
|
|
1646 |
|
return ___skb_get_hash(skb, &keys, perturb); |
|
1647 |
|
} |
|
1648 |
|
EXPORT_SYMBOL(skb_get_hash_perturb); |
|
1649 |
|
|
|
1650 |
|
u32 __skb_get_poff(const struct sk_buff *skb, const void *data, |
|
1651 |
|
const struct flow_keys_basic *keys, int hlen) |
|
1652 |
|
{ |
|
1653 |
|
u32 poff = keys->control.thoff; |
|
1654 |
|
|
|
1655 |
|
/* skip L4 headers for fragments after the first */ |
|
1656 |
|
if ((keys->control.flags & FLOW_DIS_IS_FRAGMENT) && |
|
1657 |
|
!(keys->control.flags & FLOW_DIS_FIRST_FRAG)) |
|
1658 |
|
return poff; |
|
1659 |
|
|
|
1660 |
|
switch (keys->basic.ip_proto) { |
|
1661 |
|
case IPPROTO_TCP: { |
|
1662 |
|
/* access doff as u8 to avoid unaligned access */ |
|
1663 |
|
const u8 *doff; |
|
1664 |
|
u8 _doff; |
|
1665 |
|
|
|
1666 |
|
doff = __skb_header_pointer(skb, poff + 12, sizeof(_doff), |
|
1667 |
|
data, hlen, &_doff); |
|
1668 |
|
if (!doff) |
|
1669 |
|
return poff; |
|
1670 |
|
|
|
1671 |
|
poff += max_t(u32, sizeof(struct tcphdr), (*doff & 0xF0) >> 2); |
|
1672 |
|
break; |
|
1673 |
|
} |
|
1674 |
|
case IPPROTO_UDP: |
|
1675 |
|
case IPPROTO_UDPLITE: |
|
1676 |
|
poff += sizeof(struct udphdr); |
|
1677 |
|
break; |
|
1678 |
|
/* For the rest, we do not really care about header |
|
1679 |
|
* extensions at this point for now. |
|
1680 |
|
*/ |
|
1681 |
|
case IPPROTO_ICMP: |
|
1682 |
|
poff += sizeof(struct icmphdr); |
|
1683 |
|
break; |
|
1684 |
|
case IPPROTO_ICMPV6: |
|
1685 |
|
poff += sizeof(struct icmp6hdr); |
|
1686 |
|
break; |
|
1687 |
|
case IPPROTO_IGMP: |
|
1688 |
|
poff += sizeof(struct igmphdr); |
|
1689 |
|
break; |
|
1690 |
|
case IPPROTO_DCCP: |
|
1691 |
|
poff += sizeof(struct dccp_hdr); |
|
1692 |
|
break; |
|
1693 |
|
case IPPROTO_SCTP: |
|
1694 |
|
poff += sizeof(struct sctphdr); |
|
1695 |
|
break; |
|
1696 |
|
} |
|
1697 |
|
|
|
1698 |
|
return poff; |
|
1699 |
|
} |
|
1700 |
|
|
|
1701 |
|
/** |
|
1702 |
|
* skb_get_poff - get the offset to the payload |
|
1703 |
|
* @skb: sk_buff to get the payload offset from |
|
1704 |
|
* |
|
1705 |
|
* The function will get the offset to the payload as far as it could |
|
1706 |
|
* be dissected. The main user is currently BPF, so that we can dynamically |
|
1707 |
|
* truncate packets without needing to push actual payload to the user |
|
1708 |
|
* space and can analyze headers only, instead. |
|
1709 |
|
*/ |
|
1710 |
|
u32 skb_get_poff(const struct sk_buff *skb) |
|
1711 |
|
{ |
|
1712 |
|
struct flow_keys_basic keys; |
|
1713 |
|
|
|
1714 |
|
if (!skb_flow_dissect_flow_keys_basic(NULL, skb, &keys, |
|
1715 |
|
NULL, 0, 0, 0, 0)) |
|
1716 |
|
return 0; |
|
1717 |
|
|
|
1718 |
|
return __skb_get_poff(skb, skb->data, &keys, skb_headlen(skb)); |
|
1719 |
|
} |
|
1720 |
|
|
|
1721 |
|
__u32 __get_hash_from_flowi6(const struct flowi6 *fl6, struct flow_keys *keys) |
|
1722 |
|
{ |
|
1723 |
|
memset(keys, 0, sizeof(*keys)); |
|
1724 |
|
|
|
1725 |
|
memcpy(&keys->addrs.v6addrs.src, &fl6->saddr, |
|
1726 |
|
sizeof(keys->addrs.v6addrs.src)); |
|
1727 |
|
memcpy(&keys->addrs.v6addrs.dst, &fl6->daddr, |
|
1728 |
|
sizeof(keys->addrs.v6addrs.dst)); |
|
1729 |
|
keys->control.addr_type = FLOW_DISSECTOR_KEY_IPV6_ADDRS; |
|
1730 |
|
keys->ports.src = fl6->fl6_sport; |
|
1731 |
|
keys->ports.dst = fl6->fl6_dport; |
|
1732 |
|
keys->keyid.keyid = fl6->fl6_gre_key; |
|
1733 |
|
keys->tags.flow_label = (__force u32)flowi6_get_flowlabel(fl6); |
|
1734 |
|
keys->basic.ip_proto = fl6->flowi6_proto; |
|
1735 |
|
|
|
1736 |
|
return flow_hash_from_keys(keys); |
|
1737 |
|
} |
|
1738 |
|
EXPORT_SYMBOL(__get_hash_from_flowi6); |
|
1739 |
|
|
|
1740 |
|
static const struct flow_dissector_key flow_keys_dissector_keys[] = { |
|
1741 |
|
{ |
|
1742 |
|
.key_id = FLOW_DISSECTOR_KEY_CONTROL, |
|
1743 |
|
.offset = offsetof(struct flow_keys, control), |
|
1744 |
|
}, |
|
1745 |
|
{ |
|
1746 |
|
.key_id = FLOW_DISSECTOR_KEY_BASIC, |
|
1747 |
|
.offset = offsetof(struct flow_keys, basic), |
|
1748 |
|
}, |
|
1749 |
|
{ |
|
1750 |
|
.key_id = FLOW_DISSECTOR_KEY_IPV4_ADDRS, |
|
1751 |
|
.offset = offsetof(struct flow_keys, addrs.v4addrs), |
|
1752 |
|
}, |
|
1753 |
|
{ |
|
1754 |
|
.key_id = FLOW_DISSECTOR_KEY_IPV6_ADDRS, |
|
1755 |
|
.offset = offsetof(struct flow_keys, addrs.v6addrs), |
|
1756 |
|
}, |
|
1757 |
|
{ |
|
1758 |
|
.key_id = FLOW_DISSECTOR_KEY_TIPC, |
|
1759 |
|
.offset = offsetof(struct flow_keys, addrs.tipckey), |
|
1760 |
|
}, |
|
1761 |
|
{ |
|
1762 |
|
.key_id = FLOW_DISSECTOR_KEY_PORTS, |
|
1763 |
|
.offset = offsetof(struct flow_keys, ports), |
|
1764 |
|
}, |
|
1765 |
|
{ |
|
1766 |
|
.key_id = FLOW_DISSECTOR_KEY_VLAN, |
|
1767 |
|
.offset = offsetof(struct flow_keys, vlan), |
|
1768 |
|
}, |
|
1769 |
|
{ |
|
1770 |
|
.key_id = FLOW_DISSECTOR_KEY_FLOW_LABEL, |
|
1771 |
|
.offset = offsetof(struct flow_keys, tags), |
|
1772 |
|
}, |
|
1773 |
|
{ |
|
1774 |
|
.key_id = FLOW_DISSECTOR_KEY_GRE_KEYID, |
|
1775 |
|
.offset = offsetof(struct flow_keys, keyid), |
|
1776 |
|
}, |
|
1777 |
|
}; |
|
1778 |
|
|
|
1779 |
|
static const struct flow_dissector_key flow_keys_dissector_symmetric_keys[] = { |
|
1780 |
|
{ |
|
1781 |
|
.key_id = FLOW_DISSECTOR_KEY_CONTROL, |
|
1782 |
|
.offset = offsetof(struct flow_keys, control), |
|
1783 |
|
}, |
|
1784 |
|
{ |
|
1785 |
|
.key_id = FLOW_DISSECTOR_KEY_BASIC, |
|
1786 |
|
.offset = offsetof(struct flow_keys, basic), |
|
1787 |
|
}, |
|
1788 |
|
{ |
|
1789 |
|
.key_id = FLOW_DISSECTOR_KEY_IPV4_ADDRS, |
|
1790 |
|
.offset = offsetof(struct flow_keys, addrs.v4addrs), |
|
1791 |
|
}, |
|
1792 |
|
{ |
|
1793 |
|
.key_id = FLOW_DISSECTOR_KEY_IPV6_ADDRS, |
|
1794 |
|
.offset = offsetof(struct flow_keys, addrs.v6addrs), |
|
1795 |
|
}, |
|
1796 |
|
{ |
|
1797 |
|
.key_id = FLOW_DISSECTOR_KEY_PORTS, |
|
1798 |
|
.offset = offsetof(struct flow_keys, ports), |
|
1799 |
|
}, |
|
1800 |
|
}; |
|
1801 |
|
|
|
1802 |
|
static const struct flow_dissector_key flow_keys_basic_dissector_keys[] = { |
|
1803 |
|
{ |
|
1804 |
|
.key_id = FLOW_DISSECTOR_KEY_CONTROL, |
|
1805 |
|
.offset = offsetof(struct flow_keys, control), |
|
1806 |
|
}, |
|
1807 |
|
{ |
|
1808 |
|
.key_id = FLOW_DISSECTOR_KEY_BASIC, |
|
1809 |
|
.offset = offsetof(struct flow_keys, basic), |
|
1810 |
|
}, |
|
1811 |
|
}; |
|
1812 |
|
|
|
1813 |
|
struct flow_dissector flow_keys_dissector __read_mostly; |
|
1814 |
|
EXPORT_SYMBOL(flow_keys_dissector); |
|
1815 |
|
|
|
1816 |
|
struct flow_dissector flow_keys_basic_dissector __read_mostly; |
|
1817 |
|
EXPORT_SYMBOL(flow_keys_basic_dissector); |
|
1818 |
|
|
|
1819 |
|
static int __init init_default_flow_dissectors(void) |
|
1820 |
|
{ |
|
1821 |
|
skb_flow_dissector_init(&flow_keys_dissector, |
|
1822 |
|
flow_keys_dissector_keys, |
|
1823 |
|
ARRAY_SIZE(flow_keys_dissector_keys)); |
|
1824 |
|
skb_flow_dissector_init(&flow_keys_dissector_symmetric, |
|
1825 |
|
flow_keys_dissector_symmetric_keys, |
|
1826 |
|
ARRAY_SIZE(flow_keys_dissector_symmetric_keys)); |
|
1827 |
|
skb_flow_dissector_init(&flow_keys_basic_dissector, |
|
1828 |
|
flow_keys_basic_dissector_keys, |
|
1829 |
|
ARRAY_SIZE(flow_keys_basic_dissector_keys)); |
|
1830 |
|
return 0; |
|
1831 |
|
} |
|
1832 |
|
core_initcall(init_default_flow_dissectors); |