On 5/6/2015 2:36 AM, Stephen Hemminger wrote:
> On Tue,  5 May 2015 13:39:44 +0800
> Cunming Liang <cunming.liang at intel.com> wrote:
>
>>   
>> +    /* set max interrupt vfio request */
>> +    if (pci_dev->intr_handle.vec_en) {
>> +            pci_dev->intr_handle.max_intr = hw->mac.max_rx_queues +
>> +                    IXGBEVF_MAX_OTHER_INTR;
>> +            pci_dev->intr_handle.intr_vec =
>> +                    rte_zmalloc("intr_vec",
>> +                                hw->mac.max_rx_queues * sizeof(int), 0);
>> +    
> Since MSI-X vectors are limited on many hardware platforms, this whole API
> should be changed so that max_intr is based on number of rx_queues actually
> used by the application.  That means the setup needs to move from init to 
> configure.
[LCM] When MSI-X is not used, intr_vec and set max_intr are useless. It 
doesn't matter to non MSI-X mode.
As it allows the sequence "dev_stop->dev_reconfig->dev_start", the real 
used number of queue may change.
So allocation only on dev_init and release only on dev_close, just make 
it simple. During configure_msix, it do use the real useful queue number 
to set queue/vector mapping, refer xxx_configure_msix().

Reply via email to