From: Xueming Li Date: Tue, 6 Feb 2018 12:54:22 +0000 (+0800) Subject: net/mlx5: fix close after start failure X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=8c5bca92c92cce90239ca813f293f3df53427775;p=dpdk.git net/mlx5: fix close after start failure This patch fixed primary socket assertion error during close on a device that failed to start. Fixes: f8b9a3bad467 ("net/mlx5: install a socket to exchange a file descriptor") Cc: stable@dpdk.org Signed-off-by: Xueming Li Acked-by: Nelio Laranjeiro --- diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index d62c74701a..6c0985bd69 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -201,7 +201,8 @@ mlx5_dev_close(struct rte_eth_dev *dev) rte_free(priv->rss_conf.rss_key); if (priv->reta_idx != NULL) rte_free(priv->reta_idx); - priv_socket_uninit(priv); + if (priv->primary_socket) + priv_socket_uninit(priv); ret = mlx5_priv_hrxq_ibv_verify(priv); if (ret) WARN("%p: some Hash Rx queue still remain", (void *)priv);