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] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 16 Mar 2023 14:27:10 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Leon Romanovsky <leon@...nel.org>
Cc:     Louis Peens <louis.peens@...igine.com>,
        David Miller <davem@...emloft.net>,
        Paolo Abeni <pabeni@...hat.com>,
        Simon Horman <simon.horman@...igine.com>,
        netdev@...r.kernel.org, stable@...r.kernel.org,
        oss-drivers@...igine.com
Subject: Re: [PATCH net 1/1] nfp: correct number of MSI vectors requests
 returned

On Thu, 16 Mar 2023 13:09:43 +0200 Leon Romanovsky wrote:
> On Wed, Mar 15, 2023 at 02:17:33PM +0200, Louis Peens wrote:
> > From: Xiaoyu Li <xiaoyu.li@...igine.com>
> > 
> > Before the referenced commit, when we requested a
> > certain number of interrupts, if we could not meet
> > the requirements, the number of interrupts supported
> > by the hardware would be returned. But after the
> > referenced commit, if the hardware failed to meet
> > the requirements, the error of invalid argument
> > would be directly returned, which caused a regression
> > in the nfp driver preventing probing to complete.  
> 
> Please don't break lines. You have upto 80 chars per-line.

72 I think, git adds an indentation. Not that I personally care
about "not using full lines".

> > diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
> > index 62f0bf91d1e1..0e4cab38f075 100644
> > --- a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
> > +++ b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
> > @@ -370,6 +370,12 @@ nfp_net_irqs_alloc(struct pci_dev *pdev, struct msix_entry *irq_entries,
> >  {
> >  	unsigned int i;
> >  	int got_irqs;
> > +	int max_irqs;
> > +
> > +	max_irqs = pci_msix_vec_count(pdev);
> > +	if (max_irqs < 0)
> > +		return max_irqs;
> > +	wanted_irqs = min_t(unsigned int, max_irqs, wanted_irqs);  
> 
> 1. It looks like you need to fix your nfp_net_irqs_alloc() to provide
> valid wanted_irqs from the beginning.

Right, why do you have this problem in the first place?
Could you provide some concrete numbers?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ