Re: [PATCH v3 bpf-next 5/8] veth: Add ndo_xdp_xmit
From: kbuild test robot <hidden>
Date: 2018-07-24 01:24:29
Hi Toshiaki, Thank you for the patch! Yet something to improve: [auto build test ERROR 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: i386-randconfig-x001-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=i386 All errors (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':
quoted
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:77:42: note: in definition of macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
cc1: some warnings being treated as errors
vim +/xdp_ok_fwd_dev +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 Attachments
- .config.gz [application/gzip] 34669 bytes