tree:
https://github.com/dsahern/linux xdp/devmap-prog
head: b29da7596f8eaf356dea9b80b5271d50a2492cb7
commit: b3250f63529680518242eeaf9b12f3f97d134cdc [2/4] bpf: Add support to attach bpf
program to a devmap
config: powerpc-ps3_defconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
reproduce:
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout b3250f63529680518242eeaf9b12f3f97d134cdc
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
net/core/dev.c: In function 'generic_xdp_install':
> net/core/dev.c:5420:8: error: implicit declaration of function
'dev_map_can_have_prog' [-Werror=implicit-function-declaration]
5420 | if
(dev_map_can_have_prog(new->aux->used_maps[i]))
| ^~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/dev_map_can_have_prog +5420 net/core/dev.c
5406
5407 static int generic_xdp_install(struct net_device *dev, struct netdev_bpf *xdp)
5408 {
5409 struct bpf_prog *old = rtnl_dereference(dev->xdp_prog);
5410 struct bpf_prog *new = xdp->prog;
5411 int ret = 0;
5412
5413 if (new) {
5414 u32 i;
5415
5416 /* generic XDP does not work with DEVMAPs that can
5417 * have a bpf_prog installed
5418 */
5419 for (i = 0; i < new->aux->used_map_cnt; i++) {
5420 if (dev_map_can_have_prog(new->aux->used_maps[i]))
5421 return -EINVAL;
5422 }
5423 }
5424
5425 switch (xdp->command) {
5426 case XDP_SETUP_PROG:
5427 rcu_assign_pointer(dev->xdp_prog, new);
5428 if (old)
5429 bpf_prog_put(old);
5430
5431 if (old && !new) {
5432 static_branch_dec(&generic_xdp_needed_key);
5433 } else if (new && !old) {
5434 static_branch_inc(&generic_xdp_needed_key);
5435 dev_disable_lro(dev);
5436 dev_disable_gro_hw(dev);
5437 }
5438 break;
5439
5440 case XDP_QUERY_PROG:
5441 xdp->prog_id = old ? old->aux->id : 0;
5442 break;
5443
5444 default:
5445 ret = -EINVAL;
5446 break;
5447 }
5448
5449 return ret;
5450 }
5451
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org