aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/mlx5/mlx5_socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/mlx5/mlx5_socket.c')
-rw-r--r--drivers/net/mlx5/mlx5_socket.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/mlx5/mlx5_socket.c b/drivers/net/mlx5/mlx5_socket.c
index 7ab31000..97f90c07 100644
--- a/drivers/net/mlx5/mlx5_socket.c
+++ b/drivers/net/mlx5/mlx5_socket.c
@@ -62,6 +62,12 @@ mlx5_socket_init(struct rte_eth_dev *dev)
int flags;
/*
+ * Close the last socket that was used to communicate
+ * with the secondary process
+ */
+ if (priv->primary_socket)
+ mlx5_socket_uninit(dev);
+ /*
* Initialise the socket to communicate with the secondary
* process.
*/