[dpdk-dev] [v3 PATCH] test_distributor: prevent memory leakages from the pool

David Hunt david.hunt at intel.com
Fri Sep 25 17:26:56 CEST 2020


On 8/9/2020 11:22 AM, Sarosh Arif wrote:
> rte_mempool_get_bulk is used to get bufs/many_bufs from the pool,
> but at some locations when test fails the bufs/many_bufs are
> not returned back to the pool.
> Due to this, multiple executions of distributor_autotest gives the
> following error message: Error getting mbufs from pool.
> To resolve this issue rte_mempool_put_bulk is used whenever the test
> fails and returns.
>
> Signed-off-by: Sarosh Arif <sarosh.arif at emumba.com>
> ---
> v2:
> remove double freeing of mbufs
> v3:
> resubmit to run the tests again
> ---
> }

--snip--

Looks good to me. Even though I could not repeat the conditions to cause 
one of these errors, the additons make sense.

In my testing, I did add in several rte_mempool_avail_count() checks to 
see if there were leakages, and all the mempool counts were
stable, but that was due to the fixes in the patch set from Lukasz : 
http://patches.dpdk.org/project/dpdk/list/?series=12442

However, if there are situations where packets are not returned from 
workers, this should clean them up nicely before returning.

Reviewed-by: David Hunt <david.hunt at intel.com>






More information about the dev mailing list