@@ -33,7 +33,7 @@ struct mlx5_irq {
33
33
};
34
34
35
35
struct mlx5_irq_table {
36
- struct mlx5_irq_pool * pf_pool ;
36
+ struct mlx5_irq_pool * pcif_pool ;
37
37
struct mlx5_irq_pool * sf_ctrl_pool ;
38
38
struct mlx5_irq_pool * sf_comp_pool ;
39
39
};
@@ -337,7 +337,7 @@ struct mlx5_irq_pool *mlx5_irq_pool_get(struct mlx5_core_dev *dev)
337
337
/* In some configs, there won't be a pool of SFs IRQs. Hence, returning
338
338
* the PF IRQs pool in case the SF pool doesn't exist.
339
339
*/
340
- return pool ? pool : irq_table -> pf_pool ;
340
+ return pool ? pool : irq_table -> pcif_pool ;
341
341
}
342
342
343
343
static struct mlx5_irq_pool * ctrl_irq_pool_get (struct mlx5_core_dev * dev )
@@ -351,7 +351,7 @@ static struct mlx5_irq_pool *ctrl_irq_pool_get(struct mlx5_core_dev *dev)
351
351
/* In some configs, there won't be a pool of SFs IRQs. Hence, returning
352
352
* the PF IRQs pool in case the SF pool doesn't exist.
353
353
*/
354
- return pool ? pool : irq_table -> pf_pool ;
354
+ return pool ? pool : irq_table -> pcif_pool ;
355
355
}
356
356
357
357
/**
@@ -426,7 +426,7 @@ struct mlx5_irq *mlx5_irq_request(struct mlx5_core_dev *dev, u16 vecidx,
426
426
struct mlx5_irq_pool * pool ;
427
427
struct mlx5_irq * irq ;
428
428
429
- pool = irq_table -> pf_pool ;
429
+ pool = irq_table -> pcif_pool ;
430
430
irq = irq_pool_request_vector (pool , vecidx , af_desc );
431
431
if (IS_ERR (irq ))
432
432
return irq ;
@@ -519,20 +519,20 @@ static void irq_pool_free(struct mlx5_irq_pool *pool)
519
519
kvfree (pool );
520
520
}
521
521
522
- static int irq_pools_init (struct mlx5_core_dev * dev , int sf_vec , int pf_vec )
522
+ static int irq_pools_init (struct mlx5_core_dev * dev , int sf_vec , int pcif_vec )
523
523
{
524
524
struct mlx5_irq_table * table = dev -> priv .irq_table ;
525
525
int num_sf_ctrl_by_msix ;
526
526
int num_sf_ctrl_by_sfs ;
527
527
int num_sf_ctrl ;
528
528
int err ;
529
529
530
- /* init pf_pool */
531
- table -> pf_pool = irq_pool_alloc (dev , 0 , pf_vec , NULL ,
532
- MLX5_EQ_SHARE_IRQ_MIN_COMP ,
533
- MLX5_EQ_SHARE_IRQ_MAX_COMP );
534
- if (IS_ERR (table -> pf_pool ))
535
- return PTR_ERR (table -> pf_pool );
530
+ /* init pcif_pool */
531
+ table -> pcif_pool = irq_pool_alloc (dev , 0 , pcif_vec , NULL ,
532
+ MLX5_EQ_SHARE_IRQ_MIN_COMP ,
533
+ MLX5_EQ_SHARE_IRQ_MAX_COMP );
534
+ if (IS_ERR (table -> pcif_pool ))
535
+ return PTR_ERR (table -> pcif_pool );
536
536
if (!mlx5_sf_max_functions (dev ))
537
537
return 0 ;
538
538
if (sf_vec < MLX5_IRQ_VEC_COMP_BASE_SF ) {
@@ -546,7 +546,7 @@ static int irq_pools_init(struct mlx5_core_dev *dev, int sf_vec, int pf_vec)
546
546
MLX5_SFS_PER_CTRL_IRQ );
547
547
num_sf_ctrl = min_t (int , num_sf_ctrl_by_msix , num_sf_ctrl_by_sfs );
548
548
num_sf_ctrl = min_t (int , MLX5_IRQ_CTRL_SF_MAX , num_sf_ctrl );
549
- table -> sf_ctrl_pool = irq_pool_alloc (dev , pf_vec , num_sf_ctrl ,
549
+ table -> sf_ctrl_pool = irq_pool_alloc (dev , pcif_vec , num_sf_ctrl ,
550
550
"mlx5_sf_ctrl" ,
551
551
MLX5_EQ_SHARE_IRQ_MIN_CTRL ,
552
552
MLX5_EQ_SHARE_IRQ_MAX_CTRL );
@@ -555,7 +555,7 @@ static int irq_pools_init(struct mlx5_core_dev *dev, int sf_vec, int pf_vec)
555
555
goto err_pf ;
556
556
}
557
557
/* init sf_comp_pool */
558
- table -> sf_comp_pool = irq_pool_alloc (dev , pf_vec + num_sf_ctrl ,
558
+ table -> sf_comp_pool = irq_pool_alloc (dev , pcif_vec + num_sf_ctrl ,
559
559
sf_vec - num_sf_ctrl , "mlx5_sf_comp" ,
560
560
MLX5_EQ_SHARE_IRQ_MIN_COMP ,
561
561
MLX5_EQ_SHARE_IRQ_MAX_COMP );
@@ -577,7 +577,7 @@ static int irq_pools_init(struct mlx5_core_dev *dev, int sf_vec, int pf_vec)
577
577
err_sf_ctrl :
578
578
irq_pool_free (table -> sf_ctrl_pool );
579
579
err_pf :
580
- irq_pool_free (table -> pf_pool );
580
+ irq_pool_free (table -> pcif_pool );
581
581
return err ;
582
582
}
583
583
@@ -587,7 +587,7 @@ static void irq_pools_destroy(struct mlx5_irq_table *table)
587
587
irq_pool_free (table -> sf_comp_pool );
588
588
irq_pool_free (table -> sf_ctrl_pool );
589
589
}
590
- irq_pool_free (table -> pf_pool );
590
+ irq_pool_free (table -> pcif_pool );
591
591
}
592
592
593
593
/* irq_table API */
@@ -618,9 +618,9 @@ void mlx5_irq_table_cleanup(struct mlx5_core_dev *dev)
618
618
619
619
int mlx5_irq_table_get_num_comp (struct mlx5_irq_table * table )
620
620
{
621
- if (!table -> pf_pool -> xa_num_irqs .max )
621
+ if (!table -> pcif_pool -> xa_num_irqs .max )
622
622
return 1 ;
623
- return table -> pf_pool -> xa_num_irqs .max - table -> pf_pool -> xa_num_irqs .min ;
623
+ return table -> pcif_pool -> xa_num_irqs .max - table -> pcif_pool -> xa_num_irqs .min ;
624
624
}
625
625
626
626
int mlx5_irq_table_create (struct mlx5_core_dev * dev )
@@ -629,26 +629,26 @@ int mlx5_irq_table_create(struct mlx5_core_dev *dev)
629
629
MLX5_CAP_GEN (dev , max_num_eqs ) :
630
630
1 << MLX5_CAP_GEN (dev , log_max_eq );
631
631
int total_vec ;
632
- int pf_vec ;
632
+ int pcif_vec ;
633
633
int err ;
634
634
635
635
if (mlx5_core_is_sf (dev ))
636
636
return 0 ;
637
637
638
- pf_vec = MLX5_CAP_GEN (dev , num_ports ) * num_online_cpus () + 1 ;
639
- pf_vec = min_t (int , pf_vec , num_eqs );
638
+ pcif_vec = MLX5_CAP_GEN (dev , num_ports ) * num_online_cpus () + 1 ;
639
+ pcif_vec = min_t (int , pcif_vec , num_eqs );
640
640
641
- total_vec = pf_vec ;
641
+ total_vec = pcif_vec ;
642
642
if (mlx5_sf_max_functions (dev ))
643
643
total_vec += MLX5_IRQ_CTRL_SF_MAX +
644
644
MLX5_COMP_EQS_PER_SF * mlx5_sf_max_functions (dev );
645
645
646
646
total_vec = pci_alloc_irq_vectors (dev -> pdev , 1 , total_vec , PCI_IRQ_MSIX );
647
647
if (total_vec < 0 )
648
648
return total_vec ;
649
- pf_vec = min (pf_vec , total_vec );
649
+ pcif_vec = min (pcif_vec , total_vec );
650
650
651
- err = irq_pools_init (dev , total_vec - pf_vec , pf_vec );
651
+ err = irq_pools_init (dev , total_vec - pcif_vec , pcif_vec );
652
652
if (err )
653
653
pci_free_irq_vectors (dev -> pdev );
654
654
0 commit comments