diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/dt-bindings/clock/imx6ul-clock.h | 40 | ||||
| -rw-r--r-- | include/linux/bpf-cgroup.h | 26 | ||||
| -rw-r--r-- | include/linux/bpf.h | 8 | ||||
| -rw-r--r-- | include/linux/bpf_lirc.h | 5 | ||||
| -rw-r--r-- | include/linux/compiler-gcc.h | 29 | ||||
| -rw-r--r-- | include/linux/filter.h | 56 | ||||
| -rw-r--r-- | include/linux/ftrace.h | 2 | ||||
| -rw-r--r-- | include/linux/kthread.h | 1 | ||||
| -rw-r--r-- | include/linux/mlx5/eswitch.h | 2 | ||||
| -rw-r--r-- | include/linux/mlx5/mlx5_ifc.h | 2 | ||||
| -rw-r--r-- | include/linux/netdevice.h | 20 | ||||
| -rw-r--r-- | include/linux/sched.h | 2 | ||||
| -rw-r--r-- | include/net/net_namespace.h | 1 | ||||
| -rw-r--r-- | include/net/netns/ipv6.h | 1 | ||||
| -rw-r--r-- | include/net/pkt_cls.h | 5 | ||||
| -rw-r--r-- | include/uapi/linux/bpf.h | 28 |
16 files changed, 139 insertions, 89 deletions
diff --git a/include/dt-bindings/clock/imx6ul-clock.h b/include/dt-bindings/clock/imx6ul-clock.h index 9564597cbfac..0aa1d9c3e0b9 100644 --- a/include/dt-bindings/clock/imx6ul-clock.h +++ b/include/dt-bindings/clock/imx6ul-clock.h | |||
| @@ -235,27 +235,25 @@ | |||
| 235 | #define IMX6UL_CLK_CSI_PODF 222 | 235 | #define IMX6UL_CLK_CSI_PODF 222 |
| 236 | #define IMX6UL_CLK_PLL3_120M 223 | 236 | #define IMX6UL_CLK_PLL3_120M 223 |
| 237 | #define IMX6UL_CLK_KPP 224 | 237 | #define IMX6UL_CLK_KPP 224 |
| 238 | #define IMX6UL_CLK_CKO1_SEL 225 | 238 | #define IMX6ULL_CLK_ESAI_PRED 225 |
| 239 | #define IMX6UL_CLK_CKO1_PODF 226 | 239 | #define IMX6ULL_CLK_ESAI_PODF 226 |
| 240 | #define IMX6UL_CLK_CKO1 227 | 240 | #define IMX6ULL_CLK_ESAI_EXTAL 227 |
| 241 | #define IMX6UL_CLK_CKO2_SEL 228 | 241 | #define IMX6ULL_CLK_ESAI_MEM 228 |
| 242 | #define IMX6UL_CLK_CKO2_PODF 229 | 242 | #define IMX6ULL_CLK_ESAI_IPG 229 |
| 243 | #define IMX6UL_CLK_CKO2 230 | 243 | #define IMX6ULL_CLK_DCP_CLK 230 |
| 244 | #define IMX6UL_CLK_CKO 231 | 244 | #define IMX6ULL_CLK_EPDC_PRE_SEL 231 |
| 245 | 245 | #define IMX6ULL_CLK_EPDC_SEL 232 | |
| 246 | /* For i.MX6ULL */ | 246 | #define IMX6ULL_CLK_EPDC_PODF 233 |
| 247 | #define IMX6ULL_CLK_ESAI_PRED 232 | 247 | #define IMX6ULL_CLK_EPDC_ACLK 234 |
| 248 | #define IMX6ULL_CLK_ESAI_PODF 233 | 248 | #define IMX6ULL_CLK_EPDC_PIX 235 |
| 249 | #define IMX6ULL_CLK_ESAI_EXTAL 234 | 249 | #define IMX6ULL_CLK_ESAI_SEL 236 |
| 250 | #define IMX6ULL_CLK_ESAI_MEM 235 | 250 | #define IMX6UL_CLK_CKO1_SEL 237 |
| 251 | #define IMX6ULL_CLK_ESAI_IPG 236 | 251 | #define IMX6UL_CLK_CKO1_PODF 238 |
| 252 | #define IMX6ULL_CLK_DCP_CLK 237 | 252 | #define IMX6UL_CLK_CKO1 239 |
| 253 | #define IMX6ULL_CLK_EPDC_PRE_SEL 238 | 253 | #define IMX6UL_CLK_CKO2_SEL 240 |
| 254 | #define IMX6ULL_CLK_EPDC_SEL 239 | 254 | #define IMX6UL_CLK_CKO2_PODF 241 |
| 255 | #define IMX6ULL_CLK_EPDC_PODF 240 | 255 | #define IMX6UL_CLK_CKO2 242 |
| 256 | #define IMX6ULL_CLK_EPDC_ACLK 241 | 256 | #define IMX6UL_CLK_CKO 243 |
| 257 | #define IMX6ULL_CLK_EPDC_PIX 242 | ||
| 258 | #define IMX6ULL_CLK_ESAI_SEL 243 | ||
| 259 | #define IMX6UL_CLK_END 244 | 257 | #define IMX6UL_CLK_END 244 |
| 260 | 258 | ||
| 261 | #endif /* __DT_BINDINGS_CLOCK_IMX6UL_H */ | 259 | #endif /* __DT_BINDINGS_CLOCK_IMX6UL_H */ |
diff --git a/include/linux/bpf-cgroup.h b/include/linux/bpf-cgroup.h index 975fb4cf1bb7..79795c5fa7c3 100644 --- a/include/linux/bpf-cgroup.h +++ b/include/linux/bpf-cgroup.h | |||
| @@ -188,12 +188,38 @@ int __cgroup_bpf_check_dev_permission(short dev_type, u32 major, u32 minor, | |||
| 188 | \ | 188 | \ |
| 189 | __ret; \ | 189 | __ret; \ |
| 190 | }) | 190 | }) |
| 191 | int cgroup_bpf_prog_attach(const union bpf_attr *attr, | ||
| 192 | enum bpf_prog_type ptype, struct bpf_prog *prog); | ||
| 193 | int cgroup_bpf_prog_detach(const union bpf_attr *attr, | ||
| 194 | enum bpf_prog_type ptype); | ||
| 195 | int cgroup_bpf_prog_query(const union bpf_attr *attr, | ||
| 196 | union bpf_attr __user *uattr); | ||
| 191 | #else | 197 | #else |
| 192 | 198 | ||
| 199 | struct bpf_prog; | ||
| 193 | struct cgroup_bpf {}; | 200 | struct cgroup_bpf {}; |
| 194 | static inline void cgroup_bpf_put(struct cgroup *cgrp) {} | 201 | static inline void cgroup_bpf_put(struct cgroup *cgrp) {} |
| 195 | static inline int cgroup_bpf_inherit(struct cgroup *cgrp) { return 0; } | 202 | static inline int cgroup_bpf_inherit(struct cgroup *cgrp) { return 0; } |
| 196 | 203 | ||
| 204 | static inline int cgroup_bpf_prog_attach(const union bpf_attr *attr, | ||
| 205 | enum bpf_prog_type ptype, | ||
| 206 | struct bpf_prog *prog) | ||
| 207 | { | ||
| 208 | return -EINVAL; | ||
| 209 | } | ||
| 210 | |||
| 211 | static inline int cgroup_bpf_prog_detach(const union bpf_attr *attr, | ||
| 212 | enum bpf_prog_type ptype) | ||
| 213 | { | ||
| 214 | return -EINVAL; | ||
| 215 | } | ||
| 216 | |||
| 217 | static inline int cgroup_bpf_prog_query(const union bpf_attr *attr, | ||
| 218 | union bpf_attr __user *uattr) | ||
| 219 | { | ||
| 220 | return -EINVAL; | ||
| 221 | } | ||
| 222 | |||
| 197 | #define cgroup_bpf_enabled (0) | 223 | #define cgroup_bpf_enabled (0) |
| 198 | #define BPF_CGROUP_PRE_CONNECT_ENABLED(sk) (0) | 224 | #define BPF_CGROUP_PRE_CONNECT_ENABLED(sk) (0) |
| 199 | #define BPF_CGROUP_RUN_PROG_INET_INGRESS(sk,skb) ({ 0; }) | 225 | #define BPF_CGROUP_RUN_PROG_INET_INGRESS(sk,skb) ({ 0; }) |
diff --git a/include/linux/bpf.h b/include/linux/bpf.h index 7df32a3200f7..8827e797ff97 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h | |||
| @@ -696,6 +696,8 @@ static inline void bpf_map_offload_map_free(struct bpf_map *map) | |||
| 696 | struct sock *__sock_map_lookup_elem(struct bpf_map *map, u32 key); | 696 | struct sock *__sock_map_lookup_elem(struct bpf_map *map, u32 key); |
| 697 | struct sock *__sock_hash_lookup_elem(struct bpf_map *map, void *key); | 697 | struct sock *__sock_hash_lookup_elem(struct bpf_map *map, void *key); |
| 698 | int sock_map_prog(struct bpf_map *map, struct bpf_prog *prog, u32 type); | 698 | int sock_map_prog(struct bpf_map *map, struct bpf_prog *prog, u32 type); |
| 699 | int sockmap_get_from_fd(const union bpf_attr *attr, int type, | ||
| 700 | struct bpf_prog *prog); | ||
| 699 | #else | 701 | #else |
| 700 | static inline struct sock *__sock_map_lookup_elem(struct bpf_map *map, u32 key) | 702 | static inline struct sock *__sock_map_lookup_elem(struct bpf_map *map, u32 key) |
| 701 | { | 703 | { |
| @@ -714,6 +716,12 @@ static inline int sock_map_prog(struct bpf_map *map, | |||
| 714 | { | 716 | { |
| 715 | return -EOPNOTSUPP; | 717 | return -EOPNOTSUPP; |
| 716 | } | 718 | } |
| 719 | |||
| 720 | static inline int sockmap_get_from_fd(const union bpf_attr *attr, int type, | ||
| 721 | struct bpf_prog *prog) | ||
| 722 | { | ||
| 723 | return -EINVAL; | ||
| 724 | } | ||
| 717 | #endif | 725 | #endif |
| 718 | 726 | ||
| 719 | #if defined(CONFIG_XDP_SOCKETS) | 727 | #if defined(CONFIG_XDP_SOCKETS) |
diff --git a/include/linux/bpf_lirc.h b/include/linux/bpf_lirc.h index 5f8a4283092d..9d9ff755ec29 100644 --- a/include/linux/bpf_lirc.h +++ b/include/linux/bpf_lirc.h | |||
| @@ -5,11 +5,12 @@ | |||
| 5 | #include <uapi/linux/bpf.h> | 5 | #include <uapi/linux/bpf.h> |
| 6 | 6 | ||
| 7 | #ifdef CONFIG_BPF_LIRC_MODE2 | 7 | #ifdef CONFIG_BPF_LIRC_MODE2 |
| 8 | int lirc_prog_attach(const union bpf_attr *attr); | 8 | int lirc_prog_attach(const union bpf_attr *attr, struct bpf_prog *prog); |
| 9 | int lirc_prog_detach(const union bpf_attr *attr); | 9 | int lirc_prog_detach(const union bpf_attr *attr); |
| 10 | int lirc_prog_query(const union bpf_attr *attr, union bpf_attr __user *uattr); | 10 | int lirc_prog_query(const union bpf_attr *attr, union bpf_attr __user *uattr); |
| 11 | #else | 11 | #else |
| 12 | static inline int lirc_prog_attach(const union bpf_attr *attr) | 12 | static inline int lirc_prog_attach(const union bpf_attr *attr, |
| 13 | struct bpf_prog *prog) | ||
| 13 | { | 14 | { |
| 14 | return -EINVAL; | 15 | return -EINVAL; |
| 15 | } | 16 | } |
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index fd282c7d3e5e..573f5a7d42d4 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h | |||
| @@ -66,25 +66,40 @@ | |||
| 66 | #endif | 66 | #endif |
| 67 | 67 | ||
| 68 | /* | 68 | /* |
| 69 | * Feature detection for gnu_inline (gnu89 extern inline semantics). Either | ||
| 70 | * __GNUC_STDC_INLINE__ is defined (not using gnu89 extern inline semantics, | ||
| 71 | * and we opt in to the gnu89 semantics), or __GNUC_STDC_INLINE__ is not | ||
| 72 | * defined so the gnu89 semantics are the default. | ||
| 73 | */ | ||
| 74 | #ifdef __GNUC_STDC_INLINE__ | ||
| 75 | # define __gnu_inline __attribute__((gnu_inline)) | ||
| 76 | #else | ||
| 77 | # define __gnu_inline | ||
| 78 | #endif | ||
| 79 | |||
| 80 | /* | ||
| 69 | * Force always-inline if the user requests it so via the .config, | 81 | * Force always-inline if the user requests it so via the .config, |
| 70 | * or if gcc is too old. | 82 | * or if gcc is too old. |
| 71 | * GCC does not warn about unused static inline functions for | 83 | * GCC does not warn about unused static inline functions for |
| 72 | * -Wunused-function. This turns out to avoid the need for complex #ifdef | 84 | * -Wunused-function. This turns out to avoid the need for complex #ifdef |
| 73 | * directives. Suppress the warning in clang as well by using "unused" | 85 | * directives. Suppress the warning in clang as well by using "unused" |
| 74 | * function attribute, which is redundant but not harmful for gcc. | 86 | * function attribute, which is redundant but not harmful for gcc. |
| 87 | * Prefer gnu_inline, so that extern inline functions do not emit an | ||
| 88 | * externally visible function. This makes extern inline behave as per gnu89 | ||
| 89 | * semantics rather than c99. This prevents multiple symbol definition errors | ||
| 90 | * of extern inline functions at link time. | ||
| 91 | * A lot of inline functions can cause havoc with function tracing. | ||
| 75 | */ | 92 | */ |
| 76 | #if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \ | 93 | #if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \ |
| 77 | !defined(CONFIG_OPTIMIZE_INLINING) || (__GNUC__ < 4) | 94 | !defined(CONFIG_OPTIMIZE_INLINING) || (__GNUC__ < 4) |
| 78 | #define inline inline __attribute__((always_inline,unused)) notrace | 95 | #define inline \ |
| 79 | #define __inline__ __inline__ __attribute__((always_inline,unused)) notrace | 96 | inline __attribute__((always_inline, unused)) notrace __gnu_inline |
| 80 | #define __inline __inline __attribute__((always_inline,unused)) notrace | ||
| 81 | #else | 97 | #else |
| 82 | /* A lot of inline functions can cause havoc with function tracing */ | 98 | #define inline inline __attribute__((unused)) notrace __gnu_inline |
| 83 | #define inline inline __attribute__((unused)) notrace | ||
| 84 | #define __inline__ __inline__ __attribute__((unused)) notrace | ||
| 85 | #define __inline __inline __attribute__((unused)) notrace | ||
| 86 | #endif | 99 | #endif |
| 87 | 100 | ||
| 101 | #define __inline__ inline | ||
| 102 | #define __inline inline | ||
| 88 | #define __always_inline inline __attribute__((always_inline)) | 103 | #define __always_inline inline __attribute__((always_inline)) |
| 89 | #define noinline __attribute__((noinline)) | 104 | #define noinline __attribute__((noinline)) |
| 90 | 105 | ||
diff --git a/include/linux/filter.h b/include/linux/filter.h index 20f2659dd829..300baad62c88 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h | |||
| @@ -470,9 +470,7 @@ struct sock_fprog_kern { | |||
| 470 | }; | 470 | }; |
| 471 | 471 | ||
| 472 | struct bpf_binary_header { | 472 | struct bpf_binary_header { |
| 473 | u16 pages; | 473 | u32 pages; |
| 474 | u16 locked:1; | ||
| 475 | |||
| 476 | /* Some arches need word alignment for their instructions */ | 474 | /* Some arches need word alignment for their instructions */ |
| 477 | u8 image[] __aligned(4); | 475 | u8 image[] __aligned(4); |
| 478 | }; | 476 | }; |
| @@ -481,7 +479,7 @@ struct bpf_prog { | |||
| 481 | u16 pages; /* Number of allocated pages */ | 479 | u16 pages; /* Number of allocated pages */ |
| 482 | u16 jited:1, /* Is our filter JIT'ed? */ | 480 | u16 jited:1, /* Is our filter JIT'ed? */ |
| 483 | jit_requested:1,/* archs need to JIT the prog */ | 481 | jit_requested:1,/* archs need to JIT the prog */ |
| 484 | locked:1, /* Program image locked? */ | 482 | undo_set_mem:1, /* Passed set_memory_ro() checkpoint */ |
| 485 | gpl_compatible:1, /* Is filter GPL compatible? */ | 483 | gpl_compatible:1, /* Is filter GPL compatible? */ |
| 486 | cb_access:1, /* Is control block accessed? */ | 484 | cb_access:1, /* Is control block accessed? */ |
| 487 | dst_needed:1, /* Do we need dst entry? */ | 485 | dst_needed:1, /* Do we need dst entry? */ |
| @@ -677,46 +675,24 @@ bpf_ctx_narrow_access_ok(u32 off, u32 size, u32 size_default) | |||
| 677 | 675 | ||
| 678 | static inline void bpf_prog_lock_ro(struct bpf_prog *fp) | 676 | static inline void bpf_prog_lock_ro(struct bpf_prog *fp) |
| 679 | { | 677 | { |
| 680 | #ifdef CONFIG_ARCH_HAS_SET_MEMORY | 678 | fp->undo_set_mem = 1; |
| 681 | fp->locked = 1; | 679 | set_memory_ro((unsigned long)fp, fp->pages); |
| 682 | if (set_memory_ro((unsigned long)fp, fp->pages)) | ||
| 683 | fp->locked = 0; | ||
| 684 | #endif | ||
| 685 | } | 680 | } |
| 686 | 681 | ||
| 687 | static inline void bpf_prog_unlock_ro(struct bpf_prog *fp) | 682 | static inline void bpf_prog_unlock_ro(struct bpf_prog *fp) |
| 688 | { | 683 | { |
| 689 | #ifdef CONFIG_ARCH_HAS_SET_MEMORY | 684 | if (fp->undo_set_mem) |
| 690 | if (fp->locked) { | 685 | set_memory_rw((unsigned long)fp, fp->pages); |
| 691 | WARN_ON_ONCE(set_memory_rw((unsigned long)fp, fp->pages)); | ||
| 692 | /* In case set_memory_rw() fails, we want to be the first | ||
| 693 | * to crash here instead of some random place later on. | ||
| 694 | */ | ||
| 695 | fp->locked = 0; | ||
| 696 | } | ||
| 697 | #endif | ||
| 698 | } | 686 | } |
| 699 | 687 | ||
| 700 | static inline void bpf_jit_binary_lock_ro(struct bpf_binary_header *hdr) | 688 | static inline void bpf_jit_binary_lock_ro(struct bpf_binary_header *hdr) |
| 701 | { | 689 | { |
| 702 | #ifdef CONFIG_ARCH_HAS_SET_MEMORY | 690 | set_memory_ro((unsigned long)hdr, hdr->pages); |
| 703 | hdr->locked = 1; | ||
| 704 | if (set_memory_ro((unsigned long)hdr, hdr->pages)) | ||
| 705 | hdr->locked = 0; | ||
| 706 | #endif | ||
| 707 | } | 691 | } |
| 708 | 692 | ||
| 709 | static inline void bpf_jit_binary_unlock_ro(struct bpf_binary_header *hdr) | 693 | static inline void bpf_jit_binary_unlock_ro(struct bpf_binary_header *hdr) |
| 710 | { | 694 | { |
| 711 | #ifdef CONFIG_ARCH_HAS_SET_MEMORY | 695 | set_memory_rw((unsigned long)hdr, hdr->pages); |
| 712 | if (hdr->locked) { | ||
| 713 | WARN_ON_ONCE(set_memory_rw((unsigned long)hdr, hdr->pages)); | ||
| 714 | /* In case set_memory_rw() fails, we want to be the first | ||
| 715 | * to crash here instead of some random place later on. | ||
| 716 | */ | ||
| 717 | hdr->locked = 0; | ||
| 718 | } | ||
| 719 | #endif | ||
| 720 | } | 696 | } |
| 721 | 697 | ||
| 722 | static inline struct bpf_binary_header * | 698 | static inline struct bpf_binary_header * |
| @@ -728,22 +704,6 @@ bpf_jit_binary_hdr(const struct bpf_prog *fp) | |||
| 728 | return (void *)addr; | 704 | return (void *)addr; |
| 729 | } | 705 | } |
| 730 | 706 | ||
| 731 | #ifdef CONFIG_ARCH_HAS_SET_MEMORY | ||
| 732 | static inline int bpf_prog_check_pages_ro_single(const struct bpf_prog *fp) | ||
| 733 | { | ||
| 734 | if (!fp->locked) | ||
| 735 | return -ENOLCK; | ||
| 736 | if (fp->jited) { | ||
| 737 | const struct bpf_binary_header *hdr = bpf_jit_binary_hdr(fp); | ||
| 738 | |||
| 739 | if (!hdr->locked) | ||
| 740 | return -ENOLCK; | ||
| 741 | } | ||
| 742 | |||
| 743 | return 0; | ||
| 744 | } | ||
| 745 | #endif | ||
| 746 | |||
| 747 | int sk_filter_trim_cap(struct sock *sk, struct sk_buff *skb, unsigned int cap); | 707 | int sk_filter_trim_cap(struct sock *sk, struct sk_buff *skb, unsigned int cap); |
| 748 | static inline int sk_filter(struct sock *sk, struct sk_buff *skb) | 708 | static inline int sk_filter(struct sock *sk, struct sk_buff *skb) |
| 749 | { | 709 | { |
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index 8154f4920fcb..ebb77674be90 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
| @@ -223,7 +223,6 @@ extern enum ftrace_tracing_type_t ftrace_tracing_type; | |||
| 223 | */ | 223 | */ |
| 224 | int register_ftrace_function(struct ftrace_ops *ops); | 224 | int register_ftrace_function(struct ftrace_ops *ops); |
| 225 | int unregister_ftrace_function(struct ftrace_ops *ops); | 225 | int unregister_ftrace_function(struct ftrace_ops *ops); |
| 226 | void clear_ftrace_function(void); | ||
| 227 | 226 | ||
| 228 | extern void ftrace_stub(unsigned long a0, unsigned long a1, | 227 | extern void ftrace_stub(unsigned long a0, unsigned long a1, |
| 229 | struct ftrace_ops *op, struct pt_regs *regs); | 228 | struct ftrace_ops *op, struct pt_regs *regs); |
| @@ -239,7 +238,6 @@ static inline int ftrace_nr_registered_ops(void) | |||
| 239 | { | 238 | { |
| 240 | return 0; | 239 | return 0; |
| 241 | } | 240 | } |
| 242 | static inline void clear_ftrace_function(void) { } | ||
| 243 | static inline void ftrace_kill(void) { } | 241 | static inline void ftrace_kill(void) { } |
| 244 | static inline void ftrace_free_init_mem(void) { } | 242 | static inline void ftrace_free_init_mem(void) { } |
| 245 | static inline void ftrace_free_mem(struct module *mod, void *start, void *end) { } | 243 | static inline void ftrace_free_mem(struct module *mod, void *start, void *end) { } |
diff --git a/include/linux/kthread.h b/include/linux/kthread.h index 2803264c512f..c1961761311d 100644 --- a/include/linux/kthread.h +++ b/include/linux/kthread.h | |||
| @@ -62,7 +62,6 @@ void *kthread_probe_data(struct task_struct *k); | |||
| 62 | int kthread_park(struct task_struct *k); | 62 | int kthread_park(struct task_struct *k); |
| 63 | void kthread_unpark(struct task_struct *k); | 63 | void kthread_unpark(struct task_struct *k); |
| 64 | void kthread_parkme(void); | 64 | void kthread_parkme(void); |
| 65 | void kthread_park_complete(struct task_struct *k); | ||
| 66 | 65 | ||
| 67 | int kthreadd(void *unused); | 66 | int kthreadd(void *unused); |
| 68 | extern struct task_struct *kthreadd_task; | 67 | extern struct task_struct *kthreadd_task; |
diff --git a/include/linux/mlx5/eswitch.h b/include/linux/mlx5/eswitch.h index d3c9db492b30..fab5121ffb8f 100644 --- a/include/linux/mlx5/eswitch.h +++ b/include/linux/mlx5/eswitch.h | |||
| @@ -8,6 +8,8 @@ | |||
| 8 | 8 | ||
| 9 | #include <linux/mlx5/driver.h> | 9 | #include <linux/mlx5/driver.h> |
| 10 | 10 | ||
| 11 | #define MLX5_ESWITCH_MANAGER(mdev) MLX5_CAP_GEN(mdev, eswitch_manager) | ||
| 12 | |||
| 11 | enum { | 13 | enum { |
| 12 | SRIOV_NONE, | 14 | SRIOV_NONE, |
| 13 | SRIOV_LEGACY, | 15 | SRIOV_LEGACY, |
diff --git a/include/linux/mlx5/mlx5_ifc.h b/include/linux/mlx5/mlx5_ifc.h index 27134c4fcb76..ac281f5ec9b8 100644 --- a/include/linux/mlx5/mlx5_ifc.h +++ b/include/linux/mlx5/mlx5_ifc.h | |||
| @@ -922,7 +922,7 @@ struct mlx5_ifc_cmd_hca_cap_bits { | |||
| 922 | u8 vnic_env_queue_counters[0x1]; | 922 | u8 vnic_env_queue_counters[0x1]; |
| 923 | u8 ets[0x1]; | 923 | u8 ets[0x1]; |
| 924 | u8 nic_flow_table[0x1]; | 924 | u8 nic_flow_table[0x1]; |
| 925 | u8 eswitch_flow_table[0x1]; | 925 | u8 eswitch_manager[0x1]; |
| 926 | u8 device_memory[0x1]; | 926 | u8 device_memory[0x1]; |
| 927 | u8 mcam_reg[0x1]; | 927 | u8 mcam_reg[0x1]; |
| 928 | u8 pcam_reg[0x1]; | 928 | u8 pcam_reg[0x1]; |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 3ec9850c7936..3d0cc0b5cec2 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -2789,11 +2789,31 @@ static inline void skb_gro_flush_final(struct sk_buff *skb, struct sk_buff **pp, | |||
| 2789 | if (PTR_ERR(pp) != -EINPROGRESS) | 2789 | if (PTR_ERR(pp) != -EINPROGRESS) |
| 2790 | NAPI_GRO_CB(skb)->flush |= flush; | 2790 | NAPI_GRO_CB(skb)->flush |= flush; |
| 2791 | } | 2791 | } |
| 2792 | static inline void skb_gro_flush_final_remcsum(struct sk_buff *skb, | ||
| 2793 | struct sk_buff **pp, | ||
| 2794 | int flush, | ||
| 2795 | struct gro_remcsum *grc) | ||
| 2796 | { | ||
| 2797 | if (PTR_ERR(pp) != -EINPROGRESS) { | ||
| 2798 | NAPI_GRO_CB(skb)->flush |= flush; | ||
| 2799 | skb_gro_remcsum_cleanup(skb, grc); | ||
| 2800 | skb->remcsum_offload = 0; | ||
| 2801 | } | ||
| 2802 | } | ||
| 2792 | #else | 2803 | #else |
| 2793 | static inline void skb_gro_flush_final(struct sk_buff *skb, struct sk_buff **pp, int flush) | 2804 | static inline void skb_gro_flush_final(struct sk_buff *skb, struct sk_buff **pp, int flush) |
| 2794 | { | 2805 | { |
| 2795 | NAPI_GRO_CB(skb)->flush |= flush; | 2806 | NAPI_GRO_CB(skb)->flush |= flush; |
| 2796 | } | 2807 | } |
| 2808 | static inline void skb_gro_flush_final_remcsum(struct sk_buff *skb, | ||
| 2809 | struct sk_buff **pp, | ||
| 2810 | int flush, | ||
| 2811 | struct gro_remcsum *grc) | ||
| 2812 | { | ||
| 2813 | NAPI_GRO_CB(skb)->flush |= flush; | ||
| 2814 | skb_gro_remcsum_cleanup(skb, grc); | ||
| 2815 | skb->remcsum_offload = 0; | ||
| 2816 | } | ||
| 2797 | #endif | 2817 | #endif |
| 2798 | 2818 | ||
| 2799 | static inline int dev_hard_header(struct sk_buff *skb, struct net_device *dev, | 2819 | static inline int dev_hard_header(struct sk_buff *skb, struct net_device *dev, |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 9256118bd40c..43731fe51c97 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -118,7 +118,7 @@ struct task_group; | |||
| 118 | * the comment with set_special_state(). | 118 | * the comment with set_special_state(). |
| 119 | */ | 119 | */ |
| 120 | #define is_special_task_state(state) \ | 120 | #define is_special_task_state(state) \ |
| 121 | ((state) & (__TASK_STOPPED | __TASK_TRACED | TASK_DEAD)) | 121 | ((state) & (__TASK_STOPPED | __TASK_TRACED | TASK_PARKED | TASK_DEAD)) |
| 122 | 122 | ||
| 123 | #define __set_current_state(state_value) \ | 123 | #define __set_current_state(state_value) \ |
| 124 | do { \ | 124 | do { \ |
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index 47e35cce3b64..a71264d75d7f 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h | |||
| @@ -128,6 +128,7 @@ struct net { | |||
| 128 | #endif | 128 | #endif |
| 129 | #if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6) | 129 | #if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6) |
| 130 | struct netns_nf_frag nf_frag; | 130 | struct netns_nf_frag nf_frag; |
| 131 | struct ctl_table_header *nf_frag_frags_hdr; | ||
| 131 | #endif | 132 | #endif |
| 132 | struct sock *nfnl; | 133 | struct sock *nfnl; |
| 133 | struct sock *nfnl_stash; | 134 | struct sock *nfnl_stash; |
diff --git a/include/net/netns/ipv6.h b/include/net/netns/ipv6.h index c978a31b0f84..762ac9931b62 100644 --- a/include/net/netns/ipv6.h +++ b/include/net/netns/ipv6.h | |||
| @@ -109,7 +109,6 @@ struct netns_ipv6 { | |||
| 109 | 109 | ||
| 110 | #if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6) | 110 | #if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6) |
| 111 | struct netns_nf_frag { | 111 | struct netns_nf_frag { |
| 112 | struct netns_sysctl_ipv6 sysctl; | ||
| 113 | struct netns_frags frags; | 112 | struct netns_frags frags; |
| 114 | }; | 113 | }; |
| 115 | #endif | 114 | #endif |
diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h index a3c1a2c47cd4..20b059574e60 100644 --- a/include/net/pkt_cls.h +++ b/include/net/pkt_cls.h | |||
| @@ -111,6 +111,11 @@ void tcf_block_put_ext(struct tcf_block *block, struct Qdisc *q, | |||
| 111 | { | 111 | { |
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | static inline bool tcf_block_shared(struct tcf_block *block) | ||
| 115 | { | ||
| 116 | return false; | ||
| 117 | } | ||
| 118 | |||
| 114 | static inline struct Qdisc *tcf_block_q(struct tcf_block *block) | 119 | static inline struct Qdisc *tcf_block_q(struct tcf_block *block) |
| 115 | { | 120 | { |
| 116 | return NULL; | 121 | return NULL; |
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index 59b19b6a40d7..b7db3261c62d 100644 --- a/include/uapi/linux/bpf.h +++ b/include/uapi/linux/bpf.h | |||
| @@ -1857,7 +1857,8 @@ union bpf_attr { | |||
| 1857 | * is resolved), the nexthop address is returned in ipv4_dst | 1857 | * is resolved), the nexthop address is returned in ipv4_dst |
| 1858 | * or ipv6_dst based on family, smac is set to mac address of | 1858 | * or ipv6_dst based on family, smac is set to mac address of |
| 1859 | * egress device, dmac is set to nexthop mac address, rt_metric | 1859 | * egress device, dmac is set to nexthop mac address, rt_metric |
| 1860 | * is set to metric from route (IPv4/IPv6 only). | 1860 | * is set to metric from route (IPv4/IPv6 only), and ifindex |
| 1861 | * is set to the device index of the nexthop from the FIB lookup. | ||
| 1861 | * | 1862 | * |
| 1862 | * *plen* argument is the size of the passed in struct. | 1863 | * *plen* argument is the size of the passed in struct. |
| 1863 | * *flags* argument can be a combination of one or more of the | 1864 | * *flags* argument can be a combination of one or more of the |
| @@ -1873,9 +1874,10 @@ union bpf_attr { | |||
| 1873 | * *ctx* is either **struct xdp_md** for XDP programs or | 1874 | * *ctx* is either **struct xdp_md** for XDP programs or |
| 1874 | * **struct sk_buff** tc cls_act programs. | 1875 | * **struct sk_buff** tc cls_act programs. |
| 1875 | * Return | 1876 | * Return |
| 1876 | * Egress device index on success, 0 if packet needs to continue | 1877 | * * < 0 if any input argument is invalid |
| 1877 | * up the stack for further processing or a negative error in case | 1878 | * * 0 on success (packet is forwarded, nexthop neighbor exists) |
| 1878 | * of failure. | 1879 | * * > 0 one of **BPF_FIB_LKUP_RET_** codes explaining why the |
| 1880 | * * packet is not forwarded or needs assist from full stack | ||
| 1879 | * | 1881 | * |
| 1880 | * int bpf_sock_hash_update(struct bpf_sock_ops_kern *skops, struct bpf_map *map, void *key, u64 flags) | 1882 | * int bpf_sock_hash_update(struct bpf_sock_ops_kern *skops, struct bpf_map *map, void *key, u64 flags) |
| 1881 | * Description | 1883 | * Description |
| @@ -2612,6 +2614,18 @@ struct bpf_raw_tracepoint_args { | |||
| 2612 | #define BPF_FIB_LOOKUP_DIRECT BIT(0) | 2614 | #define BPF_FIB_LOOKUP_DIRECT BIT(0) |
| 2613 | #define BPF_FIB_LOOKUP_OUTPUT BIT(1) | 2615 | #define BPF_FIB_LOOKUP_OUTPUT BIT(1) |
| 2614 | 2616 | ||
| 2617 | enum { | ||
| 2618 | BPF_FIB_LKUP_RET_SUCCESS, /* lookup successful */ | ||
| 2619 | BPF_FIB_LKUP_RET_BLACKHOLE, /* dest is blackholed; can be dropped */ | ||
| 2620 | BPF_FIB_LKUP_RET_UNREACHABLE, /* dest is unreachable; can be dropped */ | ||
| 2621 | BPF_FIB_LKUP_RET_PROHIBIT, /* dest not allowed; can be dropped */ | ||
| 2622 | BPF_FIB_LKUP_RET_NOT_FWDED, /* packet is not forwarded */ | ||
| 2623 | BPF_FIB_LKUP_RET_FWD_DISABLED, /* fwding is not enabled on ingress */ | ||
| 2624 | BPF_FIB_LKUP_RET_UNSUPP_LWT, /* fwd requires encapsulation */ | ||
| 2625 | BPF_FIB_LKUP_RET_NO_NEIGH, /* no neighbor entry for nh */ | ||
| 2626 | BPF_FIB_LKUP_RET_FRAG_NEEDED, /* fragmentation required to fwd */ | ||
| 2627 | }; | ||
| 2628 | |||
| 2615 | struct bpf_fib_lookup { | 2629 | struct bpf_fib_lookup { |
| 2616 | /* input: network family for lookup (AF_INET, AF_INET6) | 2630 | /* input: network family for lookup (AF_INET, AF_INET6) |
| 2617 | * output: network family of egress nexthop | 2631 | * output: network family of egress nexthop |
| @@ -2625,7 +2639,11 @@ struct bpf_fib_lookup { | |||
| 2625 | 2639 | ||
| 2626 | /* total length of packet from network header - used for MTU check */ | 2640 | /* total length of packet from network header - used for MTU check */ |
| 2627 | __u16 tot_len; | 2641 | __u16 tot_len; |
| 2628 | __u32 ifindex; /* L3 device index for lookup */ | 2642 | |
| 2643 | /* input: L3 device index for lookup | ||
| 2644 | * output: device index from FIB lookup | ||
| 2645 | */ | ||
| 2646 | __u32 ifindex; | ||
| 2629 | 2647 | ||
| 2630 | union { | 2648 | union { |
| 2631 | /* inputs to lookup */ | 2649 | /* inputs to lookup */ |
