Skip to content

Commit 9f7e8fb

Browse files
mliang-purekuba-moo
authored andcommitted
net/mlx5: offset comp irq index in name by one
The mlx5 comp irq name scheme is changed a little bit between commit 3663ad3 ("net/mlx5: Shift control IRQ to the last index") and commit 3354822 ("net/mlx5: Use dynamic msix vectors allocation"). The index in the comp irq name used to start from 0 but now it starts from 1. There is nothing critical here, but it's harmless to change back to the old behavior, a.k.a starting from 0. Fixes: 3354822 ("net/mlx5: Use dynamic msix vectors allocation") Reviewed-by: Mohamed Khalfella <mkhalfella@purestorage.com> Reviewed-by: Yuanyuan Zhong <yzhong@purestorage.com> Signed-off-by: Michael Liang <mliang@purestorage.com> Reviewed-by: Shay Drory <shayd@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://lore.kernel.org/r/20240409190820.227554-4-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent c6e77aa commit 9f7e8fb

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • drivers/net/ethernet/mellanox/mlx5/core

drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#define MLX5_IRQ_CTRL_SF_MAX 8
2020
/* min num of vectors for SFs to be enabled */
2121
#define MLX5_IRQ_VEC_COMP_BASE_SF 2
22+
#define MLX5_IRQ_VEC_COMP_BASE 1
2223

2324
#define MLX5_EQ_SHARE_IRQ_MAX_COMP (8)
2425
#define MLX5_EQ_SHARE_IRQ_MAX_CTRL (UINT_MAX)
@@ -246,6 +247,7 @@ static void irq_set_name(struct mlx5_irq_pool *pool, char *name, int vecidx)
246247
return;
247248
}
248249

250+
vecidx -= MLX5_IRQ_VEC_COMP_BASE;
249251
snprintf(name, MLX5_MAX_IRQ_NAME, "mlx5_comp%d", vecidx);
250252
}
251253

@@ -585,7 +587,7 @@ struct mlx5_irq *mlx5_irq_request_vector(struct mlx5_core_dev *dev, u16 cpu,
585587
struct mlx5_irq_table *table = mlx5_irq_table_get(dev);
586588
struct mlx5_irq_pool *pool = table->pcif_pool;
587589
struct irq_affinity_desc af_desc;
588-
int offset = 1;
590+
int offset = MLX5_IRQ_VEC_COMP_BASE;
589591

590592
if (!pool->xa_num_irqs.max)
591593
offset = 0;

0 commit comments

Comments
 (0)