public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* Re: [RFC PATCH bpf-next 1/3] bpf: Add support for qp-trie map
       [not found] <20220726130005.3102470-2-houtao1@huawei.com>
@ 2022-07-26 20:20 ` kernel test robot
  2022-07-29 10:04 ` kernel test robot
  1 sibling, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-07-26 20:20 UTC (permalink / raw)
  To: Hou Tao; +Cc: llvm, kbuild-all

Hi Hou,

[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on bpf-next/master]

url:    https://github.com/intel-lab-lkp/linux/commits/Hou-Tao/Add-support-for-qp-trie-map/20220726-204347
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: i386-randconfig-a002 (https://download.01.org/0day-ci/archive/20220727/202207270430.yGvLY2tk-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 83882606dbd7ffb0bdd3460356202d97705809c8)
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
        # https://github.com/intel-lab-lkp/linux/commit/74890023aaa2d8ffed54d96d4999f10bf14ccfef
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Hou-Tao/Add-support-for-qp-trie-map/20220726-204347
        git checkout 74890023aaa2d8ffed54d96d4999f10bf14ccfef
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash kernel/bpf/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> kernel/bpf/bpf_qp_trie.c:622:24: warning: bitwise or with non-zero value always evaluates to true [-Wtautological-bitwise-compare]
           if (!(attr->map_flags | BPF_F_NO_PREALLOC) ||
                 ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
   1 warning generated.


vim +622 kernel/bpf/bpf_qp_trie.c

   616	
   617	static int qp_trie_alloc_check(union bpf_attr *attr)
   618	{
   619		if (!bpf_capable())
   620			return -EPERM;
   621	
 > 622		if (!(attr->map_flags | BPF_F_NO_PREALLOC) ||
   623		    attr->map_flags & ~QP_TRIE_CREATE_FLAG_MASK ||
   624		    !bpf_map_flags_access_ok(attr->map_flags))
   625			return -EINVAL;
   626	
   627		if (!attr->max_entries || attr->key_size < QP_TRIE_MIN_KEY_SIZE ||
   628		    !attr->value_size)
   629			return -EINVAL;
   630	
   631		if (attr->key_size > QP_TRIE_MAX_KEY_SIZE ||
   632		    !is_valid_k_v_size(attr->key_size, attr->value_size))
   633			return -E2BIG;
   634	
   635		return 0;
   636	}
   637	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [RFC PATCH bpf-next 1/3] bpf: Add support for qp-trie map
       [not found] <20220726130005.3102470-2-houtao1@huawei.com>
  2022-07-26 20:20 ` [RFC PATCH bpf-next 1/3] bpf: Add support for qp-trie map kernel test robot
@ 2022-07-29 10:04 ` kernel test robot
  1 sibling, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-07-29 10:04 UTC (permalink / raw)
  To: Hou Tao; +Cc: llvm, kbuild-all

Hi Hou,

[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on bpf-next/master]

url:    https://github.com/intel-lab-lkp/linux/commits/Hou-Tao/Add-support-for-qp-trie-map/20220726-204347
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: hexagon-randconfig-r041-20220724 (https://download.01.org/0day-ci/archive/20220729/202207291741.AfRRtqqg-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 83882606dbd7ffb0bdd3460356202d97705809c8)
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
        # https://github.com/intel-lab-lkp/linux/commit/74890023aaa2d8ffed54d96d4999f10bf14ccfef
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Hou-Tao/Add-support-for-qp-trie-map/20220726-204347
        git checkout 74890023aaa2d8ffed54d96d4999f10bf14ccfef
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash kernel/bpf/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> kernel/bpf/bpf_qp_trie.c:622:24: warning: bitwise or with non-zero value always evaluates to true [-Wtautological-bitwise-compare]
           if (!(attr->map_flags | BPF_F_NO_PREALLOC) ||
                 ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
>> kernel/bpf/bpf_qp_trie.c:648:18: warning: division by zero is undefined [-Wdivision-by-zero]
           for (i = 0; i < ARRAY_SIZE(trie->locks); i++)
                           ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:55:38: note: expanded from macro 'ARRAY_SIZE'
   #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
                                        ^ ~~~~~~~~~~~~~~~~
   2 warnings generated.


vim +622 kernel/bpf/bpf_qp_trie.c

   616	
   617	static int qp_trie_alloc_check(union bpf_attr *attr)
   618	{
   619		if (!bpf_capable())
   620			return -EPERM;
   621	
 > 622		if (!(attr->map_flags | BPF_F_NO_PREALLOC) ||
   623		    attr->map_flags & ~QP_TRIE_CREATE_FLAG_MASK ||
   624		    !bpf_map_flags_access_ok(attr->map_flags))
   625			return -EINVAL;
   626	
   627		if (!attr->max_entries || attr->key_size < QP_TRIE_MIN_KEY_SIZE ||
   628		    !attr->value_size)
   629			return -EINVAL;
   630	
   631		if (attr->key_size > QP_TRIE_MAX_KEY_SIZE ||
   632		    !is_valid_k_v_size(attr->key_size, attr->value_size))
   633			return -E2BIG;
   634	
   635		return 0;
   636	}
   637	
   638	static struct bpf_map *qp_trie_alloc(union bpf_attr *attr)
   639	{
   640		struct qp_trie *trie;
   641		unsigned int i;
   642	
   643		trie = bpf_map_area_alloc(sizeof(*trie), bpf_map_attr_numa_node(attr));
   644		if (!trie)
   645			return ERR_PTR(-ENOMEM);
   646	
   647		/* roots are zeroed by bpf_map_area_alloc() */
 > 648		for (i = 0; i < ARRAY_SIZE(trie->locks); i++)
   649			spin_lock_init(&trie->locks[i]);
   650	
   651		atomic_set(&trie->entries, 0);
   652		bpf_map_init_from_attr(&trie->map, attr);
   653	
   654		return &trie->map;
   655	}
   656	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-07-29 10:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20220726130005.3102470-2-houtao1@huawei.com>
2022-07-26 20:20 ` [RFC PATCH bpf-next 1/3] bpf: Add support for qp-trie map kernel test robot
2022-07-29 10:04 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox