net/mlx5: offset comp irq index in name by one
Subsystems (4)
PATCH 1/1 net/mlx5: offset comp irq index in name by one
The mlx5 comp irq name scheme is changed a little bit between commit 3663ad34bc70 ("net/mlx5: Shift control IRQ to the last index") and commit 3354822cde5a ("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.
--- drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c +3 -1
@@ -19,6 +19,7 @@#define MLX5_IRQ_CTRL_SF_MAX 8/* min num of vectors for SFs to be enabled */ #define MLX5_IRQ_VEC_COMP_BASE_SF 2 +#define MLX5_IRQ_VEC_COMP_BASE 1#define MLX5_EQ_SHARE_IRQ_MAX_COMP (8)#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)return ; } + vecidx -=MLX5_IRQ_VEC_COMP_BASE ;snprintf (name,MLX5_MAX_IRQ_NAME ,"mlx5_comp%d" , vecidx); }
@@ -585,7 +587,7 @@ struct mlx5_irq *mlx5_irq_request_vector(struct mlx5_core_dev *dev, u16 cpu,struct mlx5_irq_table *table =mlx5_irq_table_get (dev);struct mlx5_irq_pool *pool = table->pcif_pool;struct irq_affinity_desc af_desc; -int offset =1 ; +int offset =MLX5_IRQ_VEC_COMP_BASE ;if (!pool->xa_num_irqs.max) offset =0 ;
Signature · 1 line
2.34.1
kernel test robot
build botFYI: kernel test robot notices the stable kernel rule is not satisfied.
Hi,
Thanks for your patch.
FYI: kernel test robot notices the stable kernel rule is not satisfied.
The check is based on https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html#option-1
Rule: add the tag "Cc: [email protected]" in the sign-off area to have the patch automatically included in the stable tree.
Subject: [PATCH] net/mlx5: offset comp irq index in name by one
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Quoted 11 lines · Michael Liang
The mlx5 comp irq name scheme is changed a little bit between commit
3663ad34bc70("net/mlx5: Shift control IRQ to the last index") and commit3354822cde5a("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 3354822cde5a ("net/mlx5: Use dynamic msix vectors allocation")Reviewed-by Mohamed Khalfella <[email protected]>Reviewed-by Yuanyuan Zhong <[email protected]>Signed-off-by Michael Liang <[email protected]>
Quoted 33 lines
--- drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c +3
-1@@ -19,6 +19,7 @@#define MLX5_IRQ_CTRL_SF_MAX 8/* min num of vectors for SFs to be enabled */ #define MLX5_IRQ_VEC_COMP_BASE_SF 2 +#define MLX5_IRQ_VEC_COMP_BASE 1#define MLX5_EQ_SHARE_IRQ_MAX_COMP (8)#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)return ; } + vecidx -=MLX5_IRQ_VEC_COMP_BASE ;snprintf (name,MLX5_MAX_IRQ_NAME ,"mlx5_comp%d" , vecidx); }@@ -585,7 +587,7 @@ struct mlx5_irq *mlx5_irq_request_vector(struct mlx5_core_dev *dev, u16 cpu,struct mlx5_irq_table *table =mlx5_irq_table_get (dev);struct mlx5_irq_pool *pool = table->pcif_pool;struct irq_affinity_desc af_desc; -int offset =1 ; +int offset =MLX5_IRQ_VEC_COMP_BASE ;if (!pool->xa_num_irqs.max) offset =0 ;