From: kbuild test robot <lkp@intel.com>
To: "Toke Høiland-Jørgensen" <toke@redhat.com>
Cc: kbuild-all@01.org, David Miller <davem@davemloft.net>,
netdev@vger.kernel.org,
Jesper Dangaard Brouer <brouer@redhat.com>,
Daniel Borkmann <daniel@iogearbox.net>,
Alexei Starovoitov <ast@kernel.org>
Subject: Re: [PATCH net-next 2/2] xdp: Add devmap_idx map type for looking up devices by ifindex
Date: Sun, 24 Feb 2019 07:19:50 +0800 [thread overview]
Message-ID: <201902240743.NmDLcizj%fengguang.wu@intel.com> (raw)
In-Reply-To: <155075021407.13610.6656977312753058829.stgit@alrua-x1>
[-- Attachment #1: Type: text/plain, Size: 2605 bytes --]
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
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 27631 bytes --]
next prev parent reply other threads:[~2019-02-23 23:29 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-21 11:56 [PATCH net-next 1/2] xdp: Always use a devmap for XDP_REDIRECT to a device Toke Høiland-Jørgensen
2019-02-21 11:56 ` [PATCH net-next 2/2] xdp: Add devmap_idx map type for looking up devices by ifindex Toke Høiland-Jørgensen
2019-02-21 15:23 ` Jesper Dangaard Brouer
2019-02-21 15:50 ` Toke Høiland-Jørgensen
2019-02-21 21:49 ` Jakub Kicinski
2019-02-21 23:02 ` Toke Høiland-Jørgensen
2019-02-22 0:32 ` Jakub Kicinski
2019-02-22 9:47 ` Toke Høiland-Jørgensen
2019-02-22 21:30 ` Jakub Kicinski
2019-02-23 11:52 ` Toke Høiland-Jørgensen
2019-02-23 23:19 ` kbuild test robot [this message]
2019-02-23 23:28 ` kbuild test robot
2019-02-21 15:19 ` [PATCH net-next 1/2] xdp: Always use a devmap for XDP_REDIRECT to a device Jesper Dangaard Brouer
2019-02-21 15:52 ` Toke Høiland-Jørgensen
2019-02-22 0:36 ` Jakub Kicinski
2019-02-22 10:13 ` Toke Høiland-Jørgensen
2019-02-22 21:37 ` Jakub Kicinski
2019-02-23 10:43 ` Jesper Dangaard Brouer
2019-02-23 12:11 ` Toke Høiland-Jørgensen
2019-02-25 18:47 ` Jakub Kicinski
2019-02-26 11:00 ` Toke Høiland-Jørgensen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201902240743.NmDLcizj%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=ast@kernel.org \
--cc=brouer@redhat.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=kbuild-all@01.org \
--cc=netdev@vger.kernel.org \
--cc=toke@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).