On Wed, Feb 22, 2023 at 7:01 PM kernel test robot <lkp@xxxxxxxxx> wrote: > > Hi Yafang, > > Thank you for the patch! Yet something to improve: > > [auto build test ERROR on bpf-next/master] > > url: https://github.com/intel-lab-lkp/linux/commits/Yafang-Shao/bpf-add-new-map-ops-map_mem_usage/20230222-094856 > base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master > patch link: https://lore.kernel.org/r/20230222014553.47744-18-laoar.shao%40gmail.com > patch subject: [PATCH bpf-next v2 17/18] bpf: offload map memory usage > config: um-x86_64_defconfig (https://download.01.org/0day-ci/archive/20230222/202302221852.mOd5T9T6-lkp@xxxxxxxxx/config) > compiler: gcc-11 (Debian 11.3.0-8) 11.3.0 > reproduce (this is a W=1 build): > # https://github.com/intel-lab-lkp/linux/commit/e5742e839659b59ea26bc7a5804d04e577604aab > git remote add linux-review https://github.com/intel-lab-lkp/linux > git fetch --no-tags linux-review Yafang-Shao/bpf-add-new-map-ops-map_mem_usage/20230222-094856 > git checkout e5742e839659b59ea26bc7a5804d04e577604aab > # save the config file > mkdir build_dir && cp config build_dir/.config > make W=1 O=build_dir ARCH=um SUBARCH=x86_64 olddefconfig > make W=1 O=build_dir ARCH=um SUBARCH=x86_64 SHELL=/bin/bash > > If you fix the issue, kindly add following tag where applicable > | Reported-by: kernel test robot <lkp@xxxxxxxxx> > | Link: https://lore.kernel.org/oe-kbuild-all/202302221852.mOd5T9T6-lkp@xxxxxxxxx/ > > All errors (new ones prefixed by >>): > > In file included from kernel/fork.c:98: > >> include/linux/bpf.h:2644:1: error: expected identifier or '(' before '{' token > 2644 | { > | ^ > kernel/fork.c:162:13: warning: no previous prototype for 'arch_release_task_struct' [-Wmissing-prototypes] > 162 | void __weak arch_release_task_struct(struct task_struct *tsk) > | ^~~~~~~~~~~~~~~~~~~~~~~~ > kernel/fork.c:862:20: warning: no previous prototype for 'arch_task_cache_init' [-Wmissing-prototypes] > 862 | void __init __weak arch_task_cache_init(void) { } > | ^~~~~~~~~~~~~~~~~~~~ > kernel/fork.c:957:12: warning: no previous prototype for 'arch_dup_task_struct' [-Wmissing-prototypes] > 957 | int __weak arch_dup_task_struct(struct task_struct *dst, > | ^~~~~~~~~~~~~~~~~~~~ > In file included from kernel/fork.c:98: > include/linux/bpf.h:2643:19: warning: 'bpf_map_offload_map_mem_usage' declared 'static' but never defined [-Wunused-function] > 2643 | static inline u64 bpf_map_offload_map_mem_usage(const struct bpf_map *map); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > -- > In file included from include/linux/filter.h:9, > from kernel/sysctl.c:35: > >> include/linux/bpf.h:2644:1: error: expected identifier or '(' before '{' token > 2644 | { > | ^ > In file included from include/linux/filter.h:9, > from kernel/sysctl.c:35: > include/linux/bpf.h:2643:19: warning: 'bpf_map_offload_map_mem_usage' declared 'static' but never defined [-Wunused-function] > 2643 | static inline u64 bpf_map_offload_map_mem_usage(const struct bpf_map *map); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > -- > In file included from include/linux/filter.h:9, > from kernel/kallsyms.c:25: > >> include/linux/bpf.h:2644:1: error: expected identifier or '(' before '{' token > 2644 | { > | ^ > kernel/kallsyms.c:663:12: warning: no previous prototype for 'arch_get_kallsym' [-Wmissing-prototypes] > 663 | int __weak arch_get_kallsym(unsigned int symnum, unsigned long *value, > | ^~~~~~~~~~~~~~~~ > In file included from include/linux/filter.h:9, > from kernel/kallsyms.c:25: > include/linux/bpf.h:2643:19: warning: 'bpf_map_offload_map_mem_usage' declared 'static' but never defined [-Wunused-function] > 2643 | static inline u64 bpf_map_offload_map_mem_usage(const struct bpf_map *map); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > -- > In file included from include/linux/bpf-cgroup.h:5, > from net/socket.c:55: > >> include/linux/bpf.h:2644:1: error: expected identifier or '(' before '{' token > 2644 | { > | ^ > net/socket.c: In function '__sys_getsockopt': > net/socket.c:2300:13: warning: variable 'max_optlen' set but not used [-Wunused-but-set-variable] > 2300 | int max_optlen; > | ^~~~~~~~~~ > In file included from include/linux/bpf-cgroup.h:5, > from net/socket.c:55: > net/socket.c: At top level: > include/linux/bpf.h:2643:19: warning: 'bpf_map_offload_map_mem_usage' declared 'static' but never defined [-Wunused-function] > 2643 | static inline u64 bpf_map_offload_map_mem_usage(const struct bpf_map *map); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > -- > In file included from include/linux/filter.h:9, > from kernel/bpf/core.c:21: > >> include/linux/bpf.h:2644:1: error: expected identifier or '(' before '{' token > 2644 | { > | ^ > kernel/bpf/core.c:1631:12: warning: no previous prototype for 'bpf_probe_read_kernel' [-Wmissing-prototypes] > 1631 | u64 __weak bpf_probe_read_kernel(void *dst, u32 size, const void *unsafe_ptr) > | ^~~~~~~~~~~~~~~~~~~~~ > kernel/bpf/core.c:2070:6: warning: no previous prototype for 'bpf_patch_call_args' [-Wmissing-prototypes] > 2070 | void bpf_patch_call_args(struct bpf_insn *insn, u32 stack_depth) > | ^~~~~~~~~~~~~~~~~~~ > In file included from include/linux/filter.h:9, > from kernel/bpf/core.c:21: > include/linux/bpf.h:2643:19: warning: 'bpf_map_offload_map_mem_usage' declared 'static' but never defined [-Wunused-function] > 2643 | static inline u64 bpf_map_offload_map_mem_usage(const struct bpf_map *map); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > -- > In file included from include/linux/filter.h:9, > from include/net/sock_reuseport.h:5, > from include/net/tcp.h:35, > from net/ipv4/route.c:95: > >> include/linux/bpf.h:2644:1: error: expected identifier or '(' before '{' token > 2644 | { > | ^ > net/ipv4/route.c: In function 'ip_rt_send_redirect': > net/ipv4/route.c:880:13: warning: variable 'log_martians' set but not used [-Wunused-but-set-variable] > 880 | int log_martians; > | ^~~~~~~~~~~~ > In file included from include/linux/filter.h:9, > from include/net/sock_reuseport.h:5, > from include/net/tcp.h:35, > from net/ipv4/route.c:95: > net/ipv4/route.c: At top level: > include/linux/bpf.h:2643:19: warning: 'bpf_map_offload_map_mem_usage' declared 'static' but never defined [-Wunused-function] > 2643 | static inline u64 bpf_map_offload_map_mem_usage(const struct bpf_map *map); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > vim +2644 include/linux/bpf.h > > 2642 > 2643 static inline u64 bpf_map_offload_map_mem_usage(const struct bpf_map *map); Thanks for the report. I forgot to build it with COFNIG_BPF=n. > > 2644 { > 2645 return 0; > 2646 } > 2647 > > -- > 0-DAY CI Kernel Test Service > https://github.com/intel/lkp-tests -- Regards Yafang