DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH v2] app/proc-info: add rte_eal_cleanup() to avoid memory leak
@ 2022-09-04 12:28 Fidaullah Noonari
  2023-07-16 17:46 ` Stephen Hemminger
  2024-10-04  2:48 ` [PATCH v3] " Stephen Hemminger
  0 siblings, 2 replies; 5+ messages in thread
From: Fidaullah Noonari @ 2022-09-04 12:28 UTC (permalink / raw)
  To: stephen; +Cc: dev, Fidaullah Noonari

when app is launched with -m proc-info exit without
rte_eal_cleanup() causing memory leakage. This commit resolves the
memory leakage issue and closes app properly.

Bugzilla id: 898

Signed-off-by: Fidaullah Noonari <fidaullah.noonari@emumba.com>
---
 app/proc-info/main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/proc-info/main.c b/app/proc-info/main.c
index 1bfba5f60d..9cfcce31ab 100644
--- a/app/proc-info/main.c
+++ b/app/proc-info/main.c
@@ -1523,7 +1523,7 @@ main(int argc, char **argv)
 
 	if (mem_info) {
 		meminfo_display();
-		return 0;
+		goto cleanup;
 	}
 
 	nb_ports = rte_eth_dev_count_avail();
@@ -1593,6 +1593,7 @@ main(int argc, char **argv)
 	RTE_ETH_FOREACH_DEV(i)
 		rte_eth_dev_close(i);
 
+cleanup:
 	ret = rte_eal_cleanup();
 	if (ret)
 		printf("Error from rte_eal_cleanup(), %d\n", ret);
-- 
2.25.1


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

* Re: [PATCH v2] app/proc-info: add rte_eal_cleanup() to avoid memory leak
  2022-09-04 12:28 [PATCH v2] app/proc-info: add rte_eal_cleanup() to avoid memory leak Fidaullah Noonari
@ 2023-07-16 17:46 ` Stephen Hemminger
  2024-10-04  2:48 ` [PATCH v3] " Stephen Hemminger
  1 sibling, 0 replies; 5+ messages in thread
From: Stephen Hemminger @ 2023-07-16 17:46 UTC (permalink / raw)
  To: Fidaullah Noonari; +Cc: dev

On Sun,  4 Sep 2022 17:28:45 +0500
Fidaullah Noonari <fidaullah.noonari@emumba.com> wrote:

> when app is launched with -m proc-info exit without
> rte_eal_cleanup() causing memory leakage. This commit resolves the
> memory leakage issue and closes app properly.
> 
> Bugzilla id: 898

The new eventdev stats could have the same problem.

Acked-by: Stephen Hemminger <stephen@networkplumber.org>

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

* [PATCH v3] app/proc-info: add rte_eal_cleanup() to avoid memory leak
  2022-09-04 12:28 [PATCH v2] app/proc-info: add rte_eal_cleanup() to avoid memory leak Fidaullah Noonari
  2023-07-16 17:46 ` Stephen Hemminger
@ 2024-10-04  2:48 ` Stephen Hemminger
  2024-10-09  1:22   ` fengchengwen
  1 sibling, 1 reply; 5+ messages in thread
From: Stephen Hemminger @ 2024-10-04  2:48 UTC (permalink / raw)
  To: dev; +Cc: Fidaullah Noonari, Stephen Hemminger

From: Fidaullah Noonari <fidaullah.noonari@emumba.com>

when app is launched with -m proc-info exit without
rte_eal_cleanup() causing memory leakage. This commit resolves the
memory leakage issue and closes app properly.

Bugzilla id: 898
Signed-off-by: Fidaullah Noonari <fidaullah.noonari@emumba.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
v3 - handle eventdev_xstats as well
     rebase to 24.11

 app/proc-info/main.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/app/proc-info/main.c b/app/proc-info/main.c
index b672aaefbe..4a558705cc 100644
--- a/app/proc-info/main.c
+++ b/app/proc-info/main.c
@@ -2166,11 +2166,11 @@ main(int argc, char **argv)
 
 	if (mem_info) {
 		meminfo_display();
-		return 0;
+		goto cleanup;
 	}
 
 	if (eventdev_xstats() > 0)
-		return 0;
+		goto cleanup;
 
 	nb_ports = rte_eth_dev_count_avail();
 	if (nb_ports == 0)
@@ -2251,6 +2251,7 @@ main(int argc, char **argv)
 	RTE_ETH_FOREACH_DEV(i)
 		rte_eth_dev_close(i);
 
+cleanup:
 	ret = rte_eal_cleanup();
 	if (ret)
 		printf("Error from rte_eal_cleanup(), %d\n", ret);
-- 
2.45.2


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

* Re: [PATCH v3] app/proc-info: add rte_eal_cleanup() to avoid memory leak
  2024-10-04  2:48 ` [PATCH v3] " Stephen Hemminger
@ 2024-10-09  1:22   ` fengchengwen
  2024-11-19 20:51     ` Thomas Monjalon
  0 siblings, 1 reply; 5+ messages in thread
From: fengchengwen @ 2024-10-09  1:22 UTC (permalink / raw)
  To: Stephen Hemminger, dev; +Cc: Fidaullah Noonari

Acked-by: Chengwen Feng <fengchengwen@huawei.com>

On 2024/10/4 10:48, Stephen Hemminger wrote:
> From: Fidaullah Noonari <fidaullah.noonari@emumba.com>
> 
> when app is launched with -m proc-info exit without
> rte_eal_cleanup() causing memory leakage. This commit resolves the
> memory leakage issue and closes app properly.
> 
> Bugzilla id: 898
> Signed-off-by: Fidaullah Noonari <fidaullah.noonari@emumba.com>
> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
> v3 - handle eventdev_xstats as well
>      rebase to 24.11


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

* Re: [PATCH v3] app/proc-info: add rte_eal_cleanup() to avoid memory leak
  2024-10-09  1:22   ` fengchengwen
@ 2024-11-19 20:51     ` Thomas Monjalon
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2024-11-19 20:51 UTC (permalink / raw)
  To: Stephen Hemminger, Fidaullah Noonari; +Cc: dev, fengchengwen

09/10/2024 03:22, fengchengwen:
> On 2024/10/4 10:48, Stephen Hemminger wrote:
> > From: Fidaullah Noonari <fidaullah.noonari@emumba.com>
> > 
> > when app is launched with -m proc-info exit without
> > rte_eal_cleanup() causing memory leakage. This commit resolves the
> > memory leakage issue and closes app properly.
> > 
> > Bugzilla id: 898
> > Signed-off-by: Fidaullah Noonari <fidaullah.noonari@emumba.com>
> > Acked-by: Stephen Hemminger <stephen@networkplumber.org>
> 
> Acked-by: Chengwen Feng <fengchengwen@huawei.com>

Applied, thanks.



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

end of thread, other threads:[~2024-11-19 20:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-04 12:28 [PATCH v2] app/proc-info: add rte_eal_cleanup() to avoid memory leak Fidaullah Noonari
2023-07-16 17:46 ` Stephen Hemminger
2024-10-04  2:48 ` [PATCH v3] " Stephen Hemminger
2024-10-09  1:22   ` fengchengwen
2024-11-19 20:51     ` Thomas Monjalon

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).