[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201807240837.CNKL3X3f%fengguang.wu@intel.com>
Date: Tue, 24 Jul 2018 08:33:48 +0800
From: kbuild test robot <lkp@...el.com>
To: Toshiaki Makita <toshiaki.makita1@...il.com>
Cc: kbuild-all@...org, netdev@...r.kernel.org,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Toshiaki Makita <makita.toshiaki@....ntt.co.jp>,
Jesper Dangaard Brouer <brouer@...hat.com>
Subject: Re: [PATCH v3 bpf-next 5/8] veth: Add ndo_xdp_xmit
Hi Toshiaki,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on bpf-next/master]
url: https://github.com/0day-ci/linux/commits/Toshiaki-Makita/veth-Driver-XDP/20180724-065517
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: x86_64-randconfig-x010-201829 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All warnings (new ones prefixed by >>):
In file included from include/linux/kernel.h:10:0,
from include/linux/list.h:9,
from include/linux/timer.h:5,
from include/linux/netdevice.h:28,
from drivers//net/veth.c:11:
drivers//net/veth.c: In function 'veth_xdp_xmit':
drivers//net/veth.c:300:16: error: implicit declaration of function 'xdp_ok_fwd_dev' [-Werror=implicit-function-declaration]
if (unlikely(xdp_ok_fwd_dev(rcv, frame->len) ||
^
include/linux/compiler.h:58:30: note: in definition of macro '__trace_if'
if (__builtin_constant_p(!!(cond)) ? !!(cond) : \
^~~~
>> drivers//net/veth.c:300:3: note: in expansion of macro 'if'
if (unlikely(xdp_ok_fwd_dev(rcv, frame->len) ||
^~
include/linux/compiler.h:48:24: note: in expansion of macro '__branch_check__'
# define unlikely(x) (__branch_check__(x, 0, __builtin_constant_p(x)))
^~~~~~~~~~~~~~~~
>> drivers//net/veth.c:300:7: note: in expansion of macro 'unlikely'
if (unlikely(xdp_ok_fwd_dev(rcv, frame->len) ||
^~~~~~~~
cc1: some warnings being treated as errors
vim +/if +300 drivers//net/veth.c
275
276 static int veth_xdp_xmit(struct net_device *dev, int n,
277 struct xdp_frame **frames, u32 flags)
278 {
279 struct veth_priv *rcv_priv, *priv = netdev_priv(dev);
280 struct net_device *rcv;
281 int i, drops = 0;
282
283 if (unlikely(flags & ~XDP_XMIT_FLAGS_MASK))
284 return -EINVAL;
285
286 rcv = rcu_dereference(priv->peer);
287 if (unlikely(!rcv))
288 return -ENXIO;
289
290 rcv_priv = netdev_priv(rcv);
291 /* xdp_ring is initialized on receive side? */
292 if (!rcu_access_pointer(rcv_priv->xdp_prog))
293 return -ENXIO;
294
295 spin_lock(&rcv_priv->xdp_ring.producer_lock);
296 for (i = 0; i < n; i++) {
297 struct xdp_frame *frame = frames[i];
298 void *ptr = veth_xdp_to_ptr(frame);
299
> 300 if (unlikely(xdp_ok_fwd_dev(rcv, frame->len) ||
301 __ptr_ring_produce(&rcv_priv->xdp_ring, ptr))) {
302 xdp_return_frame_rx_napi(frame);
303 drops++;
304 }
305 }
306 spin_unlock(&rcv_priv->xdp_ring.producer_lock);
307
308 if (flags & XDP_XMIT_FLUSH)
309 __veth_xdp_flush(rcv_priv);
310
311 return n - drops;
312 }
313
---
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" (31379 bytes)
Powered by blists - more mailing lists