[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201902240743.NmDLcizj%fengguang.wu@intel.com>
Date: Sun, 24 Feb 2019 07:19:50 +0800
From: kbuild test robot <lkp@...el.com>
To: Toke Høiland-Jørgensen <toke@...hat.com>
Cc: kbuild-all@...org, David Miller <davem@...emloft.net>,
netdev@...r.kernel.org, Jesper Dangaard Brouer <brouer@...hat.com>,
Daniel Borkmann <daniel@...earbox.net>,
Alexei Starovoitov <ast@...nel.org>
Subject: Re: [PATCH net-next 2/2] xdp: Add devmap_idx map type for looking up
devices by ifindex
Hi Toke,
I love your patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Toke-H-iland-J-rgensen/xdp-Always-use-a-devmap-for-XDP_REDIRECT-to-a-device/20190224-054907
config: i386-randconfig-a1-201907 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All warnings (new ones prefixed by >>):
net/core/filter.c: In function '__bpf_tx_xdp_map':
>> net/core/filter.c:3355:29: warning: passing argument 2 of '__dev_map_insert_ctx' from incompatible pointer type
__dev_map_insert_ctx(map, dst);
^
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: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:715:20: note: expected 'struct net_device *' but argument is of type 'struct bpf_dtab_netdev *'
static inline void __dev_map_insert_ctx(struct bpf_map *map,
^
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
Download attachment ".config.gz" of type "application/gzip" (27631 bytes)
Powered by blists - more mailing lists