diff options
| author | Piotr Raczynski <[email protected]> | 2023-05-15 19:03:18 +0000 |
|---|---|---|
| committer | Tony Nguyen <[email protected]> | 2023-05-16 16:38:38 +0000 |
| commit | cfebc0a36ea5518d6b32a6999da5accf0a94fafa (patch) | |
| tree | 88ada2e93091ff1031061fdce47b34a52c98e1a3 /drivers/net/ethernet/intel/ice/ice_irq.h | |
| parent | ice: add individual interrupt allocation (diff) | |
| download | kernel-cfebc0a36ea5518d6b32a6999da5accf0a94fafa.tar.gz kernel-cfebc0a36ea5518d6b32a6999da5accf0a94fafa.zip | |
ice: track interrupt vectors with xarray
Replace custom interrupt tracker with generic xarray data structure.
Remove all code responsible for searching for a new entry with xa_alloc,
which always tries to allocate at the lowes possible index. As a result
driver is always using a contiguous region of the MSIX vector table.
New tracker keeps ice_irq_entry entries in xarray as opaque for the rest
of the driver hiding the entry details from the caller.
Reviewed-by: Jacob Keller <[email protected]>
Reviewed-by: Michal Swiatkowski <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Tested-by: Pucha Himasekhar Reddy <[email protected]> (A Contingent worker at Intel)
Signed-off-by: Piotr Raczynski <[email protected]>
Signed-off-by: Tony Nguyen <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_irq.h')
| -rw-r--r-- | drivers/net/ethernet/intel/ice/ice_irq.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_irq.h b/drivers/net/ethernet/intel/ice/ice_irq.h index 26e80dfe22b5..da5cdb1f0d3a 100644 --- a/drivers/net/ethernet/intel/ice/ice_irq.h +++ b/drivers/net/ethernet/intel/ice/ice_irq.h @@ -4,6 +4,15 @@ #ifndef _ICE_IRQ_H_ #define _ICE_IRQ_H_ +struct ice_irq_entry { + unsigned int index; +}; + +struct ice_irq_tracker { + struct xarray entries; + u16 num_entries; /* total vectors available */ +}; + int ice_init_interrupt_scheme(struct ice_pf *pf); void ice_clear_interrupt_scheme(struct ice_pf *pf); |
