lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
 <SA1PR18MB4709BA010D07990C70A68AC8A0592@SA1PR18MB4709.namprd18.prod.outlook.com>
Date: Tue, 12 Nov 2024 17:48:11 +0000
From: Sai Krishna Gajula <saikrishnag@...vell.com>
To: Simon Horman <horms@...nel.org>
CC: "davem@...emloft.net" <davem@...emloft.net>,
        "edumazet@...gle.com"
	<edumazet@...gle.com>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "pabeni@...hat.com" <pabeni@...hat.com>,
        "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>,
        Sunil Kovvuri Goutham <sgoutham@...vell.com>,
        Geethasowjanya Akula <gakula@...vell.com>,
        Linu Cherian
	<lcherian@...vell.com>, Jerin Jacob <jerinj@...vell.com>,
        Hariprasad Kelam
	<hkelam@...vell.com>,
        Subbaraya Sundeep Bhatta <sbhatta@...vell.com>,
        "kalesh-anakkur.purayil@...adcom.com" <kalesh-anakkur.purayil@...adcom.com>
Subject: Re: [net-next PATCH v2 6/6] octeontx2-pf: CN20K mbox implementation
 between PF-VF


> -----Original Message-----
> From: Simon Horman <horms@...nel.org>
> Sent: Friday, November 1, 2024 3:34 PM
> To: Sai Krishna Gajula <saikrishnag@...vell.com>
> Cc: davem@...emloft.net; edumazet@...gle.com; kuba@...nel.org;
> pabeni@...hat.com; netdev@...r.kernel.org; linux-kernel@...r.kernel.org;
> Sunil Kovvuri Goutham <sgoutham@...vell.com>; Geethasowjanya Akula
> <gakula@...vell.com>; Linu Cherian <lcherian@...vell.com>; Jerin Jacob
> <jerinj@...vell.com>; Hariprasad Kelam <hkelam@...vell.com>; Subbaraya
> Sundeep Bhatta <sbhatta@...vell.com>; kalesh-
> anakkur.purayil@...adcom.com
> Subject:  Re: [net-next PATCH v2 6/6] octeontx2-pf: CN20K mbox
> implementation between PF-VF
> 
> On Wed, Oct 23, 2024 at 12: 24: 10AM +0530, Sai Krishna wrote: > This patch
> implements the CN20k MBOX communication between PF and > it's VFs.
> CN20K silicon got extra interrupt of MBOX response for trigger > interrupt.
> Also few of the 
> On Wed, Oct 23, 2024 at 12:24:10AM +0530, Sai Krishna wrote:
> > This patch implements the CN20k MBOX communication between PF and
> it's
> > VFs. CN20K silicon got extra interrupt of MBOX response for trigger
> > interrupt. Also few of the CSR offsets got changed in CN20K against
> > prior series of silicons.
> >
> > Signed-off-by: Sunil Kovvuri Goutham <sgoutham@...vell.com>
> > Signed-off-by: Sai Krishna <saikrishnag@...vell.com>
> 
> ...
> 
> > diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
> > b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
> > index 148a5c91af55..1a7920327fd5 100644
> > --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
> > +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
> > @@ -565,6 +565,23 @@ irqreturn_t otx2_pfvf_mbox_intr_handler(int irq,
> void *pf_irq)
> >  	return IRQ_HANDLED;
> >  }
> >
> > +static void *cn20k_pfvf_mbox_alloc(struct otx2_nic *pf, int numvfs) {
> > +	struct qmem *mbox_addr;
> > +	int err;
> > +
> > +	err = qmem_alloc(&pf->pdev->dev, &mbox_addr, numvfs,
> MBOX_SIZE);
> 
> Hi Sai and Sunil,
> 
> MBOX_SIZE is 0x10000 (i.e. 2^16).
> 
> But qmem_alloc() will assign this value to the entry_sz field of an instance of
> struct qmem, whose type is u16. Thus the value will be truncated to 0. I didn't
> dig further, but this doesn't seem desirable.
> 
> Flagged by Sparse on x86_64.
> 
> Also, not strictly related to this patchset: There Sparse flags a handful of
> warnings in .../marvell/octeontx2/nic/otx2_pf.c,
> which all seem to relate to __iomem annotations. It would be nice to
> investigate and resolve those at some point.

Ack, will submit V3 patch addressing these issues.

> 
> > +	if (err) {
> > +		dev_err(pf->dev, "qmem alloc fail\n");
> > +		return ERR_PTR(-ENOMEM);
> > +	}
> > +
> > +	otx2_write64(pf, RVU_PF_VF_MBOX_ADDR, (u64)mbox_addr->iova);
> > +	pf->pfvf_mbox_addr = mbox_addr;
> > +
> > +	return mbox_addr->base;
> > +}
> > +
> >  static int otx2_pfvf_mbox_init(struct otx2_nic *pf, int numvfs)  {
> >  	void __iomem *hwbase;
> 
> ...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ