* [dpdk-dev] [PATCH] testpmd: fix memory leak in iterator
@ 2019-11-20 23:26 Stephen Hemminger
2019-11-21 11:43 ` Iremonger, Bernard
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2019-11-20 23:26 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, ndabilpuram, stable
The RTE_FOREACH_MATCHING_DEV iterator requires that
if a break is done before the end of the loop,
the function rte_eth_iterator_cleanup() must be called.
Fixes: 55e51c962432 ("app/testpmd: add device related commands")
Cc: ndabilpuram@marvell.com
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
app/test-pmd/testpmd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 446da3623442..cf59c378229f 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -2616,6 +2616,7 @@ detach_device(char *identifier)
if (ports[port_id].port_status != RTE_PORT_CLOSED) {
if (ports[port_id].port_status != RTE_PORT_STOPPED) {
printf("Port %u not stopped\n", port_id);
+ rte_eth_iterator_cleanup(&iterator);
return;
}
--
2.20.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] testpmd: fix memory leak in iterator
2019-11-20 23:26 [dpdk-dev] [PATCH] testpmd: fix memory leak in iterator Stephen Hemminger
@ 2019-11-21 11:43 ` Iremonger, Bernard
2019-11-21 13:58 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
0 siblings, 1 reply; 3+ messages in thread
From: Iremonger, Bernard @ 2019-11-21 11:43 UTC (permalink / raw)
To: Stephen Hemminger, dev; +Cc: ndabilpuram, stable
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Stephen Hemminger
> Sent: Wednesday, November 20, 2019 11:26 PM
> To: dev@dpdk.org
> Cc: Stephen Hemminger <stephen@networkplumber.org>;
> ndabilpuram@marvell.com; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] testpmd: fix memory leak in iterator
>
> The RTE_FOREACH_MATCHING_DEV iterator requires that if a break is done
> before the end of the loop, the function rte_eth_iterator_cleanup() must be
> called.
>
> Fixes: 55e51c962432 ("app/testpmd: add device related commands")
> Cc: ndabilpuram@marvell.com
> Cc: stable@dpdk.org
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
./devtools/check-git-log.sh -1
Wrong headline label:
testpmd: fix memory leak in iterator
Headline label should be app/testpmd
Otherwise
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [dpdk-stable] [PATCH] testpmd: fix memory leak in iterator
2019-11-21 11:43 ` Iremonger, Bernard
@ 2019-11-21 13:58 ` Ferruh Yigit
0 siblings, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2019-11-21 13:58 UTC (permalink / raw)
To: Iremonger, Bernard, Stephen Hemminger, dev; +Cc: ndabilpuram, stable
On 11/21/2019 11:43 AM, Iremonger, Bernard wrote:
>> -----Original Message-----
>> From: dev <dev-bounces@dpdk.org> On Behalf Of Stephen Hemminger
>> Sent: Wednesday, November 20, 2019 11:26 PM
>> To: dev@dpdk.org
>> Cc: Stephen Hemminger <stephen@networkplumber.org>;
>> ndabilpuram@marvell.com; stable@dpdk.org
>> Subject: [dpdk-dev] [PATCH] testpmd: fix memory leak in iterator
>>
>> The RTE_FOREACH_MATCHING_DEV iterator requires that if a break is done
>> before the end of the loop, the function rte_eth_iterator_cleanup() must be
>> called.
>>
>> Fixes: 55e51c962432 ("app/testpmd: add device related commands")
>> Cc: ndabilpuram@marvell.com
>> Cc: stable@dpdk.org
>> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
>
>
> ./devtools/check-git-log.sh -1
> Wrong headline label:
> testpmd: fix memory leak in iterator
>
> Headline label should be app/testpmd
>
> Otherwise
>
> Acked-by: Bernard Iremonger <bernard.iremonger@intel.com
>
Applied to dpdk-next-net/master, thanks.
(fixed headline label while merging)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-11-21 13:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-20 23:26 [dpdk-dev] [PATCH] testpmd: fix memory leak in iterator Stephen Hemminger
2019-11-21 11:43 ` Iremonger, Bernard
2019-11-21 13:58 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
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).