net/mlx5: fix secondary process resource leakage
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") Cc: stable@dpdk.org Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
This commit is contained in:
parent
9da1db6bbf
commit
09e0fd260e
@ -35,6 +35,12 @@ mlx5_socket_init(struct rte_eth_dev *dev)
|
||||
int ret;
|
||||
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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user