tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master head: 24251c264798ac5a72667245c2650676d7ac2108 commit: 11393cc9b9be2a1f61559e6fb9c27bc8fa20b1ff [56/77] xdp: Add batching support to redirect map config: m32r-opsput_defconfig (attached as .config) compiler: m32r-linux-gcc (GCC) 6.2.0 reproduce: wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout 11393cc9b9be2a1f61559e6fb9c27bc8fa20b1ff # save the attached .config to linux build tree make.cross ARCH=m32r
All errors (new ones prefixed by >>): net/core/filter.o: In function `xdp_do_flush_map': >> net/core/filter.c:2475: undefined reference to `__dev_map_flush' net/core/filter.c:2475:(.text+0x24f0): relocation truncated to fit: R_M32R_26_PCREL_RELA against undefined symbol `__dev_map_flush' net/core/filter.o: In function `__bpf_tx_xdp': >> net/core/filter.c:2459: undefined reference to `__dev_map_insert_ctx' net/core/filter.c:2459:(.text+0x4528): relocation truncated to fit: R_M32R_26_PCREL_RELA against undefined symbol `__dev_map_insert_ctx' net/core/filter.o: In function `xdp_do_redirect_map': >> net/core/filter.c:2491: undefined reference to `__dev_map_lookup_elem' net/core/filter.c:2491:(.text+0x4c5c): relocation truncated to fit: R_M32R_26_PCREL_RELA against undefined symbol `__dev_map_lookup_elem' net/core/filter.o: In function `xdp_do_flush_map': >> net/core/filter.c:2475: undefined reference to `__dev_map_flush' net/core/filter.c:2475:(.text+0x4c7c): relocation truncated to fit: R_M32R_26_PCREL_RELA against undefined symbol `__dev_map_flush' vim +2475 net/core/filter.c 2441 2442 static int __bpf_tx_xdp(struct net_device *dev, 2443 struct bpf_map *map, 2444 struct xdp_buff *xdp, 2445 u32 index) 2446 { 2447 int err; 2448 2449 if (!dev->netdev_ops->ndo_xdp_xmit) { 2450 bpf_warn_invalid_xdp_redirect(dev->ifindex); 2451 return -EOPNOTSUPP; 2452 } 2453 2454 err = dev->netdev_ops->ndo_xdp_xmit(dev, xdp); 2455 if (err) 2456 return err; 2457 2458 if (map) > 2459 __dev_map_insert_ctx(map, index); 2460 else 2461 dev->netdev_ops->ndo_xdp_flush(dev); 2462 2463 return err; 2464 } 2465 2466 void xdp_do_flush_map(void) 2467 { 2468 struct redirect_info *ri = this_cpu_ptr(&redirect_info); 2469 struct bpf_map *map = ri->map_to_flush; 2470 2471 ri->map = NULL; 2472 ri->map_to_flush = NULL; 2473 2474 if (map) > 2475 __dev_map_flush(map); 2476 } 2477 EXPORT_SYMBOL_GPL(xdp_do_flush_map); 2478 2479 int xdp_do_redirect_map(struct net_device *dev, struct xdp_buff *xdp, 2480 struct bpf_prog *xdp_prog) 2481 { 2482 struct redirect_info *ri = this_cpu_ptr(&redirect_info); 2483 struct bpf_map *map = ri->map; 2484 u32 index = ri->ifindex; 2485 struct net_device *fwd; 2486 int err = -EINVAL; 2487 2488 ri->ifindex = 0; 2489 ri->map = NULL; 2490 > 2491 fwd = __dev_map_lookup_elem(map, index); 2492 if (!fwd) 2493 goto out; 2494 2495 if (ri->map_to_flush && (ri->map_to_flush != map)) 2496 xdp_do_flush_map(); 2497 2498 err = __bpf_tx_xdp(fwd, map, xdp, index); 2499 if (likely(!err)) 2500 ri->map_to_flush = map; 2501 2502 out: 2503 trace_xdp_redirect(dev, fwd, xdp_prog, XDP_REDIRECT); 2504 return err; 2505 } 2506 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
.config.gz
Description: application/gzip