Re: [PATCH] ipvs: add a stateless type of service and a stateless Maglev hashing scheduler

kernel test robot <[email protected]>
Newsgroups org.kernel.vger.lvs-devel,dev.linux.lists.oe-kbuild-all,org.kernel.vger.linux-kernel,org.kernel.vger.netdev,org.kernel.vger.netfilter-devel
Message-ID <[email protected]>
Hi Lev,

kernel test robot noticed the following build warnings:

[auto build test WARNING on horms-ipvs-next/master]
[also build test WARNING on horms-ipvs/master linus/master v6.7-rc4 next-20231206]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Lev-Pantiukhin/ipvs-add-a-stateless-type-of-service-and-a-stateless-Maglev-hashing-scheduler/20231204-232344
base:   https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs-next.git master
patch link:    https://lore.kernel.org/r/20231204152020.472247-1-kndrvt%40yandex-team.ru
patch subject: [PATCH] ipvs: add a stateless type of service and a stateless Maglev hashing scheduler
config: microblaze-randconfig-r123-20231206 (https://download.01.org/0day-ci/archive/20231206/[email protected]/config)
compiler: microblaze-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231206/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

sparse warnings: (new ones prefixed by >>)
>> net/netfilter/ipvs/ip_vs_ctl.c:972:42: sparse: sparse: restricted __be32 degrades to integer
   net/netfilter/ipvs/ip_vs_ctl.c:972:60: sparse: sparse: restricted __be32 degrades to integer
   net/netfilter/ipvs/ip_vs_ctl.c:976:48: sparse: sparse: restricted __be32 degrades to integer
   net/netfilter/ipvs/ip_vs_ctl.c:976:70: sparse: sparse: restricted __be32 degrades to integer
>> net/netfilter/ipvs/ip_vs_ctl.c:976:30: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be32 [usertype] diff @@     got unsigned int @@
   net/netfilter/ipvs/ip_vs_ctl.c:976:30: sparse:     expected restricted __be32 [usertype] diff
   net/netfilter/ipvs/ip_vs_ctl.c:976:30: sparse:     got unsigned int
>> net/netfilter/ipvs/ip_vs_ctl.c:978:41: sparse: sparse: cast from restricted __be32
   net/netfilter/ipvs/ip_vs_ctl.c:1532:27: sparse: sparse: dereference of noderef expression

vim +972 net/netfilter/ipvs/ip_vs_ctl.c

   962	
   963	static int __ip_vs_mh_compare_dests(struct list_head *a, struct list_head *b)
   964	{
   965		struct ip_vs_dest *dest_a = list_entry(a, struct ip_vs_dest, n_list);
   966		struct ip_vs_dest *dest_b = list_entry(b, struct ip_vs_dest, n_list);
   967		unsigned int i = 0;
   968		__be32 diff;
   969	
   970		switch (dest_a->af) {
   971		case AF_INET:
 > 972			return (int)(dest_a->addr.ip - dest_b->addr.ip);
   973	
   974		case AF_INET6:
   975			for (; i < ARRAY_SIZE(dest_a->addr.ip6); i++) {
 > 976				diff = dest_a->addr.ip6[i] - dest_b->addr.ip6[i];
   977				if (diff)
 > 978					return (int)diff;
   979			}
   980		}
   981	
   982		return 0;
   983	}
   984	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.