linux/drivers/vfio
Maher Sanalla f14c1a14e6 net/mlx5: Allocate completion EQs dynamically
This commit enables the dynamic allocation of EQs at runtime, allowing
for more flexibility in managing completion EQs and reducing the memory
overhead of driver load. Whenever a CQ is created for a given vector
index, the driver will lookup to see if there is an already mapped
completion EQ for that vector, if so, utilize it. Otherwise, allocate a
new EQ on demand and then utilize it for the CQ completion events.

Add a protection lock to the EQ table to protect from concurrent EQ
creation attempts.

While at it, replace mlx5_vector2irqn()/mlx5_vector2eqn() with
mlx5_comp_eqn_get() and mlx5_comp_irqn_get() which will allocate an
EQ on demand if no EQ is found for the given vector.

Signed-off-by: Maher Sanalla <msanalla@nvidia.com>
Reviewed-by: Shay Drory <shayd@nvidia.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
2023-08-07 10:53:52 -07:00
..
cdx vfio/cdx: add support for CDX bus 2023-06-16 12:27:04 -06:00
fsl-mc VFIO updates for v6.5-rc1 2023-06-30 15:22:09 -07:00
mdev vfio/mdev: Move the compat_class initialization to module init 2023-06-27 12:05:26 -06:00
pci net/mlx5: Allocate completion EQs dynamically 2023-08-07 10:53:52 -07:00
platform vfio/platform: Cleanup Kconfig 2023-06-16 12:23:50 -06:00
container.c VFIO updates for v6.3-rc1 2023-02-25 11:52:57 -08:00
group.c driver core: class: remove module * from class_create() 2023-03-17 15:16:33 +01:00
iommufd.c vfio: Check the presence for iommufd callbacks in __vfio_register_dev() 2023-03-31 13:43:32 -03:00
iova_bitmap.c vfio/iova_bitmap: refactor iova_bitmap_set() to better handle page boundaries 2022-12-02 10:09:25 -07:00
Kconfig vfio/cdx: add support for CDX bus 2023-06-16 12:27:04 -06:00
Makefile vfio/cdx: add support for CDX bus 2023-06-16 12:27:04 -06:00
vfio_iommu_spapr_tce.c powerpc/iommu: Add iommu_ops to report capabilities and allow blocking domains 2023-03-15 00:51:46 +11:00
vfio_iommu_type1.c mm: ptep_get() conversion 2023-06-19 16:19:25 -07:00
vfio_main.c Driver core changes for 6.4-rc1 2023-04-27 11:53:57 -07:00
vfio.h VFIO updates for v6.3-rc1 2023-02-25 11:52:57 -08:00
virqfd.c vfio: Use GFP_KERNEL_ACCOUNT for userspace persistent allocations 2023-01-23 11:26:29 -07:00