From: Matan Azrad Date: Mon, 2 Jul 2018 05:13:18 +0000 (+0000) Subject: net/mlx5: activate Verbs cleanup on removal X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=1ff30d182ca71dad31cd840ef0af8ea755c95767;p=dpdk.git net/mlx5: activate Verbs cleanup on removal Starting from rdma-core v19, Mellanox OFED 4.4, the Verbs resources cleanup is properly activated in plug-out process when setting the MLX5_DEVICE_FATAL_CLEANUP environment variable to 1. Set the aforementioned variable to 1. Signed-off-by: Matan Azrad Acked-by: Yongseok Koh --- diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index f0e6ed7267..d081bdd05e 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -1409,6 +1409,11 @@ rte_mlx5_pmd_init(void) /* Match the size of Rx completion entry to the size of a cacheline. */ if (RTE_CACHE_LINE_SIZE == 128) setenv("MLX5_CQE_SIZE", "128", 0); + /* + * MLX5_DEVICE_FATAL_CLEANUP tells ibv_destroy functions to + * cleanup all the Verbs resources even when the device was removed. + */ + setenv("MLX5_DEVICE_FATAL_CLEANUP", "1", 1); #ifdef RTE_LIBRTE_MLX5_DLOPEN_DEPS if (mlx5_glue_init()) return;