]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
ice: add dynamic interrupt allocation
authorPiotr Raczynski <piotr.raczynski@intel.com>
Mon, 15 May 2023 19:03:19 +0000 (21:03 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 16 May 2023 16:38:38 +0000 (09:38 -0700)
commit011670cc340cbc1131677fe233b1a52acee969ee
tree439b5731d00976d4f8395dd722a022db08260e1a
parentcfebc0a36ea5518d6b32a6999da5accf0a94fafa
ice: add dynamic interrupt allocation

Currently driver can only allocate interrupt vectors during init phase by
calling pci_alloc_irq_vectors. Change that and make use of new
pci_msix_alloc_irq_at/pci_msix_free_irq API and enable to allocate and free
more interrupts after MSIX has been enabled. Since not all platforms
supports dynamic allocation, check it with pci_msix_can_alloc_dyn.

Extend the tracker to keep track how many interrupts are allocated
initially so when all such vectors are already used, additional interrupts
are automatically allocated dynamically. Remember each interrupt allocation
method to then free appropriately. Since some features may require
interrupts allocated dynamically add appropriate VSI flag and take it into
account when allocating new interrupt.

Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
Signed-off-by: Piotr Raczynski <piotr.raczynski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice.h
drivers/net/ethernet/intel/ice/ice_base.c
drivers/net/ethernet/intel/ice/ice_idc.c
drivers/net/ethernet/intel/ice/ice_irq.c
drivers/net/ethernet/intel/ice/ice_irq.h
drivers/net/ethernet/intel/ice/ice_main.c
drivers/net/ethernet/intel/ice/ice_sriov.c