[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<CH0PR18MB43390E834F5AA7E8911B1AF7CD0F2@CH0PR18MB4339.namprd18.prod.outlook.com>
Date: Wed, 17 Apr 2024 13:45:27 +0000
From: Geethasowjanya Akula <gakula@...vell.com>
To: Dan Carpenter <dan.carpenter@...aro.org>,
"oe-kbuild@...ts.linux.dev"
<oe-kbuild@...ts.linux.dev>,
"netdev@...r.kernel.org"
<netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>
CC: "lkp@...el.com" <lkp@...el.com>,
"oe-kbuild-all@...ts.linux.dev"
<oe-kbuild-all@...ts.linux.dev>,
"kuba@...nel.org" <kuba@...nel.org>,
"davem@...emloft.net" <davem@...emloft.net>,
"pabeni@...hat.com"
<pabeni@...hat.com>,
"edumazet@...gle.com" <edumazet@...gle.com>,
Sunil
Kovvuri Goutham <sgoutham@...vell.com>,
Subbaraya Sundeep Bhatta
<sbhatta@...vell.com>,
Hariprasad Kelam <hkelam@...vell.com>
Subject: RE: [EXTERNAL] Re: [net-next PATCH 2/9] octeontx2-pf: RVU representor
driver
> -----Original Message-----
> From: Dan Carpenter <dan.carpenter@...aro.org>
> Sent: Wednesday, April 17, 2024 7:08 PM
> To: oe-kbuild@...ts.linux.dev; Geethasowjanya Akula <gakula@...vell.com>;
> netdev@...r.kernel.org; linux-kernel@...r.kernel.org
> Cc: lkp@...el.com; oe-kbuild-all@...ts.linux.dev; kuba@...nel.org;
> davem@...emloft.net; pabeni@...hat.com; edumazet@...gle.com; Sunil
> Kovvuri Goutham <sgoutham@...vell.com>; Geethasowjanya Akula
> <gakula@...vell.com>; Subbaraya Sundeep Bhatta <sbhatta@...vell.com>;
> Hariprasad Kelam <hkelam@...vell.com>
> Subject: [EXTERNAL] Re: [net-next PATCH 2/9] octeontx2-pf: RVU representor
> driver
>
> Prioritize security for external emails: Confirm sender and content safety
> before clicking links or opening attachments
>
> ----------------------------------------------------------------------
> Hi Geetha,
>
> kernel test robot noticed the following build warnings:
Sorry for the noise. Will submit v2.
>
> url: https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__github.com_intel-2Dlab-2Dlkp_linux_commits_Geetha-
> 2Dsowjanya_octeontx2-2Dpf-2DRefactoring-2DRVU-2Ddriver_20240416-
> 2D131052&d=DwIBAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=UiEt_nUeYFctu7JVLX
> VlXDhTmq_EAfooaZEYInfGuEQ&m=pcjq_-
> V9lD5zAfvLDvrlTSM6DYTEg3uJVXYiddlZa89uqDZsmg4dN-
> MbQRGQK6ji&s=ChDNOMytP7EFyLLxwRY3cHm7DMPhPlK3Wv2IEhbgJ6g&e=
> base: net-next/main
> patch link: https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__lore.kernel.org_r_20240416050616.6056-2D3-2Dgakula-
> 2540marvell.com&d=DwIBAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=UiEt_nUeYFct
> u7JVLXVlXDhTmq_EAfooaZEYInfGuEQ&m=pcjq_-
> V9lD5zAfvLDvrlTSM6DYTEg3uJVXYiddlZa89uqDZsmg4dN-
> MbQRGQK6ji&s=YSpWxF94IMzRZMCAUDJtHTF24ZOUEQndVX3_OEwQeT4&e=
> patch subject: [net-next PATCH 2/9] octeontx2-pf: RVU representor driver
> config: alpha-randconfig-r081-20240417
> (https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__download.01.org_0day-
> 2Dci_archive_20240417_202404172056.MpOMwcGB-2Dlkp-
> 40intel.com_config&d=DwIBAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=UiEt_nUeYF
> ctu7JVLXVlXDhTmq_EAfooaZEYInfGuEQ&m=pcjq_-
> V9lD5zAfvLDvrlTSM6DYTEg3uJVXYiddlZa89uqDZsmg4dN-
> MbQRGQK6ji&s=QOW0AEuofAe4zzEOmhoLGIMNdsEeECwaFcWF59IbfGs&e=
> )
> compiler: alpha-linux-gcc (GCC) 13.2.0
>
> 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@...el.com>
> | Reported-by: Dan Carpenter <dan.carpenter@...aro.org>
> | Closes:
> | https://urldefense.proofpoint.com/v2/url?u=https-3A__lore.kernel.org_r
> | _202404172056.MpOMwcGB-2Dlkp-
> 40intel.com_&d=DwIBAg&c=nKjWec2b6R0mOyPaz
> | 7xtfQ&r=UiEt_nUeYFctu7JVLXVlXDhTmq_EAfooaZEYInfGuEQ&m=pcjq_-
> V9lD5zAfvL
> | DvrlTSM6DYTEg3uJVXYiddlZa89uqDZsmg4dN-
> MbQRGQK6ji&s=jPDXgsvu9jd0deKZBs1
> | uke91fxvHYp_S6gFl1gnq5Rk&e=
>
> New smatch warnings:
> drivers/net/ethernet/marvell/octeontx2/nic/rep.c:95 rvu_get_rep_cnt() warn:
> passing zero to 'PTR_ERR'
> drivers/net/ethernet/marvell/octeontx2/nic/rep.c:140 rvu_rep_probe() warn:
> missing unwind goto?
>
> vim +/PTR_ERR +95 drivers/net/ethernet/marvell/octeontx2/nic/rep.c
>
> 1e15129a77b419 Geetha sowjanya 2024-04-16 76 static int
> rvu_get_rep_cnt(struct otx2_nic *priv)
> 1e15129a77b419 Geetha sowjanya 2024-04-16 77 {
> 1e15129a77b419 Geetha sowjanya 2024-04-16 78 struct
> get_rep_cnt_rsp *rsp;
> 1e15129a77b419 Geetha sowjanya 2024-04-16 79 struct mbox_msghdr
> *msghdr;
> 1e15129a77b419 Geetha sowjanya 2024-04-16 80 struct msg_req *req;
> 1e15129a77b419 Geetha sowjanya 2024-04-16 81 int err, rep;
> 1e15129a77b419 Geetha sowjanya 2024-04-16 82
> 1e15129a77b419 Geetha sowjanya 2024-04-16 83 mutex_lock(&priv-
> >mbox.lock);
> 1e15129a77b419 Geetha sowjanya 2024-04-16 84 req =
> otx2_mbox_alloc_msg_get_rep_cnt(&priv->mbox);
> 1e15129a77b419 Geetha sowjanya 2024-04-16 85 if (!req) {
> 1e15129a77b419 Geetha sowjanya 2024-04-16 86
> mutex_unlock(&priv->mbox.lock);
> 1e15129a77b419 Geetha sowjanya 2024-04-16 87 return -
> ENOMEM;
> 1e15129a77b419 Geetha sowjanya 2024-04-16 88 }
> 1e15129a77b419 Geetha sowjanya 2024-04-16 89 err =
> otx2_sync_mbox_msg(&priv->mbox);
> 1e15129a77b419 Geetha sowjanya 2024-04-16 90 if (err)
> 1e15129a77b419 Geetha sowjanya 2024-04-16 91 goto exit;
> 1e15129a77b419 Geetha sowjanya 2024-04-16 92
> 1e15129a77b419 Geetha sowjanya 2024-04-16 93 msghdr =
> otx2_mbox_get_rsp(&priv->mbox.mbox, 0, &req->hdr);
> 1e15129a77b419 Geetha sowjanya 2024-04-16 94 if (IS_ERR(msghdr)) {
> 1e15129a77b419 Geetha sowjanya 2024-04-16 @95 err =
> PTR_ERR(rsp);
> ^^^ s/rsp/msghdr/
>
> 1e15129a77b419 Geetha sowjanya 2024-04-16 96 goto exit;
> 1e15129a77b419 Geetha sowjanya 2024-04-16 97 }
> 1e15129a77b419 Geetha sowjanya 2024-04-16 98
> 1e15129a77b419 Geetha sowjanya 2024-04-16 99 rsp = (struct
> get_rep_cnt_rsp *)msghdr;
> 1e15129a77b419 Geetha sowjanya 2024-04-16 100 priv->hw.tx_queues =
> rsp->rep_cnt;
> 1e15129a77b419 Geetha sowjanya 2024-04-16 101 priv->hw.rx_queues =
> rsp->rep_cnt;
> 1e15129a77b419 Geetha sowjanya 2024-04-16 102 priv->rep_cnt = rsp-
> >rep_cnt;
> 1e15129a77b419 Geetha sowjanya 2024-04-16 103 for (rep = 0; rep <
> priv->rep_cnt; rep++)
> 1e15129a77b419 Geetha sowjanya 2024-04-16 104 priv-
> >rep_pf_map[rep] = rsp->rep_pf_map[rep];
> 1e15129a77b419 Geetha sowjanya 2024-04-16 105
> 1e15129a77b419 Geetha sowjanya 2024-04-16 106 exit:
> 1e15129a77b419 Geetha sowjanya 2024-04-16 107 mutex_unlock(&priv-
> >mbox.lock);
> 1e15129a77b419 Geetha sowjanya 2024-04-16 108 return err;
> 1e15129a77b419 Geetha sowjanya 2024-04-16 109 }
> 1e15129a77b419 Geetha sowjanya 2024-04-16 110
> 1e15129a77b419 Geetha sowjanya 2024-04-16 111 static int
> rvu_rep_probe(struct pci_dev *pdev, const struct pci_device_id *id)
> 1e15129a77b419 Geetha sowjanya 2024-04-16 112 {
> 1e15129a77b419 Geetha sowjanya 2024-04-16 113 struct device *dev =
> &pdev->dev;
> 1e15129a77b419 Geetha sowjanya 2024-04-16 114 struct otx2_nic *priv;
> 1e15129a77b419 Geetha sowjanya 2024-04-16 115 struct otx2_hw *hw;
> 1e15129a77b419 Geetha sowjanya 2024-04-16 116 int err;
> 1e15129a77b419 Geetha sowjanya 2024-04-16 117
> 1e15129a77b419 Geetha sowjanya 2024-04-16 118 err =
> pcim_enable_device(pdev);
> 1e15129a77b419 Geetha sowjanya 2024-04-16 119 if (err) {
> 1e15129a77b419 Geetha sowjanya 2024-04-16 120 dev_err(dev,
> "Failed to enable PCI device\n");
> 1e15129a77b419 Geetha sowjanya 2024-04-16 121 return err;
> 1e15129a77b419 Geetha sowjanya 2024-04-16 122 }
> 1e15129a77b419 Geetha sowjanya 2024-04-16 123
> 1e15129a77b419 Geetha sowjanya 2024-04-16 124 err =
> pci_request_regions(pdev, DRV_NAME);
> 1e15129a77b419 Geetha sowjanya 2024-04-16 125 if (err) {
> 1e15129a77b419 Geetha sowjanya 2024-04-16 126 dev_err(dev,
> "PCI request regions failed 0x%x\n", err);
> 1e15129a77b419 Geetha sowjanya 2024-04-16 127 return err;
> 1e15129a77b419 Geetha sowjanya 2024-04-16 128 }
> 1e15129a77b419 Geetha sowjanya 2024-04-16 129
> 1e15129a77b419 Geetha sowjanya 2024-04-16 130 err =
> dma_set_mask_and_coherent(dev, DMA_BIT_MASK(48));
> 1e15129a77b419 Geetha sowjanya 2024-04-16 131 if (err) {
> 1e15129a77b419 Geetha sowjanya 2024-04-16 132 dev_err(dev,
> "DMA mask config failed, abort\n");
> 1e15129a77b419 Geetha sowjanya 2024-04-16 133 goto
> err_release_regions;
> 1e15129a77b419 Geetha sowjanya 2024-04-16 134 }
> 1e15129a77b419 Geetha sowjanya 2024-04-16 135
> 1e15129a77b419 Geetha sowjanya 2024-04-16 136
> pci_set_master(pdev);
> 1e15129a77b419 Geetha sowjanya 2024-04-16 137
> 1e15129a77b419 Geetha sowjanya 2024-04-16 138 priv =
> devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
> 1e15129a77b419 Geetha sowjanya 2024-04-16 139 if (!priv)
> 1e15129a77b419 Geetha sowjanya 2024-04-16 @140 return -
> ENOMEM;
>
> goto err_release_regions.
>
> 1e15129a77b419 Geetha sowjanya 2024-04-16 141 pci_set_drvdata(pdev,
> priv);
> 1e15129a77b419 Geetha sowjanya 2024-04-16 142 priv->pdev = pdev;
> 1e15129a77b419 Geetha sowjanya 2024-04-16 143 priv->dev = dev;
> 1e15129a77b419 Geetha sowjanya 2024-04-16 144 priv->flags |=
> OTX2_FLAG_INTF_DOWN;
> 1e15129a77b419 Geetha sowjanya 2024-04-16 145 priv->flags |=
> OTX2_FLAG_REP_MODE_ENABLED;
> 1e15129a77b419 Geetha sowjanya 2024-04-16 146
> 1e15129a77b419 Geetha sowjanya 2024-04-16 147 hw = &priv->hw;
> 1e15129a77b419 Geetha sowjanya 2024-04-16 148 hw->pdev = pdev;
> 1e15129a77b419 Geetha sowjanya 2024-04-16 149 hw->max_queues =
> OTX2_MAX_CQ_CNT;
> 1e15129a77b419 Geetha sowjanya 2024-04-16 150 hw->rbuf_len =
> OTX2_DEFAULT_RBUF_LEN;
> 1e15129a77b419 Geetha sowjanya 2024-04-16 151 hw->xqe_size = 128;
> 1e15129a77b419 Geetha sowjanya 2024-04-16 152
> 1e15129a77b419 Geetha sowjanya 2024-04-16 153 err =
> otx2_init_rsrc(pdev, priv);
> 1e15129a77b419 Geetha sowjanya 2024-04-16 154 if (err)
> 1e15129a77b419 Geetha sowjanya 2024-04-16 155 goto
> err_release_regions;
> 1e15129a77b419 Geetha sowjanya 2024-04-16 156
> 1e15129a77b419 Geetha sowjanya 2024-04-16 157 err =
> rvu_get_rep_cnt(priv);
> 1e15129a77b419 Geetha sowjanya 2024-04-16 158 if (err)
> 1e15129a77b419 Geetha sowjanya 2024-04-16 159 goto
> err_detach_rsrc;
> 1e15129a77b419 Geetha sowjanya 2024-04-16 160
> 1e15129a77b419 Geetha sowjanya 2024-04-16 161 err =
> rvu_rep_rsrc_init(priv);
> 1e15129a77b419 Geetha sowjanya 2024-04-16 162 if (err)
> 1e15129a77b419 Geetha sowjanya 2024-04-16 163 goto
> err_detach_rsrc;
> 1e15129a77b419 Geetha sowjanya 2024-04-16 164
> 1e15129a77b419 Geetha sowjanya 2024-04-16 165 return 0;
> 1e15129a77b419 Geetha sowjanya 2024-04-16 166
> 1e15129a77b419 Geetha sowjanya 2024-04-16 167 err_detach_rsrc:
> 1e15129a77b419 Geetha sowjanya 2024-04-16 168 if (priv->hw.lmt_info)
> 1e15129a77b419 Geetha sowjanya 2024-04-16 169
> free_percpu(priv->hw.lmt_info);
> 1e15129a77b419 Geetha sowjanya 2024-04-16 170 if
> (test_bit(CN10K_LMTST, &priv->hw.cap_flag))
> 1e15129a77b419 Geetha sowjanya 2024-04-16 171
> qmem_free(priv->dev, priv->dync_lmt);
> 1e15129a77b419 Geetha sowjanya 2024-04-16 172
> otx2_detach_resources(&priv->mbox);
> 1e15129a77b419 Geetha sowjanya 2024-04-16 173
> otx2_disable_mbox_intr(priv);
> 1e15129a77b419 Geetha sowjanya 2024-04-16 174
> otx2_pfaf_mbox_destroy(priv);
> 1e15129a77b419 Geetha sowjanya 2024-04-16 175
> pci_free_irq_vectors(pdev);
> 1e15129a77b419 Geetha sowjanya 2024-04-16 176 err_release_regions:
> 1e15129a77b419 Geetha sowjanya 2024-04-16 177 pci_set_drvdata(pdev,
> NULL);
> 1e15129a77b419 Geetha sowjanya 2024-04-16 178
> pci_release_regions(pdev);
> 1e15129a77b419 Geetha sowjanya 2024-04-16 179 return err;
> 1e15129a77b419 Geetha sowjanya 2024-04-16 180 }
>
> --
> 0-DAY CI Kernel Test Service
> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_intel_lkp-
> 2Dtests_wiki&d=DwIBAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=UiEt_nUeYFctu7JV
> LXVlXDhTmq_EAfooaZEYInfGuEQ&m=pcjq_-
> V9lD5zAfvLDvrlTSM6DYTEg3uJVXYiddlZa89uqDZsmg4dN-
> MbQRGQK6ji&s=beFB4KCroPb-eEJRShM4cz1uR-BfmmzYTAhp7-xEqqc&e=
Powered by blists - more mailing lists