[dpdk-stable] [PATCH 15/67] net/mlx5: fix close after start failure

Yongseok Koh yskoh at mellanox.com
Tue Jun 5 02:10:37 CEST 2018


From: Xueming Li <xuemingl at mellanox.com>

[ upstream commit 8c5bca92c92cce90239ca813f293f3df53427775 ]

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 at dpdk.org

Signed-off-by: Xueming Li <xuemingl at mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro at 6wind.com>
---
 drivers/net/mlx5/mlx5.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index f83508cf9..6ad5aa7e3 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -243,7 +243,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);
-- 
2.11.0



More information about the stable mailing list