[dpdk-stable] patch 'net/mlx5: fix secondary process resource leakage' has been queued to LTS release 17.11.4

Yongseok Koh yskoh at mellanox.com
Mon Aug 13 22:42:06 CEST 2018


Hi,

FYI, your patch has been queued to LTS release 17.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/15/18. So please
shout if anyone has objections.

Thanks.

Yongseok

---
>From a546122e90627552c02ffd5967a9f1f98edeccaa Mon Sep 17 00:00:00 2001
From: Ophir Munk <ophirmu at mellanox.com>
Date: Tue, 31 Jul 2018 22:38:04 +0000
Subject: [PATCH] net/mlx5: fix secondary process resource leakage

[ upstream commit 09e0fd260e2e414134154b6e0e955c8424b51c0a ]

When running testpmd with an mlx5 device and then executing at testpmd
prompt in a raw: "port start all" followed by "port stop all"
a new file named /var/tmp/net_mlx5_<socket num> is created as a result
of creating a new unix domain socket (used for communication between
the primary and secondary processes).
When the new unix socket file is created the old unix socket file should
have been removed. This commit fixes it by closing the old unix socket
just before creating the new one in function mlx5_socket_init()

Fixes: f8b9a3bad467 ("net/mlx5: install a socket to exchange a file descriptor")

Signed-off-by: Ophir Munk <ophirmu at mellanox.com>
---
 drivers/net/mlx5/mlx5_socket.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_socket.c b/drivers/net/mlx5/mlx5_socket.c
index 7ab310007..97f90c072 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.
 	 */
-- 
2.11.0



More information about the stable mailing list