From: Wen Gu <guwen@linux.alibaba.com>
To: kernel test robot <lkp@intel.com>,
kgraul@linux.ibm.com, wenjia@linux.ibm.com, jaka@linux.ibm.com,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com
Cc: oe-kbuild-all@lists.linux.dev, wintera@linux.ibm.com,
schnelle@linux.ibm.com, gbayer@linux.ibm.com,
pasic@linux.ibm.com, alibuda@linux.alibaba.com,
tonylu@linux.alibaba.com, dust.li@linux.alibaba.com,
linux-s390@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v4 12/18] net/smc: implement DMB-related operations of loopback
Date: Mon, 25 Sep 2023 09:47:11 +0800 [thread overview]
Message-ID: <0b49743f-1e2f-f0fd-22af-b9f76068fa75@linux.alibaba.com> (raw)
In-Reply-To: <202309250749.LB7ZUUGJ-lkp@intel.com>
On 2023/9/25 07:29, kernel test robot wrote:
> Hi Wen,
>
> kernel test robot noticed the following build errors:
>
> [auto build test ERROR on net-next/main]
>
> url: https://github.com/intel-lab-lkp/linux/commits/Wen-Gu/net-smc-decouple-ism_dev-from-SMC-D-device-dump/20230924-231933
> base: net-next/main
> patch link: https://lore.kernel.org/r/1695568613-125057-13-git-send-email-guwen%40linux.alibaba.com
> patch subject: [PATCH net-next v4 12/18] net/smc: implement DMB-related operations of loopback
> config: mips-allmodconfig (https://download.01.org/0day-ci/archive/20230925/202309250749.LB7ZUUGJ-lkp@intel.com/config)
> compiler: mips-linux-gcc (GCC) 13.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230925/202309250749.LB7ZUUGJ-lkp@intel.com/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 <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202309250749.LB7ZUUGJ-lkp@intel.com/
>
> All error/warnings (new ones prefixed by >>):
>
> net/smc/smc_loopback.c: In function 'smc_lo_register_dmb':
>>> net/smc/smc_loopback.c:102:30: error: implicit declaration of function 'vzalloc'; did you mean 'kvzalloc'? [-Werror=implicit-function-declaration]
> 102 | dmb_node->cpu_addr = vzalloc(dmb->dmb_len);
> | ^~~~~~~
> | kvzalloc
>>> net/smc/smc_loopback.c:102:28: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
> 102 | dmb_node->cpu_addr = vzalloc(dmb->dmb_len);
> | ^
> net/smc/smc_loopback.c: In function 'smc_lo_unregister_dmb':
>>> net/smc/smc_loopback.c:159:9: error: implicit declaration of function 'vfree'; did you mean 'kvfree'? [-Werror=implicit-function-declaration]
> 159 | vfree(dmb_node->cpu_addr);
> | ^~~~~
> | kvfree
> cc1: some warnings being treated as errors
>
It can be fixed by including corresponding header file:
#include <linux/vmalloc.h>
Continue to wait for other review comments and will fix this in the next version.
Thanks.
>
> vim +102 net/smc/smc_loopback.c
>
> 79
> 80 static int smc_lo_register_dmb(struct smcd_dev *smcd, struct smcd_dmb *dmb,
> 81 void *client_priv)
> 82 {
> 83 struct smc_lo_dmb_node *dmb_node, *tmp_node;
> 84 struct smc_lo_dev *ldev = smcd->priv;
> 85 int sba_idx, rc;
> 86
> 87 /* check space for new dmb */
> 88 for_each_clear_bit(sba_idx, ldev->sba_idx_mask, SMC_LODEV_MAX_DMBS) {
> 89 if (!test_and_set_bit(sba_idx, ldev->sba_idx_mask))
> 90 break;
> 91 }
> 92 if (sba_idx == SMC_LODEV_MAX_DMBS)
> 93 return -ENOSPC;
> 94
> 95 dmb_node = kzalloc(sizeof(*dmb_node), GFP_KERNEL);
> 96 if (!dmb_node) {
> 97 rc = -ENOMEM;
> 98 goto err_bit;
> 99 }
> 100
> 101 dmb_node->sba_idx = sba_idx;
> > 102 dmb_node->cpu_addr = vzalloc(dmb->dmb_len);
> 103 if (!dmb_node->cpu_addr) {
> 104 rc = -ENOMEM;
> 105 goto err_node;
> 106 }
> 107 dmb_node->len = dmb->dmb_len;
> 108 dmb_node->dma_addr = SMC_DMA_ADDR_INVALID;
> 109
> 110 again:
> 111 /* add new dmb into hash table */
> 112 get_random_bytes(&dmb_node->token, sizeof(dmb_node->token));
> 113 write_lock(&ldev->dmb_ht_lock);
> 114 hash_for_each_possible(ldev->dmb_ht, tmp_node, list, dmb_node->token) {
> 115 if (tmp_node->token == dmb_node->token) {
> 116 write_unlock(&ldev->dmb_ht_lock);
> 117 goto again;
> 118 }
> 119 }
> 120 hash_add(ldev->dmb_ht, &dmb_node->list, dmb_node->token);
> 121 write_unlock(&ldev->dmb_ht_lock);
> 122
> 123 dmb->sba_idx = dmb_node->sba_idx;
> 124 dmb->dmb_tok = dmb_node->token;
> 125 dmb->cpu_addr = dmb_node->cpu_addr;
> 126 dmb->dma_addr = dmb_node->dma_addr;
> 127 dmb->dmb_len = dmb_node->len;
> 128
> 129 return 0;
> 130
> 131 err_node:
> 132 kfree(dmb_node);
> 133 err_bit:
> 134 clear_bit(sba_idx, ldev->sba_idx_mask);
> 135 return rc;
> 136 }
> 137
> 138 static int smc_lo_unregister_dmb(struct smcd_dev *smcd, struct smcd_dmb *dmb)
> 139 {
> 140 struct smc_lo_dmb_node *dmb_node = NULL, *tmp_node;
> 141 struct smc_lo_dev *ldev = smcd->priv;
> 142
> 143 /* remove dmb from hash table */
> 144 write_lock(&ldev->dmb_ht_lock);
> 145 hash_for_each_possible(ldev->dmb_ht, tmp_node, list, dmb->dmb_tok) {
> 146 if (tmp_node->token == dmb->dmb_tok) {
> 147 dmb_node = tmp_node;
> 148 break;
> 149 }
> 150 }
> 151 if (!dmb_node) {
> 152 write_unlock(&ldev->dmb_ht_lock);
> 153 return -EINVAL;
> 154 }
> 155 hash_del(&dmb_node->list);
> 156 write_unlock(&ldev->dmb_ht_lock);
> 157
> 158 clear_bit(dmb_node->sba_idx, ldev->sba_idx_mask);
> > 159 vfree(dmb_node->cpu_addr);
> 160 kfree(dmb_node);
> 161
> 162 return 0;
> 163 }
> 164
>
next prev parent reply other threads:[~2023-09-25 1:47 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-24 15:16 [PATCH net-next v4 00/18] net/smc: implement virtual ISM extension and loopback-ism Wen Gu
2023-09-24 15:16 ` [PATCH net-next v4 01/18] net/smc: decouple ism_dev from SMC-D device dump Wen Gu
2023-09-24 15:16 ` [PATCH net-next v4 02/18] net/smc: decouple ism_dev from SMC-D DMB registration Wen Gu
2023-09-24 15:16 ` [PATCH net-next v4 03/18] net/smc: extract v2 check helper from SMC-D device registration Wen Gu
2023-09-28 3:08 ` Jan Karcher
2023-09-30 8:41 ` Wen Gu
2023-09-24 15:16 ` [PATCH net-next v4 04/18] net/smc: support SMCv2.x supplemental features negotiation Wen Gu
2023-09-24 15:16 ` [PATCH net-next v4 05/18] net/smc: reserve CHID range for SMC-D virtual device Wen Gu
2023-09-28 3:08 ` Jan Karcher
2023-09-28 9:10 ` Alexandra Winter
2023-10-04 8:27 ` Wen Gu
2023-09-24 15:16 ` [PATCH net-next v4 06/18] net/smc: extend GID to 128bits only for virtual ISM device Wen Gu
2023-10-12 7:54 ` Dust Li
2023-10-12 13:24 ` Wen Gu
2023-09-24 15:16 ` [PATCH net-next v4 07/18] net/smc: disable SEID on non-s390 architecture Wen Gu
2023-09-24 15:16 ` [PATCH net-next v4 08/18] net/smc: enable virtual ISM device feature bit Wen Gu
2023-09-24 15:16 ` [PATCH net-next v4 09/18] net/smc: introduce SMC-D loopback device Wen Gu
2023-09-25 11:50 ` Alexandra Winter
2023-09-25 13:29 ` Alexandra Winter
2023-09-25 14:20 ` Wen Gu
2023-09-25 13:57 ` Wen Gu
2023-09-25 15:18 ` Dust Li
2023-09-26 7:24 ` Alexandra Winter
2023-09-28 3:16 ` Jan Karcher
2023-09-28 18:35 ` Wen Gu
2023-09-29 14:08 ` Alexandra Winter
2023-10-04 9:05 ` Wen Gu
2023-09-24 15:16 ` [PATCH net-next v4 10/18] net/smc: implement ID-related operations of loopback Wen Gu
2023-10-18 13:24 ` Alexandra Winter
2023-09-24 15:16 ` [PATCH net-next v4 11/18] net/smc: implement some unsupported " Wen Gu
2023-09-24 15:16 ` [PATCH net-next v4 12/18] net/smc: implement DMB-related " Wen Gu
2023-09-24 23:29 ` kernel test robot
2023-09-25 1:47 ` Wen Gu [this message]
2023-09-24 15:16 ` [PATCH net-next v4 13/18] net/smc: register loopback device as SMC-Dv2 device Wen Gu
2023-09-24 15:16 ` [PATCH net-next v4 14/18] net/smc: add operation for getting DMB attribute Wen Gu
2023-09-24 15:16 ` [PATCH net-next v4 15/18] net/smc: add operations for DMB attach and detach Wen Gu
2023-09-24 15:16 ` [PATCH net-next v4 16/18] net/smc: avoid data copy from sndbuf to peer RMB in SMC-D Wen Gu
2023-09-24 15:16 ` [PATCH net-next v4 17/18] net/smc: modify cursor update logic when sndbuf mapped to RMB Wen Gu
2023-09-24 15:16 ` [PATCH net-next v4 18/18] net/smc: add interface implementation of loopback device Wen Gu
2023-09-26 7:30 ` [PATCH net-next v4 00/18] net/smc: implement virtual ISM extension and loopback-ism Alexandra Winter
2023-09-27 15:16 ` Alexandra Winter
2023-09-28 8:56 ` Alexandra Winter
2023-09-28 17:29 ` Wen Gu
2023-09-29 13:31 ` Alexandra Winter
2023-10-04 8:42 ` Wen Gu
2023-09-28 16:42 ` Wen Gu
2023-10-05 8:21 ` Niklas Schnelle
2023-10-08 7:19 ` Wen Gu
2023-10-17 3:49 ` Wen Gu
2023-10-18 19:43 ` Wenjia Zhang
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=0b49743f-1e2f-f0fd-22af-b9f76068fa75@linux.alibaba.com \
--to=guwen@linux.alibaba.com \
--cc=alibuda@linux.alibaba.com \
--cc=davem@davemloft.net \
--cc=dust.li@linux.alibaba.com \
--cc=edumazet@google.com \
--cc=gbayer@linux.ibm.com \
--cc=jaka@linux.ibm.com \
--cc=kgraul@linux.ibm.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=lkp@intel.com \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pabeni@redhat.com \
--cc=pasic@linux.ibm.com \
--cc=schnelle@linux.ibm.com \
--cc=tonylu@linux.alibaba.com \
--cc=wenjia@linux.ibm.com \
--cc=wintera@linux.ibm.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
all inboxes | Powered by JetHome®