summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_ethdev.c
diff options
context:
space:
mode:
authorXueming Li <xuemingl@mellanox.com>2018-05-26 21:27:35 +0800
committerShahaf Shuler <shahafs@mellanox.com>2018-05-28 16:28:43 +0200
commit0ace586dee70ce1842c858e27a3590417f8fb40c (patch)
tree9b6ce626318e268289d205a8a8e0d5c27dbe29af /drivers/net/mlx5/mlx5_ethdev.c
parente89c15b6971e5040296dc69f8739dd629f56a4b2 (diff)
downloaddpdk-0ace586dee70ce1842c858e27a3590417f8fb40c.zip
dpdk-0ace586dee70ce1842c858e27a3590417f8fb40c.tar.gz
dpdk-0ace586dee70ce1842c858e27a3590417f8fb40c.tar.xz
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>
Diffstat (limited to 'drivers/net/mlx5/mlx5_ethdev.c')
-rw-r--r--drivers/net/mlx5/mlx5_ethdev.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index f6cebae..90488af 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -392,17 +392,6 @@ mlx5_dev_configure(struct rte_eth_dev *dev)
if (++j == rxqs_n)
j = 0;
}
- /*
- * Once the device is added to the list of memory event callback, its
- * global MR cache table cannot be expanded on the fly because of
- * deadlock. If it overflows, lookup should be done by searching MR list
- * linearly, which is slow.
- */
- if (mlx5_mr_btree_init(&priv->mr.cache, MLX5_MR_BTREE_CACHE_N * 2,
- dev->device->numa_node)) {
- /* rte_errno is already set. */
- return -rte_errno;
- }
return 0;
}