* [PATCH] app/pdump: free mempool at cleanup resources
@ 2022-02-25 1:00 Tianli Lai
2022-02-25 2:40 ` Stephen Hemminger
0 siblings, 1 reply; 6+ messages in thread
From: Tianli Lai @ 2022-02-25 1:00 UTC (permalink / raw)
To: dev
the mempool should be free when cleanup resources.
Signed-off-by: Tianli Lai <laitianli@tom.com>
---
app/pdump/main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/app/pdump/main.c b/app/pdump/main.c
index 04a38e8..3fe17ea 100644
--- a/app/pdump/main.c
+++ b/app/pdump/main.c
@@ -507,6 +507,7 @@ struct parse_val {
/* free the rings */
rte_ring_free(pt->rx_ring);
rte_ring_free(pt->tx_ring);
+ rte_mempool_free(pt->mp);
}
}
--
1.8.3.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] app/pdump: free mempool at cleanup resources
2022-02-25 1:00 [PATCH] app/pdump: free mempool at cleanup resources Tianli Lai
@ 2022-02-25 2:40 ` Stephen Hemminger
2022-03-07 23:21 ` Thomas Monjalon
0 siblings, 1 reply; 6+ messages in thread
From: Stephen Hemminger @ 2022-02-25 2:40 UTC (permalink / raw)
To: Tianli Lai; +Cc: dev
On Fri, 25 Feb 2022 09:00:37 +0800
Tianli Lai <laitianli@tom.com> wrote:
> the mempool should be free when cleanup resources.
>
> Signed-off-by: Tianli Lai <laitianli@tom.com>
Thanks for fixing this.
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] app/pdump: free mempool at cleanup resources
2022-02-25 2:40 ` Stephen Hemminger
@ 2022-03-07 23:21 ` Thomas Monjalon
0 siblings, 0 replies; 6+ messages in thread
From: Thomas Monjalon @ 2022-03-07 23:21 UTC (permalink / raw)
To: Tianli Lai; +Cc: dev, Stephen Hemminger
25/02/2022 03:40, Stephen Hemminger:
> On Fri, 25 Feb 2022 09:00:37 +0800
> Tianli Lai <laitianli@tom.com> wrote:
>
> > the mempool should be free when cleanup resources.
> >
> > Signed-off-by: Tianli Lai <laitianli@tom.com>
>
> Thanks for fixing this.
>
> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Applied, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] app/pdump: free mempool at cleanup resources
2022-02-24 12:14 Tianli Lai
@ 2022-02-24 16:01 ` Stephen Hemminger
0 siblings, 0 replies; 6+ messages in thread
From: Stephen Hemminger @ 2022-02-24 16:01 UTC (permalink / raw)
To: Tianli Lai; +Cc: dev
On Thu, 24 Feb 2022 20:14:58 +0800
Tianli Lai <laitianli@tom.com> wrote:
> + if (pt->mp) {
> + rte_mempool_free(pt->mp);
> + pt->mp = NULL;
Check for null is unnecessary here, rte_mempool_free(NULL) is nop.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] app/pdump: free mempool at cleanup resources
@ 2022-02-24 12:52 Tianli Lai
0 siblings, 0 replies; 6+ messages in thread
From: Tianli Lai @ 2022-02-24 12:52 UTC (permalink / raw)
To: dev
the mempool should be free when cleanup resources.
Signed-off-by: Tianli Lai <laitianli@tom.com>
---
app/pdump/main.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/app/pdump/main.c b/app/pdump/main.c
index 04a38e8..9c77fc6 100644
--- a/app/pdump/main.c
+++ b/app/pdump/main.c
@@ -507,6 +507,10 @@ struct parse_val {
/* free the rings */
rte_ring_free(pt->rx_ring);
rte_ring_free(pt->tx_ring);
+ if (pt->mp) {
+ rte_mempool_free(pt->mp);
+ pt->mp = NULL;
+ }
}
}
--
1.8.3.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] app/pdump: free mempool at cleanup resources
@ 2022-02-24 12:14 Tianli Lai
2022-02-24 16:01 ` Stephen Hemminger
0 siblings, 1 reply; 6+ messages in thread
From: Tianli Lai @ 2022-02-24 12:14 UTC (permalink / raw)
To: dev
the mempool should be free when cleanup resources.
Signed-off-by: Tianli Lai <laitianli@tom.com>
---
app/pdump/main.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/app/pdump/main.c b/app/pdump/main.c
index 46f9d25..8101078 100644
--- a/app/pdump/main.c
+++ b/app/pdump/main.c
@@ -510,6 +510,10 @@ struct parse_val {
rte_ring_free(pt->rx_ring);
if (pt->tx_ring)
rte_ring_free(pt->tx_ring);
+ if (pt->mp) {
+ rte_mempool_free(pt->mp);
+ pt->mp = NULL;
+ }
}
}
--
1.8.3.1
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-03-07 23:21 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-25 1:00 [PATCH] app/pdump: free mempool at cleanup resources Tianli Lai
2022-02-25 2:40 ` Stephen Hemminger
2022-03-07 23:21 ` Thomas Monjalon
-- strict thread matches above, loose matches on Subject: below --
2022-02-24 12:52 Tianli Lai
2022-02-24 12:14 Tianli Lai
2022-02-24 16:01 ` Stephen Hemminger
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).