Re: [PATCH 01/10] mpt3sas: switch to pci_alloc_irq_vectors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/16/2017 10:32 AM, Sreekanth Reddy wrote:
> On Tue, Jan 31, 2017 at 2:55 PM, Hannes Reinecke <hare@xxxxxxx> wrote:
>> Cleanup the MSI-X handling allowing us to use
>> the PCI-layer provided vector allocation.
>>
>> Signed-off-by: Hannes Reinecke <hare@xxxxxxxx>
>> ---
>>  drivers/scsi/mpt3sas/mpt3sas_base.c | 100 +++++++++++++++++-------------------
>>  drivers/scsi/mpt3sas/mpt3sas_base.h |   2 -
>>  2 files changed, 46 insertions(+), 56 deletions(-)
>>
[ .. ]
>>
>>         ioc->msix_enable = 1;
>> -       for (i = 0, a = entries; i < ioc->reply_queue_count; i++, a++) {
>> -               r = _base_request_irq(ioc, i, a->vector);
>> +       ioc->msix_vector_count = r;
> 
> Here we should also reinitialize ioc->reply_queue_count if
> pci_alloc_irq_vectors returns with value less than requested MSIx
> vector count (i.e. ioc->reply_queue_count).
> 
Sigh. The usual confusion between 'reply_queue_count' and
'msix_vector_count'.

I have _tried_ to make 'reply_queue_count' the number of _allocated_
reply queues, and 'msix_vector_count' the number of MSI-x vectors allocated.
As pci_alloc_irq_vectors might be returning less vectors than specified
(but we don't modify the allocation for reply_queue_count in that case)
I considered it an error to modify reply_queue_count, too.

But I'd _very_ much appreciate if we could clear up the confusion and
fix the meaning of 'reply_queue_count' and 'msix_vector_count'.
ATM I don't think we have a consistent usage here.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@xxxxxxx			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux