public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Guangguan Wang <guangguan.wang@linux.alibaba.com>,
	kgraul@linux.ibm.com, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com
Cc: kbuild-all@lists.01.org, linux-s390@vger.kernel.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 2/2] net/smc: rdma write inline if qp has sufficient inline space
Date: Fri, 13 May 2022 19:44:11 +0800	[thread overview]
Message-ID: <202205131912.bHaVZP7f-lkp@intel.com> (raw)
In-Reply-To: <20220513071551.22065-3-guangguan.wang@linux.alibaba.com>

Hi Guangguan,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on net-next/master]

url:    https://github.com/intel-lab-lkp/linux/commits/Guangguan-Wang/net-smc-send-and-write-inline-optimization-for-smc/20220513-151715
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git b67fd3d9d94223b424674f45eeadeff58b4b03ef
config: nios2-allyesconfig (https://download.01.org/0day-ci/archive/20220513/202205131912.bHaVZP7f-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 11.3.0
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/1e1003898ecdb92b0339075c7501e486bda2d8e8
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Guangguan-Wang/net-smc-send-and-write-inline-optimization-for-smc/20220513-151715
        git checkout 1e1003898ecdb92b0339075c7501e486bda2d8e8
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=nios2 SHELL=/bin/bash net/smc/

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

All warnings (new ones prefixed by >>):

   net/smc/smc_tx.c: In function 'smcr_tx_rdma_writes':
>> net/smc/smc_tx.c:399:37: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     399 |                         base_addr = (u64)conn->sndbuf_desc->cpu_addr;
         |                                     ^


vim +399 net/smc/smc_tx.c

   376	
   377	/* SMC-R helper for smc_tx_rdma_writes() */
   378	static int smcr_tx_rdma_writes(struct smc_connection *conn, size_t len,
   379				       size_t src_off, size_t src_len,
   380				       size_t dst_off, size_t dst_len,
   381				       struct smc_rdma_wr *wr_rdma_buf)
   382	{
   383		struct smc_link *link = conn->lnk;
   384	
   385		dma_addr_t dma_addr =
   386			sg_dma_address(conn->sndbuf_desc->sgt[link->link_idx].sgl);
   387		int src_len_sum = src_len, dst_len_sum = dst_len;
   388		int sent_count = src_off;
   389		int srcchunk, dstchunk;
   390		int num_sges;
   391		int rc;
   392	
   393		for (dstchunk = 0; dstchunk < 2; dstchunk++) {
   394			struct ib_rdma_wr *wr = &wr_rdma_buf->wr_tx_rdma[dstchunk];
   395			struct ib_sge *sge = wr->wr.sg_list;
   396			u64 base_addr = dma_addr;
   397	
   398			if (dst_len <= link->qp_attr.cap.max_inline_data) {
 > 399				base_addr = (u64)conn->sndbuf_desc->cpu_addr;
   400				wr->wr.send_flags |= IB_SEND_INLINE;
   401			} else {
   402				wr->wr.send_flags &= ~IB_SEND_INLINE;
   403			}
   404	
   405			num_sges = 0;
   406			for (srcchunk = 0; srcchunk < 2; srcchunk++) {
   407				sge[srcchunk].addr = base_addr + src_off;
   408				sge[srcchunk].length = src_len;
   409				num_sges++;
   410	
   411				src_off += src_len;
   412				if (src_off >= conn->sndbuf_desc->len)
   413					src_off -= conn->sndbuf_desc->len;
   414							/* modulo in send ring */
   415				if (src_len_sum == dst_len)
   416					break; /* either on 1st or 2nd iteration */
   417				/* prepare next (== 2nd) iteration */
   418				src_len = dst_len - src_len; /* remainder */
   419				src_len_sum += src_len;
   420			}
   421			rc = smc_tx_rdma_write(conn, dst_off, num_sges, wr);
   422			if (rc)
   423				return rc;
   424			if (dst_len_sum == len)
   425				break; /* either on 1st or 2nd iteration */
   426			/* prepare next (== 2nd) iteration */
   427			dst_off = 0; /* modulo offset in RMBE ring buffer */
   428			dst_len = len - dst_len; /* remainder */
   429			dst_len_sum += dst_len;
   430			src_len = min_t(int, dst_len, conn->sndbuf_desc->len -
   431					sent_count);
   432			src_len_sum = src_len;
   433		}
   434		return 0;
   435	}
   436	

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

      reply	other threads:[~2022-05-13 11:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-13  7:15 [PATCH net-next 0/2] net/smc: send and write inline optimization for smc Guangguan Wang
2022-05-13  7:15 ` [PATCH net-next 1/2] net/smc: send cdc msg inline if qp has sufficient inline space Guangguan Wang
2022-05-13 10:42   ` kernel test robot
2022-05-14  6:02   ` Leon Romanovsky
2022-05-14  9:36     ` Guangguan Wang
2022-05-13  7:15 ` [PATCH net-next 2/2] net/smc: rdma write " Guangguan Wang
2022-05-13 11:44   ` kernel test robot [this message]

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=202205131912.bHaVZP7f-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=guangguan.wang@linux.alibaba.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kgraul@linux.ibm.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /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