tree: https://git.kernel.org/pub/scm/linux/kernel/git/ast/bpf.git bpf_tramp head: eb9b9dcbc8ed96e479f5d62aa97c0c2c4b23beeb commit: eb9b9dcbc8ed96e479f5d62aa97c0c2c4b23beeb [20/20] bpf: annotate context types config: x86_64-randconfig-s0-201945 (attached as .config) compiler: gcc-4.9 (Debian 4.9.2-10+deb8u1) 4.9.2 reproduce: git checkout eb9b9dcbc8ed96e479f5d62aa97c0c2c4b23beeb # save the attached .config to linux build tree make ARCH=x86_64 If you fix the issue, kindly add following tag Reported-by: kbuild test robot All error/warnings (new ones prefixed by >>): >> net/core/filter.c:8691:9: warning: 'struct sk_reuseport_kern' declared inside parameter list u32 hash) ^ >> net/core/filter.c:8691:9: warning: its scope is only this definition or declaration, which is probably not what you want net/core/filter.c: In function 'bpf_init_reuseport_kern': >> net/core/filter.c:8693:12: error: dereferencing pointer to incomplete type reuse_kern->skb = skb; ^ net/core/filter.c:8694:12: error: dereferencing pointer to incomplete type reuse_kern->sk = sk; ^ net/core/filter.c:8695:12: error: dereferencing pointer to incomplete type reuse_kern->selected_sk = NULL; ^ net/core/filter.c:8696:12: error: dereferencing pointer to incomplete type reuse_kern->data_end = skb->data + skb_headlen(skb); ^ net/core/filter.c:8697:12: error: dereferencing pointer to incomplete type reuse_kern->hash = hash; ^ net/core/filter.c:8698:12: error: dereferencing pointer to incomplete type reuse_kern->reuseport_id = reuse->reuseport_id; ^ net/core/filter.c:8699:12: error: dereferencing pointer to incomplete type reuse_kern->bind_inany = reuse->bind_inany; ^ net/core/filter.c: In function 'bpf_run_sk_reuseport': net/core/filter.c:8706:27: error: storage size of 'reuse_kern' isn't known struct sk_reuseport_kern reuse_kern; ^ net/core/filter.c:8706:27: warning: unused variable 'reuse_kern' [-Wunused-variable] In file included from include/net/sock.h:59:0, from include/linux/sock_diag.h:8, from net/core/filter.c:25: net/core/filter.c: At top level: net/core/filter.c:8719:12: warning: 'struct sk_reuseport_kern' declared inside parameter list struct bpf_map *, map, void *, key, u32, flags) ^ include/linux/filter.h:460:31: note: in definition of macro '__BPF_DECL_ARGS' #define __BPF_DECL_ARGS(t, a) t a ^ >> include/linux/filter.h:439:47: note: in expansion of macro '__BPF_MAP_3' #define __BPF_MAP_4(m, v, t, a, ...) m(t, a), __BPF_MAP_3(m, v, __VA_ARGS__) ^ include/linux/filter.h:449:27: note: in expansion of macro '__BPF_MAP_4' #define __BPF_MAP(n, ...) __BPF_MAP_##n(__VA_ARGS__) ^ include/linux/filter.h:469:17: note: in expansion of macro '__BPF_MAP' u64 ____##name(__BPF_MAP(x, __BPF_DECL_ARGS, __BPF_V, __VA_ARGS__)); \ ^ include/linux/filter.h:483:31: note: in expansion of macro 'BPF_CALL_x' #define BPF_CALL_4(name, ...) BPF_CALL_x(4, name, __VA_ARGS__) ^ net/core/filter.c:8718:1: note: in expansion of macro 'BPF_CALL_4' BPF_CALL_4(sk_select_reuseport, struct sk_reuseport_kern *, reuse_kern, ^ net/core/filter.c:8719:12: warning: 'struct sk_reuseport_kern' declared inside parameter list struct bpf_map *, map, void *, key, u32, flags) ^ include/linux/filter.h:460:31: note: in definition of macro '__BPF_DECL_ARGS' #define __BPF_DECL_ARGS(t, a) t a ^ >> include/linux/filter.h:439:47: note: in expansion of macro '__BPF_MAP_3' #define __BPF_MAP_4(m, v, t, a, ...) m(t, a), __BPF_MAP_3(m, v, __VA_ARGS__) ^ include/linux/filter.h:449:27: note: in expansion of macro '__BPF_MAP_4' #define __BPF_MAP(n, ...) __BPF_MAP_##n(__VA_ARGS__) ^ include/linux/filter.h:470:28: note: in expansion of macro '__BPF_MAP' typedef u64 (*btf_##name)(__BPF_MAP(x, __BPF_DECL_ARGS, __BPF_V, __VA_ARGS__)); \ ^ include/linux/filter.h:483:31: note: in expansion of macro 'BPF_CALL_x' #define BPF_CALL_4(name, ...) BPF_CALL_x(4, name, __VA_ARGS__) ^ net/core/filter.c:8718:1: note: in expansion of macro 'BPF_CALL_4' BPF_CALL_4(sk_select_reuseport, struct sk_reuseport_kern *, reuse_kern, ^ net/core/filter.c: In function 'sk_select_reuseport': >> include/linux/filter.h:453:2: warning: passing argument 1 of '(u64 (*)(struct sk_reuseport_kern *, struct bpf_map *, void *, u32))&____sk_select_reuseport' from incompatible pointer type (__force t) \ ^ include/linux/filter.h:439:38: note: in expansion of macro '__BPF_CAST' #define __BPF_MAP_4(m, v, t, a, ...) m(t, a), __BPF_MAP_3(m, v, __VA_ARGS__) ^ include/linux/filter.h:449:27: note: in expansion of macro '__BPF_MAP_4' #define __BPF_MAP(n, ...) __BPF_MAP_##n(__VA_ARGS__) ^ include/linux/filter.h:474:35: note: in expansion of macro '__BPF_MAP' return ((btf_##name)____##name)(__BPF_MAP(x,__BPF_CAST,__BPF_N,__VA_ARGS__));\ ^ include/linux/filter.h:483:31: note: in expansion of macro 'BPF_CALL_x' #define BPF_CALL_4(name, ...) BPF_CALL_x(4, name, __VA_ARGS__) ^ net/core/filter.c:8718:1: note: in expansion of macro 'BPF_CALL_4' BPF_CALL_4(sk_select_reuseport, struct sk_reuseport_kern *, reuse_kern, ^ include/linux/filter.h:453:2: note: expected 'struct sk_reuseport_kern *' but argument is of type 'struct sk_reuseport_kern *' (__force t) \ ^ include/linux/filter.h:439:38: note: in expansion of macro '__BPF_CAST' #define __BPF_MAP_4(m, v, t, a, ...) m(t, a), __BPF_MAP_3(m, v, __VA_ARGS__) ^ include/linux/filter.h:449:27: note: in expansion of macro '__BPF_MAP_4' #define __BPF_MAP(n, ...) __BPF_MAP_##n(__VA_ARGS__) ^ include/linux/filter.h:474:35: note: in expansion of macro '__BPF_MAP' return ((btf_##name)____##name)(__BPF_MAP(x,__BPF_CAST,__BPF_N,__VA_ARGS__));\ ^ include/linux/filter.h:483:31: note: in expansion of macro 'BPF_CALL_x' #define BPF_CALL_4(name, ...) BPF_CALL_x(4, name, __VA_ARGS__) ^ net/core/filter.c:8718:1: note: in expansion of macro 'BPF_CALL_4' BPF_CALL_4(sk_select_reuseport, struct sk_reuseport_kern *, reuse_kern, ^ include/linux/filter.h:474:10: warning: function called through a non-compatible type return ((btf_##name)____##name)(__BPF_MAP(x,__BPF_CAST,__BPF_N,__VA_ARGS__));\ ^ include/linux/filter.h:483:31: note: in expansion of macro 'BPF_CALL_x' #define BPF_CALL_4(name, ...) BPF_CALL_x(4, name, __VA_ARGS__) ^ net/core/filter.c:8718:1: note: in expansion of macro 'BPF_CALL_4' BPF_CALL_4(sk_select_reuseport, struct sk_reuseport_kern *, reuse_kern, ^ net/core/filter.c: At top level: net/core/filter.c:8719:12: warning: 'struct sk_reuseport_kern' declared inside parameter list struct bpf_map *, map, void *, key, u32, flags) ^ include/linux/filter.h:460:31: note: in definition of macro '__BPF_DECL_ARGS' #define __BPF_DECL_ARGS(t, a) t a ^ >> include/linux/filter.h:439:47: note: in expansion of macro '__BPF_MAP_3' #define __BPF_MAP_4(m, v, t, a, ...) m(t, a), __BPF_MAP_3(m, v, __VA_ARGS__) ^ include/linux/filter.h:449:27: note: in expansion of macro '__BPF_MAP_4' #define __BPF_MAP(n, ...) __BPF_MAP_##n(__VA_ARGS__) ^ include/linux/filter.h:477:17: note: in expansion of macro '__BPF_MAP' u64 ____##name(__BPF_MAP(x, __BPF_DECL_ARGS, __BPF_V, __VA_ARGS__)) ^ include/linux/filter.h:483:31: note: in expansion of macro 'BPF_CALL_x' #define BPF_CALL_4(name, ...) BPF_CALL_x(4, name, __VA_ARGS__) ^ net/core/filter.c:8718:1: note: in expansion of macro 'BPF_CALL_4' BPF_CALL_4(sk_select_reuseport, struct sk_reuseport_kern *, reuse_kern, ^ include/linux/filter.h:477:6: error: conflicting types for '____sk_select_reuseport' u64 ____##name(__BPF_MAP(x, __BPF_DECL_ARGS, __BPF_V, __VA_ARGS__)) ^ include/linux/filter.h:483:31: note: in expansion of macro 'BPF_CALL_x' #define BPF_CALL_4(name, ...) BPF_CALL_x(4, name, __VA_ARGS__) ^ net/core/filter.c:8718:1: note: in expansion of macro 'BPF_CALL_4' BPF_CALL_4(sk_select_reuseport, struct sk_reuseport_kern *, reuse_kern, ^ include/linux/filter.h:469:6: note: previous declaration of '____sk_select_reuseport' was here u64 ____##name(__BPF_MAP(x, __BPF_DECL_ARGS, __BPF_V, __VA_ARGS__)); \ ^ include/linux/filter.h:483:31: note: in expansion of macro 'BPF_CALL_x' #define BPF_CALL_4(name, ...) BPF_CALL_x(4, name, __VA_ARGS__) ^ net/core/filter.c:8718:1: note: in expansion of macro 'BPF_CALL_4' BPF_CALL_4(sk_select_reuseport, struct sk_reuseport_kern *, reuse_kern, ^ In file included from include/linux/export.h:42:0, from include/linux/linkage.h:7, from include/linux/kernel.h:8, from include/linux/list.h:9, from include/linux/module.h:9, from net/core/filter.c:20: net/core/filter.c: In function '____sk_select_reuseport': net/core/filter.c:8736:48: error: dereferencing pointer to incomplete type if (unlikely(reuse->reuseport_id != reuse_kern->reuseport_id)) { ^ include/linux/compiler.h:33:34: note: in definition of macro '__branch_check__' ______r = __builtin_expect(!!(x), expect); \ ^ net/core/filter.c:8736:6: note: in expansion of macro 'unlikely' if (unlikely(reuse->reuseport_id != reuse_kern->reuseport_id)) { ^ net/core/filter.c:8736:48: error: dereferencing pointer to incomplete type if (unlikely(reuse->reuseport_id != reuse_kern->reuseport_id)) { ^ include/linux/compiler.h:35:19: note: in definition of macro '__branch_check__' expect, is_constant); \ ^ net/core/filter.c:8736:6: note: in expansion of macro 'unlikely' if (unlikely(reuse->reuseport_id != reuse_kern->reuseport_id)) { ^ net/core/filter.c:8739:27: error: dereferencing pointer to incomplete type if (unlikely(!reuse_kern->reuseport_id)) ^ include/linux/compiler.h:33:34: note: in definition of macro '__branch_check__' ______r = __builtin_expect(!!(x), expect); \ ^ net/core/filter.c:8739:7: note: in expansion of macro 'unlikely' if (unlikely(!reuse_kern->reuseport_id)) ^ net/core/filter.c:8739:27: error: dereferencing pointer to incomplete type if (unlikely(!reuse_kern->reuseport_id)) ^ include/linux/compiler.h:35:19: note: in definition of macro '__branch_check__' expect, is_constant); \ ^ net/core/filter.c:8739:7: note: in expansion of macro 'unlikely' if (unlikely(!reuse_kern->reuseport_id)) ^ net/core/filter.c:8748:18: error: dereferencing pointer to incomplete type sk = reuse_kern->sk; ^ net/core/filter.c:8758:12: error: dereferencing pointer to incomplete type reuse_kern->selected_sk = selected_sk; ^ In file included from include/net/sock.h:59:0, from include/linux/sock_diag.h:8, from net/core/filter.c:25: net/core/filter.c: At top level: net/core/filter.c:8774:18: warning: 'struct sk_reuseport_kern' declared inside parameter list const struct sk_reuseport_kern *, reuse_kern, u32, offset, ^ include/linux/filter.h:460:31: note: in definition of macro '__BPF_DECL_ARGS' #define __BPF_DECL_ARGS(t, a) t a ^ include/linux/filter.h:449:27: note: in expansion of macro '__BPF_MAP_4' #define __BPF_MAP(n, ...) __BPF_MAP_##n(__VA_ARGS__) ^ include/linux/filter.h:469:17: note: in expansion of macro '__BPF_MAP' u64 ____##name(__BPF_MAP(x, __BPF_DECL_ARGS, __BPF_V, __VA_ARGS__)); \ ^ include/linux/filter.h:483:31: note: in expansion of macro 'BPF_CALL_x' #define BPF_CALL_4(name, ...) BPF_CALL_x(4, name, __VA_ARGS__) ^ net/core/filter.c:8773:1: note: in expansion of macro 'BPF_CALL_4' BPF_CALL_4(sk_reuseport_load_bytes, ^ net/core/filter.c:8774:18: warning: 'struct sk_reuseport_kern' declared inside parameter list const struct sk_reuseport_kern *, reuse_kern, u32, offset, ^ include/linux/filter.h:460:31: note: in definition of macro '__BPF_DECL_ARGS' #define __BPF_DECL_ARGS(t, a) t a ^ include/linux/filter.h:449:27: note: in expansion of macro '__BPF_MAP_4' #define __BPF_MAP(n, ...) __BPF_MAP_##n(__VA_ARGS__) ^ include/linux/filter.h:470:28: note: in expansion of macro '__BPF_MAP' typedef u64 (*btf_##name)(__BPF_MAP(x, __BPF_DECL_ARGS, __BPF_V, __VA_ARGS__)); \ ^ include/linux/filter.h:483:31: note: in expansion of macro 'BPF_CALL_x' #define BPF_CALL_4(name, ...) BPF_CALL_x(4, name, __VA_ARGS__) ^ net/core/filter.c:8773:1: note: in expansion of macro 'BPF_CALL_4' BPF_CALL_4(sk_reuseport_load_bytes, ^ net/core/filter.c: In function 'sk_reuseport_load_bytes': >> include/linux/filter.h:453:2: warning: passing argument 1 of '(u64 (*)(const struct sk_reuseport_kern *, u32, void *, u32))&____sk_reuseport_load_bytes' from incompatible pointer type (__force t) \ ^ include/linux/filter.h:439:38: note: in expansion of macro '__BPF_CAST' #define __BPF_MAP_4(m, v, t, a, ...) m(t, a), __BPF_MAP_3(m, v, __VA_ARGS__) ^ include/linux/filter.h:449:27: note: in expansion of macro '__BPF_MAP_4' #define __BPF_MAP(n, ...) __BPF_MAP_##n(__VA_ARGS__) ^ include/linux/filter.h:474:35: note: in expansion of macro '__BPF_MAP' return ((btf_##name)____##name)(__BPF_MAP(x,__BPF_CAST,__BPF_N,__VA_ARGS__));\ ^ include/linux/filter.h:483:31: note: in expansion of macro 'BPF_CALL_x' #define BPF_CALL_4(name, ...) BPF_CALL_x(4, name, __VA_ARGS__) ^ net/core/filter.c:8773:1: note: in expansion of macro 'BPF_CALL_4' BPF_CALL_4(sk_reuseport_load_bytes, ^ include/linux/filter.h:453:2: note: expected 'const struct sk_reuseport_kern *' but argument is of type 'const struct sk_reuseport_kern *' (__force t) \ ^ include/linux/filter.h:439:38: note: in expansion of macro '__BPF_CAST' #define __BPF_MAP_4(m, v, t, a, ...) m(t, a), __BPF_MAP_3(m, v, __VA_ARGS__) ^ include/linux/filter.h:449:27: note: in expansion of macro '__BPF_MAP_4' #define __BPF_MAP(n, ...) __BPF_MAP_##n(__VA_ARGS__) ^ include/linux/filter.h:474:35: note: in expansion of macro '__BPF_MAP' return ((btf_##name)____##name)(__BPF_MAP(x,__BPF_CAST,__BPF_N,__VA_ARGS__));\ ^ include/linux/filter.h:483:31: note: in expansion of macro 'BPF_CALL_x' #define BPF_CALL_4(name, ...) BPF_CALL_x(4, name, __VA_ARGS__) ^ net/core/filter.c:8773:1: note: in expansion of macro 'BPF_CALL_4' BPF_CALL_4(sk_reuseport_load_bytes, ^ include/linux/filter.h:474:10: warning: function called through a non-compatible type return ((btf_##name)____##name)(__BPF_MAP(x,__BPF_CAST,__BPF_N,__VA_ARGS__));\ ^ include/linux/filter.h:483:31: note: in expansion of macro 'BPF_CALL_x' #define BPF_CALL_4(name, ...) BPF_CALL_x(4, name, __VA_ARGS__) ^ net/core/filter.c:8773:1: note: in expansion of macro 'BPF_CALL_4' BPF_CALL_4(sk_reuseport_load_bytes, ^ net/core/filter.c: At top level: net/core/filter.c:8774:18: warning: 'struct sk_reuseport_kern' declared inside parameter list const struct sk_reuseport_kern *, reuse_kern, u32, offset, ^ include/linux/filter.h:460:31: note: in definition of macro '__BPF_DECL_ARGS' #define __BPF_DECL_ARGS(t, a) t a ^ include/linux/filter.h:449:27: note: in expansion of macro '__BPF_MAP_4' #define __BPF_MAP(n, ...) __BPF_MAP_##n(__VA_ARGS__) ^ include/linux/filter.h:477:17: note: in expansion of macro '__BPF_MAP' u64 ____##name(__BPF_MAP(x, __BPF_DECL_ARGS, __BPF_V, __VA_ARGS__)) ^ include/linux/filter.h:483:31: note: in expansion of macro 'BPF_CALL_x' #define BPF_CALL_4(name, ...) BPF_CALL_x(4, name, __VA_ARGS__) ^ net/core/filter.c:8773:1: note: in expansion of macro 'BPF_CALL_4' BPF_CALL_4(sk_reuseport_load_bytes, ^ include/linux/filter.h:477:6: error: conflicting types for '____sk_reuseport_load_bytes' u64 ____##name(__BPF_MAP(x, __BPF_DECL_ARGS, __BPF_V, __VA_ARGS__)) ^ include/linux/filter.h:483:31: note: in expansion of macro 'BPF_CALL_x' #define BPF_CALL_4(name, ...) BPF_CALL_x(4, name, __VA_ARGS__) ^ net/core/filter.c:8773:1: note: in expansion of macro 'BPF_CALL_4' BPF_CALL_4(sk_reuseport_load_bytes, ^ include/linux/filter.h:469:6: note: previous declaration of '____sk_reuseport_load_bytes' was here u64 ____##name(__BPF_MAP(x, __BPF_DECL_ARGS, __BPF_V, __VA_ARGS__)); \ ^ include/linux/filter.h:483:31: note: in expansion of macro 'BPF_CALL_x' #define BPF_CALL_4(name, ...) BPF_CALL_x(4, name, __VA_ARGS__) ^ net/core/filter.c:8773:1: note: in expansion of macro 'BPF_CALL_4' BPF_CALL_4(sk_reuseport_load_bytes, ^ net/core/filter.c: In function '____sk_reuseport_load_bytes': net/core/filter.c:8777:42: error: dereferencing pointer to incomplete type return ____bpf_skb_load_bytes(reuse_kern->skb, offset, to, len); ^ In file included from include/net/sock.h:59:0, from include/linux/sock_diag.h:8, from net/core/filter.c:25: net/core/filter.c: At top level: net/core/filter.c:8791:18: warning: 'struct sk_reuseport_kern' declared inside parameter list const struct sk_reuseport_kern *, reuse_kern, u32, offset, ^ include/linux/filter.h:460:31: note: in definition of macro '__BPF_DECL_ARGS' #define __BPF_DECL_ARGS(t, a) t a ^ include/linux/filter.h:449:27: note: in expansion of macro '__BPF_MAP_5' #define __BPF_MAP(n, ...) __BPF_MAP_##n(__VA_ARGS__) ^ include/linux/filter.h:469:17: note: in expansion of macro '__BPF_MAP' u64 ____##name(__BPF_MAP(x, __BPF_DECL_ARGS, __BPF_V, __VA_ARGS__)); \ ^ include/linux/filter.h:484:31: note: in expansion of macro 'BPF_CALL_x' #define BPF_CALL_5(name, ...) BPF_CALL_x(5, name, __VA_ARGS__) ^ net/core/filter.c:8790:1: note: in expansion of macro 'BPF_CALL_5' BPF_CALL_5(sk_reuseport_load_bytes_relative, ^ net/core/filter.c:8791:18: warning: 'struct sk_reuseport_kern' declared inside parameter list const struct sk_reuseport_kern *, reuse_kern, u32, offset, ^ include/linux/filter.h:460:31: note: in definition of macro '__BPF_DECL_ARGS' #define __BPF_DECL_ARGS(t, a) t a ^ include/linux/filter.h:449:27: note: in expansion of macro '__BPF_MAP_5' #define __BPF_MAP(n, ...) __BPF_MAP_##n(__VA_ARGS__) ^ include/linux/filter.h:470:28: note: in expansion of macro '__BPF_MAP' typedef u64 (*btf_##name)(__BPF_MAP(x, __BPF_DECL_ARGS, __BPF_V, __VA_ARGS__)); \ ^ include/linux/filter.h:484:31: note: in expansion of macro 'BPF_CALL_x' #define BPF_CALL_5(name, ...) BPF_CALL_x(5, name, __VA_ARGS__) ^ net/core/filter.c:8790:1: note: in expansion of macro 'BPF_CALL_5' BPF_CALL_5(sk_reuseport_load_bytes_relative, ^ net/core/filter.c: In function 'sk_reuseport_load_bytes_relative': >> include/linux/filter.h:453:2: warning: passing argument 1 of '(u64 (*)(const struct sk_reuseport_kern *, u32, void *, u32, u32))&____sk_reuseport_load_bytes_relative' from incompatible pointer type (__force t) \ ^ include/linux/filter.h:440:38: note: in expansion of macro '__BPF_CAST' #define __BPF_MAP_5(m, v, t, a, ...) m(t, a), __BPF_MAP_4(m, v, __VA_ARGS__) ^ include/linux/filter.h:449:27: note: in expansion of macro '__BPF_MAP_5' #define __BPF_MAP(n, ...) __BPF_MAP_##n(__VA_ARGS__) ^ include/linux/filter.h:474:35: note: in expansion of macro '__BPF_MAP' return ((btf_##name)____##name)(__BPF_MAP(x,__BPF_CAST,__BPF_N,__VA_ARGS__));\ ^ include/linux/filter.h:484:31: note: in expansion of macro 'BPF_CALL_x' #define BPF_CALL_5(name, ...) BPF_CALL_x(5, name, __VA_ARGS__) ^ net/core/filter.c:8790:1: note: in expansion of macro 'BPF_CALL_5' BPF_CALL_5(sk_reuseport_load_bytes_relative, ^ include/linux/filter.h:453:2: note: expected 'const struct sk_reuseport_kern *' but argument is of type 'const struct sk_reuseport_kern *' (__force t) \ ^ include/linux/filter.h:440:38: note: in expansion of macro '__BPF_CAST' #define __BPF_MAP_5(m, v, t, a, ...) m(t, a), __BPF_MAP_4(m, v, __VA_ARGS__) ^ include/linux/filter.h:449:27: note: in expansion of macro '__BPF_MAP_5' #define __BPF_MAP(n, ...) __BPF_MAP_##n(__VA_ARGS__) ^ include/linux/filter.h:474:35: note: in expansion of macro '__BPF_MAP' return ((btf_##name)____##name)(__BPF_MAP(x,__BPF_CAST,__BPF_N,__VA_ARGS__));\ ^ include/linux/filter.h:484:31: note: in expansion of macro 'BPF_CALL_x' #define BPF_CALL_5(name, ...) BPF_CALL_x(5, name, __VA_ARGS__) ^ net/core/filter.c:8790:1: note: in expansion of macro 'BPF_CALL_5' BPF_CALL_5(sk_reuseport_load_bytes_relative, ^ include/linux/filter.h:474:10: warning: function called through a non-compatible type return ((btf_##name)____##name)(__BPF_MAP(x,__BPF_CAST,__BPF_N,__VA_ARGS__));\ ^ include/linux/filter.h:484:31: note: in expansion of macro 'BPF_CALL_x' #define BPF_CALL_5(name, ...) BPF_CALL_x(5, name, __VA_ARGS__) ^ net/core/filter.c:8790:1: note: in expansion of macro 'BPF_CALL_5' BPF_CALL_5(sk_reuseport_load_bytes_relative, ^ net/core/filter.c: At top level: net/core/filter.c:8791:18: warning: 'struct sk_reuseport_kern' declared inside parameter list const struct sk_reuseport_kern *, reuse_kern, u32, offset, ^ include/linux/filter.h:460:31: note: in definition of macro '__BPF_DECL_ARGS' #define __BPF_DECL_ARGS(t, a) t a ^ include/linux/filter.h:449:27: note: in expansion of macro '__BPF_MAP_5' #define __BPF_MAP(n, ...) __BPF_MAP_##n(__VA_ARGS__) ^ include/linux/filter.h:477:17: note: in expansion of macro '__BPF_MAP' u64 ____##name(__BPF_MAP(x, __BPF_DECL_ARGS, __BPF_V, __VA_ARGS__)) ^ include/linux/filter.h:484:31: note: in expansion of macro 'BPF_CALL_x' #define BPF_CALL_5(name, ...) BPF_CALL_x(5, name, __VA_ARGS__) ^ net/core/filter.c:8790:1: note: in expansion of macro 'BPF_CALL_5' BPF_CALL_5(sk_reuseport_load_bytes_relative, ^ include/linux/filter.h:477:6: error: conflicting types for '____sk_reuseport_load_bytes_relative' u64 ____##name(__BPF_MAP(x, __BPF_DECL_ARGS, __BPF_V, __VA_ARGS__)) ^ include/linux/filter.h:484:31: note: in expansion of macro 'BPF_CALL_x' #define BPF_CALL_5(name, ...) BPF_CALL_x(5, name, __VA_ARGS__) ^ net/core/filter.c:8790:1: note: in expansion of macro 'BPF_CALL_5' BPF_CALL_5(sk_reuseport_load_bytes_relative, ^ include/linux/filter.h:469:6: note: previous declaration of '____sk_reuseport_load_bytes_relative' was here u64 ____##name(__BPF_MAP(x, __BPF_DECL_ARGS, __BPF_V, __VA_ARGS__)); \ ^ include/linux/filter.h:484:31: note: in expansion of macro 'BPF_CALL_x' #define BPF_CALL_5(name, ...) BPF_CALL_x(5, name, __VA_ARGS__) ^ net/core/filter.c:8790:1: note: in expansion of macro 'BPF_CALL_5' BPF_CALL_5(sk_reuseport_load_bytes_relative, ^ net/core/filter.c: In function '____sk_reuseport_load_bytes_relative': net/core/filter.c:8794:51: error: dereferencing pointer to incomplete type return ____bpf_skb_load_bytes_relative(reuse_kern->skb, offset, to, ^ In file included from include/uapi/linux/bpf.h:12:0, from include/linux/bpf.h:7, from include/linux/bpf-cgroup.h:5, from include/linux/cgroup-defs.h:22, from include/linux/cgroup.h:28, from include/net/netprio_cgroup.h:11, from include/linux/netdevice.h:42, from include/net/sock.h:46, from include/linux/sock_diag.h:8, from net/core/filter.c:25: net/core/filter.c: In function 'sk_reuseport_convert_ctx_access': include/linux/kernel.h:89:43: error: dereferencing pointer to incomplete type #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) ^ include/uapi/linux/bpf_common.h:17:27: note: in definition of macro 'BPF_SIZE' .. vim +8693 net/core/filter.c 2dbb9b9e6df67d Martin KaFai Lau 2018-08-08 8686 2dbb9b9e6df67d Martin KaFai Lau 2018-08-08 8687 #ifdef CONFIG_INET 2dbb9b9e6df67d Martin KaFai Lau 2018-08-08 8688 static void bpf_init_reuseport_kern(struct sk_reuseport_kern *reuse_kern, 2dbb9b9e6df67d Martin KaFai Lau 2018-08-08 8689 struct sock_reuseport *reuse, 2dbb9b9e6df67d Martin KaFai Lau 2018-08-08 8690 struct sock *sk, struct sk_buff *skb, 2dbb9b9e6df67d Martin KaFai Lau 2018-08-08 @8691 u32 hash) 2dbb9b9e6df67d Martin KaFai Lau 2018-08-08 8692 { 2dbb9b9e6df67d Martin KaFai Lau 2018-08-08 @8693 reuse_kern->skb = skb; 2dbb9b9e6df67d Martin KaFai Lau 2018-08-08 8694 reuse_kern->sk = sk; 2dbb9b9e6df67d Martin KaFai Lau 2018-08-08 8695 reuse_kern->selected_sk = NULL; 2dbb9b9e6df67d Martin KaFai Lau 2018-08-08 8696 reuse_kern->data_end = skb->data + skb_headlen(skb); 2dbb9b9e6df67d Martin KaFai Lau 2018-08-08 8697 reuse_kern->hash = hash; 2dbb9b9e6df67d Martin KaFai Lau 2018-08-08 8698 reuse_kern->reuseport_id = reuse->reuseport_id; 2dbb9b9e6df67d Martin KaFai Lau 2018-08-08 8699 reuse_kern->bind_inany = reuse->bind_inany; 2dbb9b9e6df67d Martin KaFai Lau 2018-08-08 8700 } 2dbb9b9e6df67d Martin KaFai Lau 2018-08-08 8701 :::::: The code at line 8693 was first introduced by commit :::::: 2dbb9b9e6df67d444fbe425c7f6014858d337adf bpf: Introduce BPF_PROG_TYPE_SK_REUSEPORT :::::: TO: Martin KaFai Lau :::::: CC: Daniel Borkmann --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation