@@ -33,7 +33,7 @@ struct mlx5_irq {
3333};
3434
3535struct mlx5_irq_table {
36- struct mlx5_irq_pool * pf_pool ;
36+ struct mlx5_irq_pool * pcif_pool ;
3737 struct mlx5_irq_pool * sf_ctrl_pool ;
3838 struct mlx5_irq_pool * sf_comp_pool ;
3939};
@@ -337,7 +337,7 @@ struct mlx5_irq_pool *mlx5_irq_pool_get(struct mlx5_core_dev *dev)
337337 /* In some configs, there won't be a pool of SFs IRQs. Hence, returning
338338 * the PF IRQs pool in case the SF pool doesn't exist.
339339 */
340- return pool ? pool : irq_table -> pf_pool ;
340+ return pool ? pool : irq_table -> pcif_pool ;
341341}
342342
343343static 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)
351351 /* In some configs, there won't be a pool of SFs IRQs. Hence, returning
352352 * the PF IRQs pool in case the SF pool doesn't exist.
353353 */
354- return pool ? pool : irq_table -> pf_pool ;
354+ return pool ? pool : irq_table -> pcif_pool ;
355355}
356356
357357/**
@@ -426,7 +426,7 @@ struct mlx5_irq *mlx5_irq_request(struct mlx5_core_dev *dev, u16 vecidx,
426426 struct mlx5_irq_pool * pool ;
427427 struct mlx5_irq * irq ;
428428
429- pool = irq_table -> pf_pool ;
429+ pool = irq_table -> pcif_pool ;
430430 irq = irq_pool_request_vector (pool , vecidx , af_desc );
431431 if (IS_ERR (irq ))
432432 return irq ;
@@ -519,20 +519,20 @@ static void irq_pool_free(struct mlx5_irq_pool *pool)
519519 kvfree (pool );
520520}
521521
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 )
523523{
524524 struct mlx5_irq_table * table = dev -> priv .irq_table ;
525525 int num_sf_ctrl_by_msix ;
526526 int num_sf_ctrl_by_sfs ;
527527 int num_sf_ctrl ;
528528 int err ;
529529
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 );
536536 if (!mlx5_sf_max_functions (dev ))
537537 return 0 ;
538538 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)
546546 MLX5_SFS_PER_CTRL_IRQ );
547547 num_sf_ctrl = min_t (int , num_sf_ctrl_by_msix , num_sf_ctrl_by_sfs );
548548 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 ,
550550 "mlx5_sf_ctrl" ,
551551 MLX5_EQ_SHARE_IRQ_MIN_CTRL ,
552552 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)
555555 goto err_pf ;
556556 }
557557 /* 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 ,
559559 sf_vec - num_sf_ctrl , "mlx5_sf_comp" ,
560560 MLX5_EQ_SHARE_IRQ_MIN_COMP ,
561561 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)
577577err_sf_ctrl :
578578 irq_pool_free (table -> sf_ctrl_pool );
579579err_pf :
580- irq_pool_free (table -> pf_pool );
580+ irq_pool_free (table -> pcif_pool );
581581 return err ;
582582}
583583
@@ -587,7 +587,7 @@ static void irq_pools_destroy(struct mlx5_irq_table *table)
587587 irq_pool_free (table -> sf_comp_pool );
588588 irq_pool_free (table -> sf_ctrl_pool );
589589 }
590- irq_pool_free (table -> pf_pool );
590+ irq_pool_free (table -> pcif_pool );
591591}
592592
593593/* irq_table API */
@@ -618,9 +618,9 @@ void mlx5_irq_table_cleanup(struct mlx5_core_dev *dev)
618618
619619int mlx5_irq_table_get_num_comp (struct mlx5_irq_table * table )
620620{
621- if (!table -> pf_pool -> xa_num_irqs .max )
621+ if (!table -> pcif_pool -> xa_num_irqs .max )
622622 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 ;
624624}
625625
626626int mlx5_irq_table_create (struct mlx5_core_dev * dev )
@@ -629,26 +629,26 @@ int mlx5_irq_table_create(struct mlx5_core_dev *dev)
629629 MLX5_CAP_GEN (dev , max_num_eqs ) :
630630 1 << MLX5_CAP_GEN (dev , log_max_eq );
631631 int total_vec ;
632- int pf_vec ;
632+ int pcif_vec ;
633633 int err ;
634634
635635 if (mlx5_core_is_sf (dev ))
636636 return 0 ;
637637
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 );
640640
641- total_vec = pf_vec ;
641+ total_vec = pcif_vec ;
642642 if (mlx5_sf_max_functions (dev ))
643643 total_vec += MLX5_IRQ_CTRL_SF_MAX +
644644 MLX5_COMP_EQS_PER_SF * mlx5_sf_max_functions (dev );
645645
646646 total_vec = pci_alloc_irq_vectors (dev -> pdev , 1 , total_vec , PCI_IRQ_MSIX );
647647 if (total_vec < 0 )
648648 return total_vec ;
649- pf_vec = min (pf_vec , total_vec );
649+ pcif_vec = min (pcif_vec , total_vec );
650650
651- err = irq_pools_init (dev , total_vec - pf_vec , pf_vec );
651+ err = irq_pools_init (dev , total_vec - pcif_vec , pcif_vec );
652652 if (err )
653653 pci_free_irq_vectors (dev -> pdev );
654654
0 commit comments