public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel•org>
To: Leon Romanovsky <leon@kernel•org>
Cc: Louis Peens <louis.peens@corigine•com>,
	David Miller <davem@davemloft•net>,
	Paolo Abeni <pabeni@redhat•com>,
	Simon Horman <simon.horman@corigine•com>,
	netdev@vger•kernel.org, stable@vger•kernel.org,
	oss-drivers@corigine•com
Subject: Re: [PATCH net 1/1] nfp: correct number of MSI vectors requests returned
Date: Thu, 16 Mar 2023 14:27:10 -0700	[thread overview]
Message-ID: <20230316142710.3b79ed06@kernel.org> (raw)
In-Reply-To: <20230316110943.GV36557@unreal>

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@corigine•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?

  reply	other threads:[~2023-03-16 21:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-15 12:17 [PATCH net 1/1] nfp: correct number of MSI vectors requests returned Louis Peens
2023-03-16 11:09 ` Leon Romanovsky
2023-03-16 21:27   ` Jakub Kicinski [this message]
2023-03-19 11:19     ` Leon Romanovsky
2023-03-19 18:48       ` Jakub Kicinski
2023-03-20  7:01         ` Leon Romanovsky
2023-03-16 21:25 ` Jakub Kicinski

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=20230316142710.3b79ed06@kernel.org \
    --to=kuba@kernel$(echo .)org \
    --cc=davem@davemloft$(echo .)net \
    --cc=leon@kernel$(echo .)org \
    --cc=louis.peens@corigine$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=oss-drivers@corigine$(echo .)com \
    --cc=pabeni@redhat$(echo .)com \
    --cc=simon.horman@corigine$(echo .)com \
    --cc=stable@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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