[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202007141322.lc2XiNkI%lkp@intel.com>
Date: Tue, 14 Jul 2020 13:48:19 +0800
From: kernel test robot <lkp@...el.com>
To: Andrii Nakryiko <andriin@...com>, bpf@...r.kernel.org,
netdev@...r.kernel.org, ast@...com, daniel@...earbox.net,
dsahern@...il.com
Cc: kbuild-all@...ts.01.org, andrii.nakryiko@...il.com,
kernel-team@...com, Andrii Nakryiko <andriin@...com>,
Andrey Ignatov <rdna@...com>,
Takshak Chahande <ctakshak@...com>
Subject: Re: [PATCH v2 bpf-next 4/8] bpf, xdp: implement LINK_UPDATE for BPF
XDP link
Hi Andrii,
I love your patch! Perhaps something to improve:
[auto build test WARNING on bpf-next/master]
url: https://github.com/0day-ci/linux/commits/Andrii-Nakryiko/BPF-XDP-link/20200714-120909
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: alpha-defconfig (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=alpha
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
net/core/dev.c:8717:18: error: field 'link' has incomplete type
8717 | struct bpf_link link;
| ^~~~
In file included from include/linux/instrumented.h:10,
from include/linux/uaccess.h:5,
from net/core/dev.c:71:
net/core/dev.c: In function 'bpf_xdp_link_release':
include/linux/kernel.h:1003:32: error: dereferencing pointer to incomplete type 'struct bpf_link'
1003 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~
include/linux/compiler.h:372:9: note: in definition of macro '__compiletime_assert'
372 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler.h:392:2: note: in expansion of macro '_compiletime_assert'
392 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:1003:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
1003 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~~~~~~
include/linux/kernel.h:1003:20: note: in expansion of macro '__same_type'
1003 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~
net/core/dev.c:8972:34: note: in expansion of macro 'container_of'
8972 | struct bpf_xdp_link *xdp_link = container_of(link, struct bpf_xdp_link, link);
| ^~~~~~~~~~~~
In file included from arch/alpha/include/asm/atomic.h:7,
from include/linux/atomic.h:7,
from include/linux/rcupdate.h:25,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/uaccess.h:6,
from net/core/dev.c:71:
net/core/dev.c: In function 'bpf_xdp_link_update':
>> arch/alpha/include/asm/cmpxchg.h:48:27: warning: initialization of 'int' from 'struct bpf_prog *' makes integer from pointer without a cast [-Wint-conversion]
48 | __typeof__(*(ptr)) _x_ = (x); \
| ^
net/core/dev.c:9026:13: note: in expansion of macro 'xchg'
9026 | old_prog = xchg(&link->prog, new_prog);
| ^~~~
net/core/dev.c:9026:11: warning: assignment to 'struct bpf_prog *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
9026 | old_prog = xchg(&link->prog, new_prog);
| ^
net/core/dev.c: At top level:
net/core/dev.c:9034:21: error: variable 'bpf_xdp_link_lops' has initializer but incomplete type
9034 | static const struct bpf_link_ops bpf_xdp_link_lops = {
| ^~~~~~~~~~~~
net/core/dev.c:9035:3: error: 'const struct bpf_link_ops' has no member named 'release'
9035 | .release = bpf_xdp_link_release,
| ^~~~~~~
net/core/dev.c:9035:13: warning: excess elements in struct initializer
9035 | .release = bpf_xdp_link_release,
| ^~~~~~~~~~~~~~~~~~~~
net/core/dev.c:9035:13: note: (near initialization for 'bpf_xdp_link_lops')
net/core/dev.c:9036:3: error: 'const struct bpf_link_ops' has no member named 'dealloc'
9036 | .dealloc = bpf_xdp_link_dealloc,
| ^~~~~~~
net/core/dev.c:9036:13: warning: excess elements in struct initializer
9036 | .dealloc = bpf_xdp_link_dealloc,
| ^~~~~~~~~~~~~~~~~~~~
net/core/dev.c:9036:13: note: (near initialization for 'bpf_xdp_link_lops')
net/core/dev.c:9037:3: error: 'const struct bpf_link_ops' has no member named 'update_prog'
9037 | .update_prog = bpf_xdp_link_update,
| ^~~~~~~~~~~
net/core/dev.c:9037:17: warning: excess elements in struct initializer
9037 | .update_prog = bpf_xdp_link_update,
| ^~~~~~~~~~~~~~~~~~~
net/core/dev.c:9037:17: note: (near initialization for 'bpf_xdp_link_lops')
net/core/dev.c: In function 'bpf_xdp_link_attach':
net/core/dev.c:9043:25: error: storage size of 'link_primer' isn't known
9043 | struct bpf_link_primer link_primer;
| ^~~~~~~~~~~
net/core/dev.c:9058:2: error: implicit declaration of function 'bpf_link_init'; did you mean 'bio_list_init'? [-Werror=implicit-function-declaration]
9058 | bpf_link_init(&link->link, BPF_LINK_TYPE_XDP, &bpf_xdp_link_lops, prog);
| ^~~~~~~~~~~~~
| bio_list_init
net/core/dev.c:9062:8: error: implicit declaration of function 'bpf_link_prime' [-Werror=implicit-function-declaration]
9062 | err = bpf_link_prime(&link->link, &link_primer);
| ^~~~~~~~~~~~~~
net/core/dev.c:9073:3: error: implicit declaration of function 'bpf_link_cleanup' [-Werror=implicit-function-declaration]
9073 | bpf_link_cleanup(&link_primer);
| ^~~~~~~~~~~~~~~~
net/core/dev.c:9077:7: error: implicit declaration of function 'bpf_link_settle' [-Werror=implicit-function-declaration]
9077 | fd = bpf_link_settle(&link_primer);
| ^~~~~~~~~~~~~~~
net/core/dev.c:9043:25: warning: unused variable 'link_primer' [-Wunused-variable]
9043 | struct bpf_link_primer link_primer;
| ^~~~~~~~~~~
net/core/dev.c: At top level:
net/core/dev.c:9034:34: error: storage size of 'bpf_xdp_link_lops' isn't known
9034 | static const struct bpf_link_ops bpf_xdp_link_lops = {
| ^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +48 arch/alpha/include/asm/cmpxchg.h
5ba840f9da1ff9 Paul Gortmaker 2012-04-02 40
fbfcd019917098 Andrea Parri 2018-02-27 41 /*
fbfcd019917098 Andrea Parri 2018-02-27 42 * The leading and the trailing memory barriers guarantee that these
fbfcd019917098 Andrea Parri 2018-02-27 43 * operations are fully ordered.
fbfcd019917098 Andrea Parri 2018-02-27 44 */
5ba840f9da1ff9 Paul Gortmaker 2012-04-02 45 #define xchg(ptr, x) \
5ba840f9da1ff9 Paul Gortmaker 2012-04-02 46 ({ \
fbfcd019917098 Andrea Parri 2018-02-27 47 __typeof__(*(ptr)) __ret; \
5ba840f9da1ff9 Paul Gortmaker 2012-04-02 @48 __typeof__(*(ptr)) _x_ = (x); \
fbfcd019917098 Andrea Parri 2018-02-27 49 smp_mb(); \
fbfcd019917098 Andrea Parri 2018-02-27 50 __ret = (__typeof__(*(ptr))) \
fbfcd019917098 Andrea Parri 2018-02-27 51 __xchg((ptr), (unsigned long)_x_, sizeof(*(ptr))); \
fbfcd019917098 Andrea Parri 2018-02-27 52 smp_mb(); \
fbfcd019917098 Andrea Parri 2018-02-27 53 __ret; \
5ba840f9da1ff9 Paul Gortmaker 2012-04-02 54 })
5ba840f9da1ff9 Paul Gortmaker 2012-04-02 55
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (13790 bytes)
Powered by blists - more mailing lists