]> git.itanic.dy.fi Git - linux-stable/commit
net/mlx5: Use dynamic msix vectors allocation
authorEli Cohen <elic@nvidia.com>
Sun, 1 Jan 2023 06:16:23 +0000 (08:16 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Fri, 24 Mar 2023 23:04:29 +0000 (16:04 -0700)
commit3354822cde5a9f72aa725b3c619188b149a71a33
treece1c2e74b7b938730f5a153f899a0a7deafa3c8c
parentb48a0f72bc3e5b10f55b3d40f051135fc9afd0e5
net/mlx5: Use dynamic msix vectors allocation

Current implementation calculates the number and the partitioaning of
available interrupts vectors and then allocates all the interrupt
vectors.

Here, whenever dynamic msix allocation is supported, we change this to
use msix vectors dynamically so a vectors is actually allocated only
when needed. The current pool logic is kept in place to take care of
partitioning the vectors between the consumers and take care of
reference counting. However, the vectors are allocated only when needed.

Subsequent patches will make use of this to allocate vectors for VDPA.

Signed-off-by: Eli Cohen <elic@nvidia.com>
Reviewed-by: Shay Drory <shayd@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
drivers/net/ethernet/mellanox/mlx5/core/eq.c
drivers/net/ethernet/mellanox/mlx5/core/irq_affinity.c
drivers/net/ethernet/mellanox/mlx5/core/main.c
drivers/net/ethernet/mellanox/mlx5/core/mlx5_irq.h
drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c
drivers/net/ethernet/mellanox/mlx5/core/pci_irq.h