summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_mp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/mlx5/mlx5_mp.c')
-rw-r--r--drivers/net/mlx5/mlx5_mp.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/drivers/net/mlx5/mlx5_mp.c b/drivers/net/mlx5/mlx5_mp.c
index 71a2b66..701ee1d 100644
--- a/drivers/net/mlx5/mlx5_mp.c
+++ b/drivers/net/mlx5/mlx5_mp.c
@@ -131,9 +131,22 @@ exit:
return ret;
}
+/**
+ * Initialize by primary process.
+ */
+void
+mlx5_mp_init_primary(void)
+{
+ assert(rte_eal_process_type() == RTE_PROC_PRIMARY);
+ rte_mp_action_register(MLX5_MP_NAME, mp_primary_handle);
+}
+
+/**
+ * Un-initialize by primary process.
+ */
void
-mlx5_mp_init(void)
+mlx5_mp_uninit_primary(void)
{
- if (rte_eal_process_type() == RTE_PROC_PRIMARY)
- rte_mp_action_register(MLX5_MP_NAME, mp_primary_handle);
+ assert(rte_eal_process_type() == RTE_PROC_PRIMARY);
+ rte_mp_action_unregister(MLX5_MP_NAME);
}