OSDN Git Service

net/mlx5: Handle SF IRQ request in the absence of SF IRQ pool
authorMaher Sanalla <msanalla@nvidia.com>
Thu, 22 Jun 2023 16:05:46 +0000 (19:05 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Mon, 7 Aug 2023 17:53:51 +0000 (10:53 -0700)
commit54c5297801f3b9140c751c7f5660770c52dea24e
tree95cac9ba14c6d6bf27cfc53063e3c702bfbbf299
parent674dd4e2e04e7a62bfacf28129e0808f33395bdf
net/mlx5: Handle SF IRQ request in the absence of SF IRQ pool

In case the SF IRQ pool is not available due to setup limitations,
SF currently relies on the already allocated PF IRQs to fulfill
its IRQ vector requests.

However, with the dynamic EQ allocation introduced in the next patch,
it is possible that not all IRQs of PF will be allocated after the driver
is loaded. In such case, if a SF requests a completion IRQ without having
its own independent IRQ pool, SF will lack a PF IRQ to utilize.

To address this scenario, allocate an IRQ for the SF from the PF's IRQ pool
on demand. The new IRQ will be shared between the SF and it's PF.

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>
drivers/net/ethernet/mellanox/mlx5/core/eq.c
drivers/net/ethernet/mellanox/mlx5/core/irq_affinity.c