test/distributor: fix mbuf leak on failure
authorSarosh Arif <sarosh.arif@emumba.com>
Tue, 8 Sep 2020 10:22:04 +0000 (15:22 +0500)
committerDavid Marchand <david.marchand@redhat.com>
Mon, 19 Oct 2020 08:57:17 +0000 (10:57 +0200)
commit0e8704a453e5295ff9f498c6cdab7f829410ad88
treeed13877c78a946dab744bf545b28f60d746e185d
parentf72bff0ec2723b7d7bfc9c655419030b1c8fffad
test/distributor: fix mbuf leak on failure

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.

Fixes: c3eabff124e6 ("distributor: add unit tests")
Cc: stable@dpdk.org
Signed-off-by: Sarosh Arif <sarosh.arif@emumba.com>
Acked-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Reviewed-by: David Hunt <david.hunt@intel.com>
app/test/test_distributor.c