aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ice/ice.h
diff options
context:
space:
mode:
authorMichal Swiatkowski <[email protected]>2024-12-03 06:58:16 +0000
committerTony Nguyen <[email protected]>2025-02-05 17:04:57 +0000
commita203163274a48501c88d96625c173773e3d7c6a0 (patch)
treed0371d9f84fc8f83da69e99e5c173c771079e13e /drivers/net/ethernet/intel/ice/ice.h
parentice: enable_rdma devlink param (diff)
downloadkernel-a203163274a48501c88d96625c173773e3d7c6a0.tar.gz
kernel-a203163274a48501c88d96625c173773e3d7c6a0.zip
ice: simplify VF MSI-X managing
After implementing pf->msix.max field, base vector for other use cases (like VFs) can be fixed. This simplify code when changing MSI-X amount on particular VF, because there is no need to move a base vector. A fixed base vector allows to reserve vectors from the beginning instead of from the end, which is also simpler in code. Store total and rest value in the same struct as max and min for PF. Move tracking vectors from ice_sriov.c to ice_irq.c as it can be also use for other none PF use cases (SIOV). Tested-by: Rafal Romanowski <[email protected]> Signed-off-by: Michal Swiatkowski <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice.h')
-rw-r--r--drivers/net/ethernet/intel/ice/ice.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h
index 0dbc98ba69f4..2a6de2115193 100644
--- a/drivers/net/ethernet/intel/ice/ice.h
+++ b/drivers/net/ethernet/intel/ice/ice.h
@@ -543,6 +543,8 @@ struct ice_pf_msix {
u32 cur;
u32 min;
u32 max;
+ u32 total;
+ u32 rest;
};
struct ice_pf {
@@ -559,13 +561,7 @@ struct ice_pf {
/* OS reserved IRQ details */
struct msix_entry *msix_entries;
struct ice_irq_tracker irq_tracker;
- /* First MSIX vector used by SR-IOV VFs. Calculated by subtracting the
- * number of MSIX vectors needed for all SR-IOV VFs from the number of
- * MSIX vectors allowed on this PF.
- */
- u16 sriov_base_vector;
- unsigned long *sriov_irq_bm; /* bitmap to track irq usage */
- u16 sriov_irq_size; /* size of the irq_bm bitmap */
+ struct ice_virt_irq_tracker virt_irq_tracker;
u16 ctrl_vsi_idx; /* control VSI index in pf->vsi array */