patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH v1] net/mlx5: fix secondary process resource leakage
@ 2018-07-31 22:36 Ophir Munk
  2018-08-01 10:07 ` Luca Boccassi
  0 siblings, 1 reply; 4+ messages in thread
From: Ophir Munk @ 2018-07-31 22:36 UTC (permalink / raw)
  To: Ophir Munk; +Cc: stable

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>
---
 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 99297d5..a3a5229 100644
--- a/drivers/net/mlx5/mlx5_socket.c
+++ b/drivers/net/mlx5/mlx5_socket.c
@@ -36,6 +36,12 @@
 	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.
 	 */
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-stable] [PATCH v1] net/mlx5: fix secondary process resource leakage
  2018-07-31 22:36 [dpdk-stable] [PATCH v1] net/mlx5: fix secondary process resource leakage Ophir Munk
@ 2018-08-01 10:07 ` Luca Boccassi
  2018-08-01 10:18   ` Ophir Munk
  0 siblings, 1 reply; 4+ messages in thread
From: Luca Boccassi @ 2018-08-01 10:07 UTC (permalink / raw)
  To: Ophir Munk; +Cc: stable

On Tue, 2018-07-31 at 22:36 +0000, Ophir Munk wrote:
> 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>
> ---
>  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 99297d5..a3a5229 100644
> --- a/drivers/net/mlx5/mlx5_socket.c
> +++ b/drivers/net/mlx5/mlx5_socket.c
> @@ -36,6 +36,12 @@
>  	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.
>  	 */

Hi,

Has this (or a version of this) been merged in master? For which of the
stable releases is this for?

-- 
Kind regards,
Luca Boccassi

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-stable] [PATCH v1] net/mlx5: fix secondary process resource leakage
  2018-08-01 10:07 ` Luca Boccassi
@ 2018-08-01 10:18   ` Ophir Munk
  0 siblings, 0 replies; 4+ messages in thread
From: Ophir Munk @ 2018-08-01 10:18 UTC (permalink / raw)
  To: Luca Boccassi; +Cc: stable, Thomas Monjalon, Olga Shern, Shahaf Shuler

Hi,
This patch will be merged to master.
In addition - it will probably be applied to earlier versions such as 17.11 and 18.05.

Regards,
Ophir

> -----Original Message-----
> From: Luca Boccassi [mailto:bluca@debian.org]
> Sent: Wednesday, August 01, 2018 1:07 PM
> To: Ophir Munk <ophirmu@mellanox.com>
> Cc: stable@dpdk.org
> Subject: Re: [dpdk-stable] [PATCH v1] net/mlx5: fix secondary process
> resource leakage
> 
> On Tue, 2018-07-31 at 22:36 +0000, Ophir Munk wrote:
> > 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>
> > ---
> >  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 99297d5..a3a5229 100644
> > --- a/drivers/net/mlx5/mlx5_socket.c
> > +++ b/drivers/net/mlx5/mlx5_socket.c
> > @@ -36,6 +36,12 @@
> >  	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.
> >  	 */
> 
> Hi,
> 
> Has this (or a version of this) been merged in master? For which of the stable
> releases is this for?
> 
> --
> Kind regards,
> Luca Boccassi

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dpdk-stable] [PATCH v1] net/mlx5: fix secondary process resource leakage
@ 2018-07-31 22:38 Ophir Munk
  0 siblings, 0 replies; 4+ messages in thread
From: Ophir Munk @ 2018-07-31 22:38 UTC (permalink / raw)
  To: dev, Shahaf Shuler; +Cc: Thomas Monjalon, Olga Shern, Ophir Munk, stable

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>
---
 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 99297d5..a3a5229 100644
--- a/drivers/net/mlx5/mlx5_socket.c
+++ b/drivers/net/mlx5/mlx5_socket.c
@@ -36,6 +36,12 @@
 	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.
 	 */
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-08-01 10:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-31 22:36 [dpdk-stable] [PATCH v1] net/mlx5: fix secondary process resource leakage Ophir Munk
2018-08-01 10:07 ` Luca Boccassi
2018-08-01 10:18   ` Ophir Munk
2018-07-31 22:38 Ophir Munk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).