Skip to content

Commit

Permalink
net/mlx5: Fix wrong comment
Browse files Browse the repository at this point in the history
A control irq may be allocated from the parent device's pool in case
there is no SF dedicated pool. This could happen when there are not
enough vectors available for SFs.

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>
  • Loading branch information
Eli Cohen authored and Saeed Mahameed committed Mar 24, 2023
1 parent b94616d commit 40a252c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,9 @@ struct mlx5_irq *mlx5_ctrl_irq_request(struct mlx5_core_dev *dev)
return ERR_PTR(-ENOMEM);
cpumask_copy(req_mask, cpu_online_mask);
if (!mlx5_irq_pool_is_sf_pool(pool)) {
/* In case we are allocating a control IRQ for PF/VF */
/* In case we are allocating a control IRQ from a pci device's pool.
* This can happen also for a SF if the SFs pool is empty.
*/
if (!pool->xa_num_irqs.max) {
cpumask_clear(req_mask);
/* In case we only have a single IRQ for PF/VF */
Expand Down

0 comments on commit 40a252c

Please sign in to comment.