All of lore.kernel.org
 help / color / mirror / Atom feed
* [ast:bpf_tramp 20/20] net/core/filter.c:8735:2: note: in expansion of macro 'if'
@ 2019-11-12  9:36 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2019-11-12  9:36 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 58191 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/ast/bpf.git bpf_tramp
head:   0e8ec3149b764e0a8628fc0ed9f5c36d1c66daae
commit: 0e8ec3149b764e0a8628fc0ed9f5c36d1c66daae [20/20] bpf: annotate context types
config: i386-randconfig-f001-201945 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
        git checkout 0e8ec3149b764e0a8628fc0ed9f5c36d1c66daae
        # save the attached .config to linux build tree
        make ARCH=i386 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

                                  ^~~~~~~~~~
   net/core/filter.c:8717: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: error: passing argument 1 of '(u64 (*)(struct sk_reuseport_kern *, struct bpf_map *, void *, u32))&____sk_select_reuseport' from incompatible pointer type [-Werror=incompatible-pointer-types]
     (__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:8717: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:8717: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:11: 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:8717: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:8717:40: warning: 'struct sk_reuseport_kern' declared inside parameter list will not be visible outside of this definition or declaration
    BPF_CALL_4(sk_select_reuseport, struct sk_reuseport_kern *, reuse_kern,
                                           ^
   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:8717: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:8717: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:8717: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:8735:48: error: dereferencing pointer to incomplete type 'struct sk_reuseport_kern'
     if (unlikely(reuse->reuseport_id != reuse_kern->reuseport_id)) {
                                                   ^
   include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
    #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                       ^~~~
>> net/core/filter.c:8735:2: note: in expansion of macro 'if'
     if (unlikely(reuse->reuseport_id != reuse_kern->reuseport_id)) {
     ^~
   include/linux/compiler.h:48:24: note: in expansion of macro '__branch_check__'
    #  define unlikely(x) (__branch_check__(x, 0, __builtin_constant_p(x)))
                           ^~~~~~~~~~~~~~~~
>> net/core/filter.c:8735:6: note: in expansion of macro 'unlikely'
     if (unlikely(reuse->reuseport_id != reuse_kern->reuseport_id)) {
         ^~~~~~~~
   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:8773:18: warning: 'struct sk_reuseport_kern' declared inside parameter list will not be visible outside of this definition or declaration
        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:8772:1: note: in expansion of macro 'BPF_CALL_4'
    BPF_CALL_4(sk_reuseport_load_bytes,
    ^~~~~~~~~~
   net/core/filter.c:8773:18: warning: 'struct sk_reuseport_kern' declared inside parameter list will not be visible outside of this definition or declaration
        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:8772: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: error: passing argument 1 of '(u64 (*)(const struct sk_reuseport_kern *, u32,  void *, u32))&____sk_reuseport_load_bytes' from incompatible pointer type [-Werror=incompatible-pointer-types]
     (__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:8772: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:8772:1: note: in expansion of macro 'BPF_CALL_4'
    BPF_CALL_4(sk_reuseport_load_bytes,
    ^~~~~~~~~~
   include/linux/filter.h:474:11: 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:8772: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:8773:18: warning: 'struct sk_reuseport_kern' declared inside parameter list will not be visible outside of this definition or declaration
        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: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:8789: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:8789:1: note: in expansion of macro 'BPF_CALL_5'
    BPF_CALL_5(sk_reuseport_load_bytes_relative,
    ^~~~~~~~~~
   include/linux/filter.h:474:11: 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:8789: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:8790:18: warning: 'struct sk_reuseport_kern' declared inside parameter list will not be visible outside of this definition or declaration
        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:8789: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:8789: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:8789: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:8793:51: error: dereferencing pointer to incomplete type 'const struct sk_reuseport_kern'
     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 'struct sk_reuseport_kern'
    #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
                                              ^
   include/uapi/linux/bpf_common.h:17:27: note: in definition of macro 'BPF_SIZE'
    #define BPF_SIZE(code)  ((code) & 0x18)
                              ^~~~
   net/core/filter.c:7836:13: note: in expansion of macro 'BPF_LDX_MEM'
      *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(S, F), si->dst_reg,     \
                ^~~~~~~~~~~
   include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
    #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                               ^~~~~~~~~~~~~~
>> include/linux/filter.h:386:2: note: in expansion of macro 'if'
     if (bytes == sizeof(u8))    \
     ^~
   include/linux/filter.h:423:22: note: in expansion of macro 'bytes_to_bpf_size'
      const int __size = bytes_to_bpf_size(FIELD_SIZEOF(type, field)); \
                         ^~~~~~~~~~~~~~~~~
   include/linux/filter.h:423:40: note: in expansion of macro 'FIELD_SIZEOF'
      const int __size = bytes_to_bpf_size(FIELD_SIZEOF(type, field)); \
                                           ^~~~~~~~~~~~
   net/core/filter.c:7836:25: note: in expansion of macro 'BPF_FIELD_SIZEOF'
      *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(S, F), si->dst_reg,     \
                            ^~~~~~~~~~~~~~~~
   net/core/filter.c:7846:2: note: in expansion of macro 'SOCK_ADDR_LOAD_NESTED_FIELD_SIZE_OFF'
     SOCK_ADDR_LOAD_NESTED_FIELD_SIZE_OFF(S, NS, F, NF,         \
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   net/core/filter.c:8873:2: note: in expansion of macro 'SOCK_ADDR_LOAD_NESTED_FIELD'
     SOCK_ADDR_LOAD_NESTED_FIELD(struct sk_reuseport_kern,  \
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   net/core/filter.c:8894:3: note: in expansion of macro 'SK_REUSEPORT_LOAD_SKB_FIELD'
      SK_REUSEPORT_LOAD_SKB_FIELD(data);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/net/sock.h:59:0,
                    from include/linux/sock_diag.h:8,
                    from net/core/filter.c:25:
   include/linux/compiler_types.h:129:35: error: invalid use of undefined type 'struct sk_reuseport_kern'
    #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
                                      ^
   include/linux/filter.h:248:12: note: in definition of macro 'BPF_LDX_MEM'
      .off   = OFF,     \
               ^~~
   include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
    #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
                                   ^~~~~~~~~~~~~~~~~~~
   net/core/filter.c:7837:24: note: in expansion of macro 'offsetof'
              si->src_reg, offsetof(S, F));        \
                           ^~~~~~~~
   net/core/filter.c:7846:2: note: in expansion of macro 'SOCK_ADDR_LOAD_NESTED_FIELD_SIZE_OFF'
     SOCK_ADDR_LOAD_NESTED_FIELD_SIZE_OFF(S, NS, F, NF,         \
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   net/core/filter.c:8873:2: note: in expansion of macro 'SOCK_ADDR_LOAD_NESTED_FIELD'
     SOCK_ADDR_LOAD_NESTED_FIELD(struct sk_reuseport_kern,  \
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   net/core/filter.c:8894:3: note: in expansion of macro 'SK_REUSEPORT_LOAD_SKB_FIELD'
      SK_REUSEPORT_LOAD_SKB_FIELD(data);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   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:
   include/linux/kernel.h:89:43: error: dereferencing pointer to incomplete type 'struct sk_reuseport_kern'
    #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
                                              ^
   include/uapi/linux/bpf_common.h:17:27: note: in definition of macro 'BPF_SIZE'
    #define BPF_SIZE(code)  ((code) & 0x18)
                              ^~~~
   net/core/filter.c:7836:13: note: in expansion of macro 'BPF_LDX_MEM'
      *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(S, F), si->dst_reg,     \
                ^~~~~~~~~~~
   include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
    #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                               ^~~~~~~~~~~~~~
>> include/linux/filter.h:386:2: note: in expansion of macro 'if'
     if (bytes == sizeof(u8))    \
     ^~
   include/linux/filter.h:423:22: note: in expansion of macro 'bytes_to_bpf_size'
      const int __size = bytes_to_bpf_size(FIELD_SIZEOF(type, field)); \
                         ^~~~~~~~~~~~~~~~~
   include/linux/filter.h:423:40: note: in expansion of macro 'FIELD_SIZEOF'
      const int __size = bytes_to_bpf_size(FIELD_SIZEOF(type, field)); \
                                           ^~~~~~~~~~~~
   net/core/filter.c:7836:25: note: in expansion of macro 'BPF_FIELD_SIZEOF'
      *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(S, F), si->dst_reg,     \
                            ^~~~~~~~~~~~~~~~
   net/core/filter.c:7846:2: note: in expansion of macro 'SOCK_ADDR_LOAD_NESTED_FIELD_SIZE_OFF'
     SOCK_ADDR_LOAD_NESTED_FIELD_SIZE_OFF(S, NS, F, NF,         \
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   net/core/filter.c:8873:2: note: in expansion of macro 'SOCK_ADDR_LOAD_NESTED_FIELD'
     SOCK_ADDR_LOAD_NESTED_FIELD(struct sk_reuseport_kern,  \
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   net/core/filter.c:8898:3: note: in expansion of macro 'SK_REUSEPORT_LOAD_SKB_FIELD'
      SK_REUSEPORT_LOAD_SKB_FIELD(len);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/net/sock.h:59:0,
                    from include/linux/sock_diag.h:8,
                    from net/core/filter.c:25:
   include/linux/compiler_types.h:129:35: error: invalid use of undefined type 'struct sk_reuseport_kern'
    #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
                                      ^
   include/linux/filter.h:248:12: note: in definition of macro 'BPF_LDX_MEM'
      .off   = OFF,     \
               ^~~
   include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
    #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
                                   ^~~~~~~~~~~~~~~~~~~
   net/core/filter.c:7837:24: note: in expansion of macro 'offsetof'
              si->src_reg, offsetof(S, F));        \
                           ^~~~~~~~
   net/core/filter.c:7846:2: note: in expansion of macro 'SOCK_ADDR_LOAD_NESTED_FIELD_SIZE_OFF'
     SOCK_ADDR_LOAD_NESTED_FIELD_SIZE_OFF(S, NS, F, NF,         \
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   net/core/filter.c:8873:2: note: in expansion of macro 'SOCK_ADDR_LOAD_NESTED_FIELD'
     SOCK_ADDR_LOAD_NESTED_FIELD(struct sk_reuseport_kern,  \
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   net/core/filter.c:8898:3: note: in expansion of macro 'SK_REUSEPORT_LOAD_SKB_FIELD'
      SK_REUSEPORT_LOAD_SKB_FIELD(len);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   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:
   include/linux/kernel.h:89:43: error: dereferencing pointer to incomplete type 'struct sk_reuseport_kern'
    #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
                                              ^
   include/uapi/linux/bpf_common.h:17:27: note: in definition of macro 'BPF_SIZE'
    #define BPF_SIZE(code)  ((code) & 0x18)
                              ^~~~
   net/core/filter.c:7836:13: note: in expansion of macro 'BPF_LDX_MEM'
      *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(S, F), si->dst_reg,     \
                ^~~~~~~~~~~
   include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
    #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                               ^~~~~~~~~~~~~~
>> include/linux/filter.h:386:2: note: in expansion of macro 'if'
     if (bytes == sizeof(u8))    \
     ^~
   include/linux/filter.h:423:22: note: in expansion of macro 'bytes_to_bpf_size'
      const int __size = bytes_to_bpf_size(FIELD_SIZEOF(type, field)); \
                         ^~~~~~~~~~~~~~~~~
   include/linux/filter.h:423:40: note: in expansion of macro 'FIELD_SIZEOF'
      const int __size = bytes_to_bpf_size(FIELD_SIZEOF(type, field)); \
                                           ^~~~~~~~~~~~
   net/core/filter.c:7836:25: note: in expansion of macro 'BPF_FIELD_SIZEOF'
      *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(S, F), si->dst_reg,     \
                            ^~~~~~~~~~~~~~~~
   net/core/filter.c:7846:2: note: in expansion of macro 'SOCK_ADDR_LOAD_NESTED_FIELD_SIZE_OFF'
     SOCK_ADDR_LOAD_NESTED_FIELD_SIZE_OFF(S, NS, F, NF,         \
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   net/core/filter.c:8873:2: note: in expansion of macro 'SOCK_ADDR_LOAD_NESTED_FIELD'
     SOCK_ADDR_LOAD_NESTED_FIELD(struct sk_reuseport_kern,  \
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   net/core/filter.c:8902:3: note: in expansion of macro 'SK_REUSEPORT_LOAD_SKB_FIELD'
      SK_REUSEPORT_LOAD_SKB_FIELD(protocol);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/net/sock.h:59:0,
                    from include/linux/sock_diag.h:8,
                    from net/core/filter.c:25:
   include/linux/compiler_types.h:129:35: error: invalid use of undefined type 'struct sk_reuseport_kern'
    #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
                                      ^
   include/linux/filter.h:248:12: note: in definition of macro 'BPF_LDX_MEM'
      .off   = OFF,     \
               ^~~
   include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
    #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
                                   ^~~~~~~~~~~~~~~~~~~
   net/core/filter.c:7837:24: note: in expansion of macro 'offsetof'
              si->src_reg, offsetof(S, F));        \
                           ^~~~~~~~
   net/core/filter.c:7846:2: note: in expansion of macro 'SOCK_ADDR_LOAD_NESTED_FIELD_SIZE_OFF'
     SOCK_ADDR_LOAD_NESTED_FIELD_SIZE_OFF(S, NS, F, NF,         \
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   net/core/filter.c:8873:2: note: in expansion of macro 'SOCK_ADDR_LOAD_NESTED_FIELD'
     SOCK_ADDR_LOAD_NESTED_FIELD(struct sk_reuseport_kern,  \
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   net/core/filter.c:8902:3: note: in expansion of macro 'SK_REUSEPORT_LOAD_SKB_FIELD'
      SK_REUSEPORT_LOAD_SKB_FIELD(protocol);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   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:
   include/linux/kernel.h:89:43: error: dereferencing pointer to incomplete type 'struct sk_reuseport_kern'
    #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
                                              ^
   include/uapi/linux/bpf_common.h:17:27: note: in definition of macro 'BPF_SIZE'
    #define BPF_SIZE(code)  ((code) & 0x18)
                              ^~~~
   net/core/filter.c:7836:13: note: in expansion of macro 'BPF_LDX_MEM'
      *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(S, F), si->dst_reg,     \
                ^~~~~~~~~~~
   include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
    #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                               ^~~~~~~~~~~~~~
>> include/linux/filter.h:386:2: note: in expansion of macro 'if'
     if (bytes == sizeof(u8))    \
     ^~
   include/linux/filter.h:423:22: note: in expansion of macro 'bytes_to_bpf_size'
      const int __size = bytes_to_bpf_size(FIELD_SIZEOF(type, field)); \
                         ^~~~~~~~~~~~~~~~~
   include/linux/filter.h:423:40: note: in expansion of macro 'FIELD_SIZEOF'
      const int __size = bytes_to_bpf_size(FIELD_SIZEOF(type, field)); \
                                           ^~~~~~~~~~~~
   net/core/filter.c:7836:25: note: in expansion of macro 'BPF_FIELD_SIZEOF'
      *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(S, F), si->dst_reg,     \
                            ^~~~~~~~~~~~~~~~
   net/core/filter.c:8879:2: note: in expansion of macro 'SOCK_ADDR_LOAD_NESTED_FIELD_SIZE_OFF'
     SOCK_ADDR_LOAD_NESTED_FIELD_SIZE_OFF(struct sk_reuseport_kern, \
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   net/core/filter.c:8907:3: note: in expansion of macro 'SK_REUSEPORT_LOAD_SK_FIELD_SIZE_OFF'
      SK_REUSEPORT_LOAD_SK_FIELD_SIZE_OFF(__sk_flags_offset,
      ^
   In file included from include/net/sock.h:59:0,
                    from include/linux/sock_diag.h:8,
                    from net/core/filter.c:25:
   include/linux/compiler_types.h:129:35: error: invalid use of undefined type 'struct sk_reuseport_kern'
    #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
                                      ^
   include/linux/filter.h:248:12: note: in definition of macro 'BPF_LDX_MEM'
      .off   = OFF,     \
               ^~~
   include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
    #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
                                   ^~~~~~~~~~~~~~~~~~~
   net/core/filter.c:7837:24: note: in expansion of macro 'offsetof'
              si->src_reg, offsetof(S, F));        \
                           ^~~~~~~~
   net/core/filter.c:8879:2: note: in expansion of macro 'SOCK_ADDR_LOAD_NESTED_FIELD_SIZE_OFF'
     SOCK_ADDR_LOAD_NESTED_FIELD_SIZE_OFF(struct sk_reuseport_kern, \
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   net/core/filter.c:8907:3: note: in expansion of macro 'SK_REUSEPORT_LOAD_SK_FIELD_SIZE_OFF'
      SK_REUSEPORT_LOAD_SK_FIELD_SIZE_OFF(__sk_flags_offset,
      ^
   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:
   include/linux/kernel.h:89:43: error: dereferencing pointer to incomplete type 'struct sk_reuseport_kern'
    #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
                                              ^
   include/uapi/linux/bpf_common.h:17:27: note: in definition of macro 'BPF_SIZE'
    #define BPF_SIZE(code)  ((code) & 0x18)
                              ^~~~
   net/core/filter.c:8865:12: note: in expansion of macro 'BPF_LDX_MEM'
     *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct sk_reuseport_kern, F), \
               ^~~~~~~~~~~
   include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
    #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                               ^~~~~~~~~~~~~~
>> include/linux/filter.h:386:2: note: in expansion of macro 'if'
     if (bytes == sizeof(u8))    \
     ^~
   include/linux/filter.h:423:22: note: in expansion of macro 'bytes_to_bpf_size'
      const int __size = bytes_to_bpf_size(FIELD_SIZEOF(type, field)); \
                         ^~~~~~~~~~~~~~~~~
   include/linux/filter.h:423:40: note: in expansion of macro 'FIELD_SIZEOF'
      const int __size = bytes_to_bpf_size(FIELD_SIZEOF(type, field)); \
                                           ^~~~~~~~~~~~
   net/core/filter.c:8865:24: note: in expansion of macro 'BPF_FIELD_SIZEOF'
     *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct sk_reuseport_kern, F), \
                           ^~~~~~~~~~~~~~~~
   net/core/filter.c:8919:3: note: in expansion of macro 'SK_REUSEPORT_LOAD_FIELD'
      SK_REUSEPORT_LOAD_FIELD(data_end);
      ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/net/sock.h:59:0,
                    from include/linux/sock_diag.h:8,
                    from net/core/filter.c:25:
   include/linux/kernel.h:89:43: error: dereferencing pointer to incomplete type 'struct sk_reuseport_kern'
    #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
                                              ^
   include/linux/filter.h:248:12: note: in definition of macro 'BPF_LDX_MEM'
      .off   = OFF,     \
               ^~~
   include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
    #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                               ^~~~~~~~~~~~~~
>> include/linux/compiler.h:330:3: note: in expansion of macro 'if'
      if (!(condition))     \
      ^~
   include/linux/compiler.h:338:2: note: in expansion of macro '__compiletime_assert'
     __compiletime_assert(condition, msg, prefix, suffix)
     ^~~~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert'
     _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
    #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                        ^~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
     BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
     ^~~~~~~~~~~~~~~~
   include/linux/filter.h:500:3: note: in expansion of macro 'BUILD_BUG_ON'
      BUILD_BUG_ON(FIELD_SIZEOF(TYPE, MEMBER) != (SIZE));  \
      ^~~~~~~~~~~~
   include/linux/filter.h:500:16: note: in expansion of macro 'FIELD_SIZEOF'
      BUILD_BUG_ON(FIELD_SIZEOF(TYPE, MEMBER) != (SIZE));  \
                   ^~~~~~~~~~~~
   net/core/filter.c:8867:10: note: in expansion of macro 'bpf_target_off'
             bpf_target_off(struct sk_reuseport_kern, F, \
             ^~~~~~~~~~~~~~
   net/core/filter.c:8919:3: note: in expansion of macro 'SK_REUSEPORT_LOAD_FIELD'
      SK_REUSEPORT_LOAD_FIELD(data_end);
      ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:89:43: error: dereferencing pointer to incomplete type 'struct sk_reuseport_kern'
    #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
                                              ^
   include/linux/filter.h:248:12: note: in definition of macro 'BPF_LDX_MEM'
      .off   = OFF,     \
               ^~~
   net/core/filter.c:8867:10: note: in expansion of macro 'bpf_target_off'
             bpf_target_off(struct sk_reuseport_kern, F, \
             ^~~~~~~~~~~~~~
   net/core/filter.c:8868:11: note: in expansion of macro 'FIELD_SIZEOF'
              FIELD_SIZEOF(struct sk_reuseport_kern, F), \
              ^~~~~~~~~~~~
   net/core/filter.c:8919:3: note: in expansion of macro 'SK_REUSEPORT_LOAD_FIELD'
      SK_REUSEPORT_LOAD_FIELD(data_end);
      ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:129:35: error: invalid use of undefined type 'struct sk_reuseport_kern'
    #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
                                      ^
   include/linux/filter.h:248:12: note: in definition of macro 'BPF_LDX_MEM'
      .off   = OFF,     \
               ^~~
   include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
    #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
                                   ^~~~~~~~~~~~~~~~~~~
   include/linux/filter.h:502:3: note: in expansion of macro 'offsetof'
      offsetof(TYPE, MEMBER);      \
      ^~~~~~~~
   net/core/filter.c:8867:10: note: in expansion of macro 'bpf_target_off'
             bpf_target_off(struct sk_reuseport_kern, F, \
             ^~~~~~~~~~~~~~
   net/core/filter.c:8919:3: note: in expansion of macro 'SK_REUSEPORT_LOAD_FIELD'
      SK_REUSEPORT_LOAD_FIELD(data_end);
      ^~~~~~~~~~~~~~~~~~~~~~~
   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:
   include/linux/kernel.h:89:43: error: dereferencing pointer to incomplete type 'struct sk_reuseport_kern'
    #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
                                              ^
   include/uapi/linux/bpf_common.h:17:27: note: in definition of macro 'BPF_SIZE'
    #define BPF_SIZE(code)  ((code) & 0x18)
                              ^~~~
   net/core/filter.c:8865:12: note: in expansion of macro 'BPF_LDX_MEM'
     *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct sk_reuseport_kern, F), \
               ^~~~~~~~~~~
   include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
    #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                               ^~~~~~~~~~~~~~
>> include/linux/filter.h:386:2: note: in expansion of macro 'if'
     if (bytes == sizeof(u8))    \
     ^~
   include/linux/filter.h:423:22: note: in expansion of macro 'bytes_to_bpf_size'
      const int __size = bytes_to_bpf_size(FIELD_SIZEOF(type, field)); \
                         ^~~~~~~~~~~~~~~~~
   include/linux/filter.h:423:40: note: in expansion of macro 'FIELD_SIZEOF'
      const int __size = bytes_to_bpf_size(FIELD_SIZEOF(type, field)); \
                                           ^~~~~~~~~~~~
   net/core/filter.c:8865:24: note: in expansion of macro 'BPF_FIELD_SIZEOF'
     *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct sk_reuseport_kern, F), \
                           ^~~~~~~~~~~~~~~~
   net/core/filter.c:8923:3: note: in expansion of macro 'SK_REUSEPORT_LOAD_FIELD'
      SK_REUSEPORT_LOAD_FIELD(hash);
      ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/net/sock.h:59:0,
                    from include/linux/sock_diag.h:8,
                    from net/core/filter.c:25:
   include/linux/kernel.h:89:43: error: dereferencing pointer to incomplete type 'struct sk_reuseport_kern'
    #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
                                              ^
   include/linux/filter.h:248:12: note: in definition of macro 'BPF_LDX_MEM'
      .off   = OFF,     \
               ^~~
   include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
    #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                               ^~~~~~~~~~~~~~
>> include/linux/compiler.h:330:3: note: in expansion of macro 'if'
      if (!(condition))     \
      ^~
   include/linux/compiler.h:338:2: note: in expansion of macro '__compiletime_assert'
     __compiletime_assert(condition, msg, prefix, suffix)
     ^~~~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert'
     _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
    #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                        ^~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
     BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
     ^~~~~~~~~~~~~~~~
   include/linux/filter.h:500:3: note: in expansion of macro 'BUILD_BUG_ON'
      BUILD_BUG_ON(FIELD_SIZEOF(TYPE, MEMBER) != (SIZE));  \
      ^~~~~~~~~~~~
   include/linux/filter.h:500:16: note: in expansion of macro 'FIELD_SIZEOF'
      BUILD_BUG_ON(FIELD_SIZEOF(TYPE, MEMBER) != (SIZE));  \
                   ^~~~~~~~~~~~
   net/core/filter.c:8867:10: note: in expansion of macro 'bpf_target_off'
             bpf_target_off(struct sk_reuseport_kern, F, \
             ^~~~~~~~~~~~~~
   net/core/filter.c:8923:3: note: in expansion of macro 'SK_REUSEPORT_LOAD_FIELD'
      SK_REUSEPORT_LOAD_FIELD(hash);
      ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:89:43: error: dereferencing pointer to incomplete type 'struct sk_reuseport_kern'
    #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
                                              ^
   include/linux/filter.h:248:12: note: in definition of macro 'BPF_LDX_MEM'
      .off   = OFF,     \
               ^~~
   net/core/filter.c:8867:10: note: in expansion of macro 'bpf_target_off'
             bpf_target_off(struct sk_reuseport_kern, F, \
             ^~~~~~~~~~~~~~
   net/core/filter.c:8868:11: note: in expansion of macro 'FIELD_SIZEOF'
              FIELD_SIZEOF(struct sk_reuseport_kern, F), \
              ^~~~~~~~~~~~
   net/core/filter.c:8923:3: note: in expansion of macro 'SK_REUSEPORT_LOAD_FIELD'
      SK_REUSEPORT_LOAD_FIELD(hash);
      ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:129:35: error: invalid use of undefined type 'struct sk_reuseport_kern'
    #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
                                      ^
   include/linux/filter.h:248:12: note: in definition of macro 'BPF_LDX_MEM'
      .off   = OFF,     \
               ^~~
   include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
    #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
                                   ^~~~~~~~~~~~~~~~~~~
   include/linux/filter.h:502:3: note: in expansion of macro 'offsetof'
      offsetof(TYPE, MEMBER);      \
      ^~~~~~~~
   net/core/filter.c:8867:10: note: in expansion of macro 'bpf_target_off'
             bpf_target_off(struct sk_reuseport_kern, F, \
             ^~~~~~~~~~~~~~
   net/core/filter.c:8923:3: note: in expansion of macro 'SK_REUSEPORT_LOAD_FIELD'
      SK_REUSEPORT_LOAD_FIELD(hash);
      ^~~~~~~~~~~~~~~~~~~~~~~
   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:
   include/linux/kernel.h:89:43: error: dereferencing pointer to incomplete type 'struct sk_reuseport_kern'
    #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
                                              ^
   include/uapi/linux/bpf_common.h:17:27: note: in definition of macro 'BPF_SIZE'
    #define BPF_SIZE(code)  ((code) & 0x18)
                              ^~~~
   net/core/filter.c:8865:12: note: in expansion of macro 'BPF_LDX_MEM'
     *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct sk_reuseport_kern, F), \
               ^~~~~~~~~~~
   include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
    #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                               ^~~~~~~~~~~~~~
>> include/linux/filter.h:386:2: note: in expansion of macro 'if'
     if (bytes == sizeof(u8))    \
     ^~
   include/linux/filter.h:423:22: note: in expansion of macro 'bytes_to_bpf_size'
      const int __size = bytes_to_bpf_size(FIELD_SIZEOF(type, field)); \
                         ^~~~~~~~~~~~~~~~~
   include/linux/filter.h:423:40: note: in expansion of macro 'FIELD_SIZEOF'
      const int __size = bytes_to_bpf_size(FIELD_SIZEOF(type, field)); \
                                           ^~~~~~~~~~~~
   net/core/filter.c:8865:24: note: in expansion of macro 'BPF_FIELD_SIZEOF'
     *insn++ = BPF_LDX_MEM(BPF_FIELD_SIZEOF(struct sk_reuseport_kern, F), \
                           ^~~~~~~~~~~~~~~~
   net/core/filter.c:8927:3: note: in expansion of macro 'SK_REUSEPORT_LOAD_FIELD'
      SK_REUSEPORT_LOAD_FIELD(bind_inany);
      ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/net/sock.h:59:0,
                    from include/linux/sock_diag.h:8,
                    from net/core/filter.c:25:
   include/linux/kernel.h:89:43: error: dereferencing pointer to incomplete type 'struct sk_reuseport_kern'
    #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
                                              ^
   include/linux/filter.h:248:12: note: in definition of macro 'BPF_LDX_MEM'
      .off   = OFF,     \
               ^~~
   include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
    #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                               ^~~~~~~~~~~~~~
>> include/linux/compiler.h:330:3: note: in expansion of macro 'if'
      if (!(condition))     \
      ^~
   include/linux/compiler.h:338:2: note: in expansion of macro '__compiletime_assert'
     __compiletime_assert(condition, msg, prefix, suffix)
     ^~~~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert'
     _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
    #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                        ^~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
     BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
     ^~~~~~~~~~~~~~~~
   include/linux/filter.h:500:3: note: in expansion of macro 'BUILD_BUG_ON'
      BUILD_BUG_ON(FIELD_SIZEOF(TYPE, MEMBER) != (SIZE));  \
      ^~~~~~~~~~~~
   include/linux/filter.h:500:16: note: in expansion of macro 'FIELD_SIZEOF'
      BUILD_BUG_ON(FIELD_SIZEOF(TYPE, MEMBER) != (SIZE));  \
                   ^~~~~~~~~~~~
   net/core/filter.c:8867:10: note: in expansion of macro 'bpf_target_off'
             bpf_target_off(struct sk_reuseport_kern, F, \
             ^~~~~~~~~~~~~~
   net/core/filter.c:8927:3: note: in expansion of macro 'SK_REUSEPORT_LOAD_FIELD'
      SK_REUSEPORT_LOAD_FIELD(bind_inany);
      ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:89:43: error: dereferencing pointer to incomplete type 'struct sk_reuseport_kern'
    #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
                                              ^
   include/linux/filter.h:248:12: note: in definition of macro 'BPF_LDX_MEM'
      .off   = OFF,     \
               ^~~
   net/core/filter.c:8867:10: note: in expansion of macro 'bpf_target_off'
             bpf_target_off(struct sk_reuseport_kern, F, \
             ^~~~~~~~~~~~~~
   net/core/filter.c:8868:11: note: in expansion of macro 'FIELD_SIZEOF'
              FIELD_SIZEOF(struct sk_reuseport_kern, F), \
              ^~~~~~~~~~~~
   net/core/filter.c:8927:3: note: in expansion of macro 'SK_REUSEPORT_LOAD_FIELD'
      SK_REUSEPORT_LOAD_FIELD(bind_inany);
      ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:129:35: error: invalid use of undefined type 'struct sk_reuseport_kern'
    #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
                                      ^
   include/linux/filter.h:248:12: note: in definition of macro 'BPF_LDX_MEM'
      .off   = OFF,     \
               ^~~
   include/linux/stddef.h:17:32: note: in expansion of macro '__compiler_offsetof'
    #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER)
                                   ^~~~~~~~~~~~~~~~~~~
   include/linux/filter.h:502:3: note: in expansion of macro 'offsetof'
      offsetof(TYPE, MEMBER);      \
      ^~~~~~~~
   net/core/filter.c:8867:10: note: in expansion of macro 'bpf_target_off'
             bpf_target_off(struct sk_reuseport_kern, F, \
             ^~~~~~~~~~~~~~
   net/core/filter.c:8927:3: note: in expansion of macro 'SK_REUSEPORT_LOAD_FIELD'
      SK_REUSEPORT_LOAD_FIELD(bind_inany);
      ^~~~~~~~~~~~~~~~~~~~~~~
   net/core/filter.c: At top level:
   include/linux/filter.h:469:6: warning: '____sk_select_reuseport' used but never defined
     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:8717: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: warning: '____sk_reuseport_load_bytes' used but never defined
     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:8772:1: note: in expansion of macro 'BPF_CALL_4'
    BPF_CALL_4(sk_reuseport_load_bytes,
    ^~~~~~~~~~
   include/linux/filter.h:469:6: warning: '____sk_reuseport_load_bytes_relative' used but never defined
     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:8789:1: note: in expansion of macro 'BPF_CALL_5'
    BPF_CALL_5(sk_reuseport_load_bytes_relative,
    ^~~~~~~~~~
   net/core/filter.c: In function 'bpf_run_sk_reuseport':
   net/core/filter.c:8715:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
   cc1: some warnings being treated as errors
..

vim +/if +8735 net/core/filter.c

2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8716  
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8717  BPF_CALL_4(sk_select_reuseport, struct sk_reuseport_kern *, reuse_kern,
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8718  	   struct bpf_map *, map, void *, key, u32, flags)
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8719  {
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8720  	struct sock_reuseport *reuse;
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8721  	struct sock *selected_sk;
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8722  
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8723  	selected_sk = map->ops->map_lookup_elem(map, key);
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8724  	if (!selected_sk)
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8725  		return -ENOENT;
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8726  
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8727  	reuse = rcu_dereference(selected_sk->sk_reuseport_cb);
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8728  	if (!reuse)
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8729  		/* selected_sk is unhashed (e.g. by close()) after the
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8730  		 * above map_lookup_elem().  Treat selected_sk has already
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8731  		 * been removed from the map.
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8732  		 */
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8733  		return -ENOENT;
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8734  
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08 @8735  	if (unlikely(reuse->reuseport_id != reuse_kern->reuseport_id)) {
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8736  		struct sock *sk;
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8737  
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8738  		if (unlikely(!reuse_kern->reuseport_id))
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8739  			/* There is a small race between adding the
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8740  			 * sk to the map and setting the
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8741  			 * reuse_kern->reuseport_id.
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8742  			 * Treat it as the sk has not been added to
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8743  			 * the bpf map yet.
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8744  			 */
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8745  			return -ENOENT;
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8746  
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8747  		sk = reuse_kern->sk;
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8748  		if (sk->sk_protocol != selected_sk->sk_protocol)
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8749  			return -EPROTOTYPE;
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8750  		else if (sk->sk_family != selected_sk->sk_family)
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8751  			return -EAFNOSUPPORT;
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8752  
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8753  		/* Catch all. Likely bound to a different sockaddr. */
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8754  		return -EBADFD;
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8755  	}
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8756  
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8757  	reuse_kern->selected_sk = selected_sk;
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8758  
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8759  	return 0;
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8760  }
2dbb9b9e6df67d Martin KaFai Lau 2018-08-08  8761  

:::::: The code at line 8735 was first introduced by commit
:::::: 2dbb9b9e6df67d444fbe425c7f6014858d337adf bpf: Introduce BPF_PROG_TYPE_SK_REUSEPORT

:::::: TO: Martin KaFai Lau <kafai@fb.com>
:::::: CC: Daniel Borkmann <daniel@iogearbox.net>

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 25593 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-11-12  9:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-12  9:36 [ast:bpf_tramp 20/20] net/core/filter.c:8735:2: note: in expansion of macro 'if' kbuild test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.