diff mbox series

net/mlx5: activate Verbs cleanup on removal

Message ID 1530508398-17261-1-git-send-email-matan@mellanox.com (mailing list archive)
State Accepted, archived
Delegated to: Shahaf Shuler
Headers show
Series net/mlx5: activate Verbs cleanup on removal | expand

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Matan Azrad July 2, 2018, 5:13 a.m. UTC
Starting from rdma-core v19, Mellanox OFED 4.4, the Verbs resources
cleanup is properly activated in plug-out process while setting the
MLX5_DEVICE_FATAL_CLEANUP environment variable to 1.

Set the aforementioned variable to 1.

Signed-off-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Yongseok Koh July 2, 2018, 6:58 p.m. UTC | #1
> On Jul 1, 2018, at 10:13 PM, Matan Azrad <matan@mellanox.com> wrote:
> 
> Starting from rdma-core v19, Mellanox OFED 4.4, the Verbs resources
> cleanup is properly activated in plug-out process while setting the
> MLX5_DEVICE_FATAL_CLEANUP environment variable to 1.
> 
> Set the aforementioned variable to 1.
> 
> Signed-off-by: Matan Azrad <matan@mellanox.com>
> ---
Acked-by: Yongseok Koh <yskoh@mellanox.com>
 
Thanks
Shahaf Shuler July 3, 2018, 12:36 p.m. UTC | #2
Monday, July 2, 2018 9:58 PM, Yongseok Koh:
> Subject: Re: [dpdk-dev] [PATCH] net/mlx5: activate Verbs cleanup on
> removal
> 
> 
> > On Jul 1, 2018, at 10:13 PM, Matan Azrad <matan@mellanox.com> wrote:
> >
> > Starting from rdma-core v19, Mellanox OFED 4.4, the Verbs resources
> > cleanup is properly activated in plug-out process while setting the
> > MLX5_DEVICE_FATAL_CLEANUP environment variable to 1.
> >
> > Set the aforementioned variable to 1.
> >
> > Signed-off-by: Matan Azrad <matan@mellanox.com>
> > ---
> Acked-by: Yongseok Koh <yskoh@mellanox.com>

Applied to next-net-mlx, thanks. 

> 
> Thanks
diff mbox series

Patch

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index f0e6ed7..d081bdd 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -1409,6 +1409,11 @@ 
 	/* 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;