testpmd: fix memory leak in iterator
PATCH 1/1 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.
--- app/test-pmd/testpmd.c | 1 + 1 file changed, 1 insertion(+)
app/test-pmd/testpmd.c +1 -0
@@ -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 ; }
Signature · 1 line
2.20.1
Quoted 8 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Stephen Hemminger
Sent: Wednesday, November 20, 2019 11:26 PM
To: [email protected]
Cc: Stephen Hemminger <[email protected]>; [email protected]; [email protected]
Subject: [dpdk-dev] [PATCH] testpmd: fix memory leak in iterator
Quoted 8 lines
The
RTE_FOREACH_MATCHING_DEViterator requires that if a break is done before the end of the loop, the functionrte_eth_iterator_cleanup()must be called.Fixes 55e51c962432 ("app/testpmd: add device related commands")Signed-off-by Stephen Hemminger <[email protected]>
./devtools/check-git-log.sh -1
Wrong headline label:
testpmd: fix memory leak in iterator
Headline label should be app/testpmd
Otherwise
Ferruh Yigit
AppliedQuoted 22 lines · Bernard
Quoted 8 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Stephen Hemminger
Sent: Wednesday, November 20, 2019 11:26 PM
To: [email protected]
Cc: Stephen Hemminger <[email protected]>; [email protected]; [email protected]
Subject: [dpdk-dev] [PATCH] testpmd: fix memory leak in iteratorQuoted 8 lines
The
RTE_FOREACH_MATCHING_DEViterator requires that if a break is done before the end of the loop, the functionrte_eth_iterator_cleanup()must be called.Fixes 55e51c962432 ("app/testpmd: add device related commands")Signed-off-by Stephen Hemminger <[email protected]>
./devtools/check-git-log.sh-1
Wrong headline label:
testpmd: fix memory leak in iterator
Quoted 6 lines
Headline label should be app/testpmd
Otherwise
Acked-by Bernard Iremonger <[email protected]
Applied to dpdk-next-net/master, thanks.
(fixed headline label while merging)