From: kernel test robot <lkp@intel.com>
To: Andrii Nakryiko <andriin@fb.com>,
bpf@vger.kernel.org, netdev@vger.kernel.org, ast@fb.com,
daniel@iogearbox.net, dsahern@gmail.com
Cc: kbuild-all@lists.01.org, andrii.nakryiko@gmail.com,
kernel-team@fb.com, Andrii Nakryiko <andriin@fb.com>,
Andrey Ignatov <rdna@fb.com>, Takshak Chahande <ctakshak@fb.com>
Subject: Re: [PATCH v2 bpf-next 4/8] bpf, xdp: implement LINK_UPDATE for BPF XDP link
Date: Tue, 14 Jul 2020 13:42:43 +0800 [thread overview]
Message-ID: <202007141318.38Z75aHy%lkp@intel.com> (raw)
In-Reply-To: <20200714040643.1135876-5-andriin@fb.com>
[-- Attachment #1: Type: text/plain, Size: 8591 bytes --]
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: parisc-defconfig (attached as .config)
compiler: hppa-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=parisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.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/parisc/include/asm/atomic.h:10,
from include/linux/atomic.h:7,
from arch/parisc/include/asm/bitops.h:13,
from include/linux/bitops.h:29,
from include/linux/kernel.h:12,
from arch/parisc/include/asm/bug.h:5,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from include/asm-generic/current.h:5,
from ./arch/parisc/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from include/linux/uaccess.h:6,
from net/core/dev.c:71:
net/core/dev.c: In function 'bpf_xdp_link_update':
>> arch/parisc/include/asm/cmpxchg.h:50:27: warning: initialization of 'int' from 'struct bpf_prog *' makes integer from pointer without a cast [-Wint-conversion]
50 | __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 +50 arch/parisc/include/asm/cmpxchg.h
9e5228ce0b9619 Paul Gortmaker 2012-04-01 37
9e5228ce0b9619 Paul Gortmaker 2012-04-01 38 /*
9e5228ce0b9619 Paul Gortmaker 2012-04-01 39 ** REVISIT - Abandoned use of LDCW in xchg() for now:
9e5228ce0b9619 Paul Gortmaker 2012-04-01 40 ** o need to test sizeof(*ptr) to avoid clearing adjacent bytes
9e5228ce0b9619 Paul Gortmaker 2012-04-01 41 ** o and while we are at it, could CONFIG_64BIT code use LDCD too?
9e5228ce0b9619 Paul Gortmaker 2012-04-01 42 **
9e5228ce0b9619 Paul Gortmaker 2012-04-01 43 ** if (__builtin_constant_p(x) && (x == NULL))
9e5228ce0b9619 Paul Gortmaker 2012-04-01 44 ** if (((unsigned long)p & 0xf) == 0)
9e5228ce0b9619 Paul Gortmaker 2012-04-01 45 ** return __ldcw(p);
9e5228ce0b9619 Paul Gortmaker 2012-04-01 46 */
9e5228ce0b9619 Paul Gortmaker 2012-04-01 47 #define xchg(ptr, x) \
75cf9797006a3a Helge Deller 2019-12-20 48 ({ \
75cf9797006a3a Helge Deller 2019-12-20 49 __typeof__(*(ptr)) __ret; \
75cf9797006a3a Helge Deller 2019-12-20 @50 __typeof__(*(ptr)) _x_ = (x); \
75cf9797006a3a Helge Deller 2019-12-20 51 __ret = (__typeof__(*(ptr))) \
75cf9797006a3a Helge Deller 2019-12-20 52 __xchg((unsigned long)_x_, (ptr), sizeof(*(ptr))); \
75cf9797006a3a Helge Deller 2019-12-20 53 __ret; \
75cf9797006a3a Helge Deller 2019-12-20 54 })
9e5228ce0b9619 Paul Gortmaker 2012-04-01 55
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 18584 bytes --]
next prev parent reply other threads:[~2020-07-14 5:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-14 4:06 [PATCH v2 bpf-next 0/8] BPF XDP link Andrii Nakryiko
2020-07-14 4:06 ` [PATCH v2 bpf-next 1/8] bpf, xdp: maintain info on attached XDP BPF programs in net_device Andrii Nakryiko
2020-07-14 4:06 ` [PATCH v2 bpf-next 2/8] bpf, xdp: extract commong XDP program attachment logic Andrii Nakryiko
2020-07-14 4:06 ` [PATCH v2 bpf-next 3/8] bpf, xdp: add bpf_link-based XDP attachment API Andrii Nakryiko
2020-07-14 6:39 ` kernel test robot
2020-07-14 18:39 ` Andrii Nakryiko
2020-07-14 4:06 ` [PATCH v2 bpf-next 4/8] bpf, xdp: implement LINK_UPDATE for BPF XDP link Andrii Nakryiko
2020-07-14 5:42 ` kernel test robot [this message]
2020-07-14 5:48 ` kernel test robot
2020-07-14 4:06 ` [PATCH v2 bpf-next 5/8] bpf: implement BPF XDP link-specific introspection APIs Andrii Nakryiko
2020-07-14 4:06 ` [PATCH v2 bpf-next 6/8] libbpf: add support for BPF XDP link Andrii Nakryiko
2020-07-14 4:06 ` [PATCH v2 bpf-next 7/8] selftests/bpf: add BPF XDP link selftests Andrii Nakryiko
2020-07-14 4:06 ` [PATCH v2 bpf-next 8/8] bpf, xdp: remove XDP_QUERY_PROG and XDP_QUERY_PROG_HW XDP commands Andrii Nakryiko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202007141318.38Z75aHy%lkp@intel.com \
--to=lkp@intel.com \
--cc=andrii.nakryiko@gmail.com \
--cc=andriin@fb.com \
--cc=ast@fb.com \
--cc=bpf@vger.kernel.org \
--cc=ctakshak@fb.com \
--cc=daniel@iogearbox.net \
--cc=dsahern@gmail.com \
--cc=kbuild-all@lists.01.org \
--cc=kernel-team@fb.com \
--cc=netdev@vger.kernel.org \
--cc=rdna@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).