Re: [PATCHv5 bpf-next 1/3] xdp: add a new helper for dev map multicast support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Hangbin,

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/Hangbin-Liu/xdp-add-a-new-helper-for-dev-map-multicast-support/20200701-122334
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: arm-randconfig-r013-20200701 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project c8f1d442d0858f66fd4128fde6f67eb5202fa2b1)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

>> kernel/bpf/devmap.c:571:25: warning: no previous prototype for function 'devmap_get_next_obj' [-Wmissing-prototypes]
   struct bpf_dtab_netdev *devmap_get_next_obj(struct xdp_buff *xdp, struct bpf_map *map,
                           ^
   kernel/bpf/devmap.c:571:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   struct bpf_dtab_netdev *devmap_get_next_obj(struct xdp_buff *xdp, struct bpf_map *map,
   ^
   static 
   1 warning generated.

vim +/devmap_get_next_obj +571 kernel/bpf/devmap.c

   570	
 > 571	struct bpf_dtab_netdev *devmap_get_next_obj(struct xdp_buff *xdp, struct bpf_map *map,
   572						    struct bpf_map *ex_map, u32 *key,
   573						    u32 *next_key, int ex_ifindex)
   574	{
   575		struct bpf_dtab_netdev *obj;
   576		struct net_device *dev;
   577		u32 *tmp_key = key;
   578		int err;
   579	
   580		err = devmap_get_next_key(map, tmp_key, next_key);
   581		if (err)
   582			return NULL;
   583	
   584		for (;;) {
   585			switch (map->map_type) {
   586			case BPF_MAP_TYPE_DEVMAP:
   587				obj = __dev_map_lookup_elem(map, *next_key);
   588				break;
   589			case BPF_MAP_TYPE_DEVMAP_HASH:
   590				obj = __dev_map_hash_lookup_elem(map, *next_key);
   591				break;
   592			default:
   593				break;
   594			}
   595	
   596			if (!obj || dev_in_exclude_map(obj, ex_map, ex_ifindex))
   597				goto find_next;
   598	
   599			dev = obj->dev;
   600	
   601			if (!dev->netdev_ops->ndo_xdp_xmit)
   602				goto find_next;
   603	
   604			err = xdp_ok_fwd_dev(dev, xdp->data_end - xdp->data);
   605			if (unlikely(err))
   606				goto find_next;
   607	
   608			return obj;
   609	
   610	find_next:
   611			tmp_key = next_key;
   612			err = devmap_get_next_key(map, tmp_key, next_key);
   613			if (err)
   614				break;
   615		}
   616	
   617		return NULL;
   618	}
   619	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux