net/mlx5: fix memory region cache init
authorXueming Li <xuemingl@mellanox.com>
Sat, 26 May 2018 13:27:35 +0000 (21:27 +0800)
committerShahaf Shuler <shahafs@mellanox.com>
Mon, 28 May 2018 14:28:43 +0000 (16:28 +0200)
commit0ace586dee70ce1842c858e27a3590417f8fb40c
tree9b6ce626318e268289d205a8a8e0d5c27dbe29af
parente89c15b6971e5040296dc69f8739dd629f56a4b2
net/mlx5: fix memory region cache init

MR cache init takes place on the device configuration.
When the device is re-configured multiple times, for example when
changing the number of queue on the flight, deadlock can happen.

This patch moved MR cache init from device configuration function to
probe function to make sure init only once.

Fixes: 974f1e7ef146 ("net/mlx5: add new memory region support")

Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
drivers/net/mlx5/mlx5.c
drivers/net/mlx5/mlx5_ethdev.c
drivers/net/mlx5/mlx5_mr.c