Hi Hangbin,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on bpf-next/master]
[also build test WARNING on bpf/master net/master net-next/master linus/master v5.7-rc1
next-20200415]
[cannot apply to ipvs/master]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see
https://stackoverflow.com/a/37406982]
url:
https://github.com/0day-ci/linux/commits/Hangbin-Liu/xdp-add-dev-map-mult...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: um-x86_64_defconfig (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
# save the attached .config to linux build tree
make ARCH=um SUBARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/bpf-cgroup.h:5:0,
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/bpf.h: In function 'array_of_map_lookup_elem':
include/linux/bpf.h:1288:1: warning: no return statement in function returning non-void
[-Wreturn-type]
}
^
include/linux/bpf.h: In function 'htab_of_map_lookup_elem':
include/linux/bpf.h:1293:1: warning: no return statement in function returning non-void
[-Wreturn-type]
}
^
net/core/filter.c: In function '__xdp_map_lookup_elem':
> net/core/filter.c:3517:40: warning: passing argument 2 of
'array_of_map_lookup_elem' makes pointer from integer without a cast
[-Wint-conversion]
return array_of_map_lookup_elem(map, (index >> 16)
<< 16);
^
In file included from include/linux/bpf-cgroup.h:5:0,
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/bpf.h:1285:14: note: expected 'void *' but argument is of type
'u32 {aka unsigned int}'
static void *array_of_map_lookup_elem(struct bpf_map *map, void *key)
^~~~~~~~~~~~~~~~~~~~~~~~
> net/core/filter.c:3519:39: warning: passing argument 2 of
'htab_of_map_lookup_elem' makes pointer from integer without a cast
[-Wint-conversion]
return htab_of_map_lookup_elem(map, (index >> 16)
<< 16);
^
In file included from include/linux/bpf-cgroup.h:5:0,
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/bpf.h:1290:14: note: expected 'void *' but argument is of type
'u32 {aka unsigned int}'
static void *htab_of_map_lookup_elem(struct bpf_map *map, void *key)
^~~~~~~~~~~~~~~~~~~~~~~
vim +/array_of_map_lookup_elem +3517 net/core/filter.c
3504
3505 static inline void *__xdp_map_lookup_elem(struct bpf_map *map, u32 index)
3506 {
3507 switch (map->map_type) {
3508 case BPF_MAP_TYPE_DEVMAP:
3509 return __dev_map_lookup_elem(map, index);
3510 case BPF_MAP_TYPE_DEVMAP_HASH:
3511 return __dev_map_hash_lookup_elem(map, index);
3512 case BPF_MAP_TYPE_CPUMAP:
3513 return __cpu_map_lookup_elem(map, index);
3514 case BPF_MAP_TYPE_XSKMAP:
3515 return __xsk_map_lookup_elem(map, index);
3516 case BPF_MAP_TYPE_ARRAY_OF_MAPS:
3517 return array_of_map_lookup_elem(map, (index >> 16)
<< 16);
3518 case BPF_MAP_TYPE_HASH_OF_MAPS:
3519 return htab_of_map_lookup_elem(map, (index >> 16)
<< 16);
3520 default:
3521 return NULL;
3522 }
3523 }
3524
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org