• Preethi Banala's avatar
    ice: Split irq_tracker into sw_irq_tracker and hw_irq_tracker · eb0208ec
    Preethi Banala authored
    For the PF driver, when mapping interrupts to queues, we need to request
    IRQs from the kernel and we also have to allocate interrupts from
    the device.
    
    Similarly, when the VF driver (iavf.ko) initializes, it requests the kernel
    IRQs that it needs but it can't directly allocate interrupts in the device.
    Instead, it sends a mailbox message to the ice driver, which then allocates
    interrupts in the device on the VF driver's behalf.
    
    Currently both these cases end up having to reserve entries in
    pf->irq_tracker but irq_tracker itself is sized based on how many vectors
    the PF driver needs. Under the right circumstances, the VF driver can fail
    to get entries in irq_tracker, which will result in the VF driver failing
    probe.
    
    To fix this, sw_irq_tracker and hw_irq_tracker are introduced. The
    sw_irq_tracker tracks only the PF's IRQ request and doesn't play any
    role in VF init. hw_irq_tracker represents the device's interrupt space.
    When interrupts have to be allocated in the device for either PF or VF,
    hw_irq_tracker will be looked up to see if the device has run out of
    interrupts.
    Signed-off-by: default avatarPreethi Banala <preethi.banala@intel.com>
    Signed-off-by: default avatarAnirudh Venkataramanan <anirudh.venkataramanan@intel.com>
    Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
    Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
    eb0208ec
ice.h 10.3 KB