[v6,5/9] common/mlx5: use common rte priority
Checks
Commit Message
Use RTE_PRIO_COMMON for mlx5 common initialization and use
RTE_PRIO_CLASS for mlx5 net, vdpa PMDs.
This enables to do following initialization sequence.
(a) Initialize bus (say pci)
(b) Initialize common code of a driver (mlx5_common)
(c) Register mlx5 class PMDs (mlx5 net, mlx5 vdpa)
Information registered by these PMDs is used by mlx5_bus_pci PMD.
This mlx5 class PMDs should not confused with rte_class.
(d) Register mlx5 PCI bus PMD
Signed-off-by: Parav Pandit <parav@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
drivers/common/mlx5/mlx5_common.c | 2 +-
drivers/net/mlx5/mlx5.c | 2 +-
drivers/vdpa/mlx5/mlx5_vdpa.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
@@ -92,7 +92,7 @@ RTE_INIT_PRIO(mlx5_log_init, LOG)
/**
* Initialization routine for run-time dependency on glue library.
*/
-RTE_INIT_PRIO(mlx5_glue_init, CLASS)
+RTE_INIT_PRIO(mlx5_glue_init, COMMON)
{
mlx5_glue_constructor();
}
@@ -1912,7 +1912,7 @@ RTE_LOG_REGISTER(mlx5_logtype, pmd.net.mlx5, NOTICE)
/**
* Driver initialization routine.
*/
-RTE_INIT(rte_mlx5_pmd_init)
+RTE_INIT_PRIO(rte_mlx5_pmd_init, CLASS)
{
/* Build the static tables for Verbs conversion. */
mlx5_set_ptype_table();
@@ -844,7 +844,7 @@ RTE_LOG_REGISTER(mlx5_vdpa_logtype, pmd.vdpa.mlx5, NOTICE)
/**
* Driver initialization routine.
*/
-RTE_INIT(rte_mlx5_vdpa_init)
+RTE_INIT_PRIO(rte_mlx5_vdpa_init, CLASS)
{
if (mlx5_glue)
rte_pci_register(&mlx5_vdpa_driver);