Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Gerd Rausch <gerd.rausch@oracle.com>,
	Jason Gunthorpe <jgg@ziepe.ca>, Leon Romanovsky <leon@kernel.org>
Cc: kbuild-all@lists.01.org, linux-rdma@vger.kernel.org
Subject: Re: [PATCH 1/1] RDMA/addr: Refresh neighbour entries upon "rdma_resolve_addr"
Date: Tue, 7 Jun 2022 16:21:50 +0800	[thread overview]
Message-ID: <202206071656.1c2rEvO3-lkp@intel.com> (raw)
In-Reply-To: <eb4e348ec730900a47caeeb08fe4aff903337675.camel@oracle.com>

Hi Gerd,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on rdma/for-next]
[also build test WARNING on linus/master v5.19-rc1 next-20220607]
[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]

url:    https://github.com/intel-lab-lkp/linux/commits/Gerd-Rausch/RDMA-addr-Refresh-neighbour-entries-upon-rdma_resolve_addr/20220607-033902
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git for-next
config: x86_64-randconfig-s021 (https://download.01.org/0day-ci/archive/20220607/202206071656.1c2rEvO3-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-1) 11.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.4-18-g56afb504-dirty
        # https://github.com/intel-lab-lkp/linux/commit/b804d2f0ef3768bdf684b2769f8d9fd1306476e7
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Gerd-Rausch/RDMA-addr-Refresh-neighbour-entries-upon-rdma_resolve_addr/20220607-033902
        git checkout b804d2f0ef3768bdf684b2769f8d9fd1306476e7
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/infiniband/core/

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


sparse warnings: (new ones prefixed by >>)
>> drivers/infiniband/core/addr.c:425:56: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected unsigned int [usertype] key @@     got restricted __be32 [usertype] dst_ip @@
   drivers/infiniband/core/addr.c:425:56: sparse:     expected unsigned int [usertype] key
   drivers/infiniband/core/addr.c:425:56: sparse:     got restricted __be32 [usertype] dst_ip

vim +425 drivers/infiniband/core/addr.c

   383	
   384	static int addr4_resolve(struct sockaddr *src_sock,
   385				 const struct sockaddr *dst_sock,
   386				 struct rdma_dev_addr *addr,
   387				 struct rtable **prt)
   388	{
   389		struct sockaddr_in *src_in = (struct sockaddr_in *)src_sock;
   390		const struct sockaddr_in *dst_in =
   391				(const struct sockaddr_in *)dst_sock;
   392	
   393		__be32 src_ip = src_in->sin_addr.s_addr;
   394		__be32 dst_ip = dst_in->sin_addr.s_addr;
   395		struct rtable *rt;
   396		struct flowi4 fl4;
   397		struct net_device *dev;
   398		struct neighbour *neigh;
   399		int ret;
   400	
   401		memset(&fl4, 0, sizeof(fl4));
   402		fl4.daddr = dst_ip;
   403		fl4.saddr = src_ip;
   404		fl4.flowi4_oif = addr->bound_dev_if;
   405		rt = ip_route_output_key(addr->net, &fl4);
   406		ret = PTR_ERR_OR_ZERO(rt);
   407		if (ret)
   408			return ret;
   409	
   410		src_in->sin_addr.s_addr = fl4.saddr;
   411	
   412		addr->hoplimit = ip4_dst_hoplimit(&rt->dst);
   413	
   414		/* trigger ARP-entry refresh if necessary,
   415		 * the same way "ip_finish_output2" does
   416		 */
   417		if (addr->bound_dev_if) {
   418			dev = dev_get_by_index(addr->net, addr->bound_dev_if);
   419		} else {
   420			dev = rt->dst.dev;
   421			dev_hold(dev);
   422		}
   423		if (dev) {
   424			rcu_read_lock_bh();
 > 425			neigh = __ipv4_neigh_lookup_noref(dev, dst_ip);
   426			if (neigh)
   427				neigh_event_send(neigh, NULL);
   428			rcu_read_unlock_bh();
   429			dev_put(dev);
   430		}
   431	
   432		*prt = rt;
   433		return 0;
   434	}
   435	

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

  reply	other threads:[~2022-06-07  8:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-06 19:38 [PATCH 1/1] RDMA/addr: Refresh neighbour entries upon "rdma_resolve_addr" Gerd Rausch
2022-06-07  8:21 ` kernel test robot [this message]
2022-06-16  7:08 ` Leon Romanovsky
2022-06-16 15:50   ` Gerd Rausch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202206071656.1c2rEvO3-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=gerd.rausch@oracle.com \
    --cc=jgg@ziepe.ca \
    --cc=kbuild-all@lists.01.org \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox