mempool: simplify memory usage calculation
authorOlivier Matz <olivier.matz@6wind.com>
Wed, 18 May 2016 11:04:38 +0000 (13:04 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 19 May 2016 12:40:13 +0000 (14:40 +0200)
commit8567eb37d9fcd7a54edab00d0abc06a2d2305baf
tree8fdacd3ad453a2bba1167582639d18aabd2e9419
parentb18e19a892b11f13699c02d0ea82744d9b79aaaf
mempool: simplify memory usage calculation

This commit simplifies rte_mempool_xmem_usage().

Since previous commit, the function rte_mempool_xmem_usage() is
now the last user of rte_mempool_obj_mem_iter(). This complex
code can now be moved inside the function. We can get rid of the
callback and do some simplification to make the code more readable.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
lib/librte_mempool/rte_mempool.c