Hi Toke, I love your patch! Yet something to improve:
[auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Toke-H-iland-J-rgensen/xdp-Use-a-default-map-for-xdp_redirect-helper/20190301-021039 config: powerpc-acadia_defconfig (attached as .config) compiler: powerpc-linux-gnu-gcc (Debian 8.2.0-11) 8.2.0 reproduce: 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 GCC_VERSION=8.2.0 make.cross ARCH=powerpc All errors (new ones prefixed by >>): In file included from include/linux/bpf-cgroup.h:5, from include/linux/cgroup-defs.h:22, from include/linux/cgroup.h:28, from include/net/netprio_cgroup.h:17, from include/linux/netdevice.h:46, from include/net/sock.h:51, from include/linux/sock_diag.h:8, from net//core/filter.c:29: include/linux/bpf.h: In function 'dev_map_inc_redirect_count': include/linux/bpf.h:731:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^ include/linux/bpf.h: At top level: include/linux/bpf.h:738:13: warning: 'struct bpf_dtab_netdev' declared inside parameter list will not be visible outside of this definition or declaration struct bpf_dtab_netdev *dst) ^~~~~~~~~~~~~~~ net//core/filter.c: In function '__bpf_tx_xdp_map': >> net//core/filter.c:3355:29: error: passing argument 2 of >> '__dev_map_insert_ctx' from incompatible pointer type >> [-Werror=incompatible-pointer-types] __dev_map_insert_ctx(map, dst); ^~~ In file included from include/linux/bpf-cgroup.h:5, from include/linux/cgroup-defs.h:22, from include/linux/cgroup.h:28, from include/net/netprio_cgroup.h:17, from include/linux/netdevice.h:46, from include/net/sock.h:51, from include/linux/sock_diag.h:8, from net//core/filter.c:29: include/linux/bpf.h:738:30: note: expected 'struct bpf_dtab_netdev *' but argument is of type 'struct bpf_dtab_netdev *' struct bpf_dtab_netdev *dst) ~~~~~~~~~~~~~~~~~~~~~~~~^~~ cc1: some warnings being treated as errors vim +/__dev_map_insert_ctx +3355 net//core/filter.c 3339 3340 static int __bpf_tx_xdp_map(struct net_device *dev_rx, void *fwd, 3341 struct bpf_map *map, 3342 struct xdp_buff *xdp, 3343 u32 index) 3344 { 3345 int err; 3346 3347 switch (map->map_type) { 3348 case BPF_MAP_TYPE_DEVMAP: 3349 case BPF_MAP_TYPE_DEVMAP_IDX: { 3350 struct bpf_dtab_netdev *dst = fwd; 3351 3352 err = dev_map_enqueue(dst, xdp, dev_rx); 3353 if (unlikely(err)) 3354 return err; > 3355 __dev_map_insert_ctx(map, dst); 3356 break; 3357 } 3358 case BPF_MAP_TYPE_CPUMAP: { 3359 struct bpf_cpu_map_entry *rcpu = fwd; 3360 3361 err = cpu_map_enqueue(rcpu, xdp, dev_rx); 3362 if (unlikely(err)) 3363 return err; 3364 __cpu_map_insert_ctx(map, index); 3365 break; 3366 } 3367 case BPF_MAP_TYPE_XSKMAP: { 3368 struct xdp_sock *xs = fwd; 3369 3370 err = __xsk_map_redirect(map, xdp, xs); 3371 return err; 3372 } 3373 default: 3374 break; 3375 } 3376 return 0; 3377 } 3378 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
.config.gz
Description: application/gzip