[v3,05/10] 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();
}
@@ -1907,7 +1907,7 @@ struct rte_pci_driver mlx5_driver = {
/**
* Driver initialization routine.
*/
-RTE_INIT(rte_mlx5_pmd_init)
+RTE_INIT_PRIO(rte_mlx5_pmd_init, CLASS)
{
/* Initialize driver log type. */
mlx5_logtype = rte_log_register("pmd.net.mlx5");
@@ -842,7 +842,7 @@ static struct rte_pci_driver mlx5_vdpa_driver = {
/**
* Driver initialization routine.
*/
-RTE_INIT(rte_mlx5_vdpa_init)
+RTE_INIT_PRIO(rte_mlx5_vdpa_init, CLASS)
{
/* Initialize common log type. */
mlx5_vdpa_logtype = rte_log_register("pmd.vdpa.mlx5");