On Mon, Jul 13, 2020 at 11:40 PM kernel test robot <lkp@xxxxxxxxx> wrote: > > Hi Andrii, > > I love your patch! Yet something to improve: > > [auto build test ERROR 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: x86_64-defconfig (attached as .config) > compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 02946de3802d3bc65bc9f2eb9b8d4969b5a7add8) > 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 > # install x86_64 cross compiling tool for clang build > # apt-get install binutils-x86-64-linux-gnu > # save the attached .config to linux build tree > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 > > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot <lkp@xxxxxxxxx> > > All errors (new ones prefixed by >>): > > >> net/core/dev.c:8717:18: error: field has incomplete type 'struct bpf_link' > struct bpf_link link; > ^ This is all due to bpf_link-related API is conditionally defined only #ifdef CONFIG_BPF_SYSCALL. I'm doing the same as is done for bpf_prog: moving it outside of CONFIG_BPF_SYSCALL-only region and adding stubs for generic API (init/settle/cleanup, inc/put, etc). Will add this as a separate pre-patch in the v3. > include/net/netns/bpf.h:15:9: note: forward declaration of 'struct bpf_link' > struct bpf_link *links[MAX_NETNS_BPF_ATTACH_TYPE]; > ^ [...]