[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAErSpo7Puj1hgpmnjvuBjvoNjHQUyOU-axsKm+PY3j8jkZHDAQ@mail.gmail.com>
Date: Wed, 12 Feb 2014 10:00:28 -0700
From: Bjorn Helgaas <bhelgaas@...gle.com>
To: Alexander Gordeev <agordeev@...hat.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>
Subject: Re: [PATCH 01/34] bnx2: Use pci_enable_msix_range()
On Wed, Feb 12, 2014 at 6:26 AM, Alexander Gordeev <agordeev@...hat.com> wrote:
> On Mon, Feb 10, 2014 at 06:08:03PM -0700, Bjorn Helgaas wrote:
>> I skimmed these and the scsi patches, and I think you were right in
>> proposing an MSI-X enable function that takes a single "number of vectors"
>> argument, in addition to pci_enable_msix_range(), which takes a minimum and
>> a maximum. Obviously the pci_enable_msix_fixed() or whatever could be a
>> simple #define wrapper or something.
>>
>> Of the fifty-some net and scsi patches, I counted 23 that use the min ==
>> max pattern, and it seems a shame to have to repeat that expression.
>
> (un-CCing netdev@...r.kernel.org)
>
> Hi Bjorn,
>
> I propose pci_enable_msix_exact(pdev, entries, nvec) rather than
> pci_enable_msix_fixed().
OK, that sounds fine.
> Do you prefer this one to return 0/-errno or nvec/-errno?
0/-errno seems right to me. We are asking for a very specific thing,
and returning nvec doesn't give the caller any additional information
(since the caller supplied nvec in the first place), so simple
success/failure is what I would expect.
> Do you want pci_enable_msi_exact() in addition to pci_enable_msix_exact()?
If there are cases where pci_enable_msi_exact() would be used, I guess
the same arguments would apply, so yes. I haven't looked at the
archives, but I have this nagging feeling that this is exactly what
you proposed initially, and I had some objection. If so, I'm sorry
about changing my mind :)
Bjorn
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists