mempool: rename functions with confusing names
authorBruce Richardson <bruce.richardson@intel.com>
Thu, 30 Jun 2016 12:49:25 +0000 (13:49 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Fri, 1 Jul 2016 10:35:57 +0000 (12:35 +0200)
commita0fd91cefcc054b770dec6d8fb60db0d3145c45a
treed84235ef19ac3a4ec1d0b4eb96cf18f3ce5591a3
parent43ea4004944404388c033055b130b53e8ba03806
mempool: rename functions with confusing names

The mempool_count and mempool_free_count behaved contrary to what their
names suggested. The free_count function actually returned the number of
elements that were allocated from the pool, not the number unallocated as
the name implied.

Fix this by introducing two new functions to replace the old ones,
* rte_mempool_avail_count to replace rte_mempool_count
* rte_mempool_in_use_count to replace rte_mempool_free_count

In this patch, the new functions are added, and the old ones are marked
as deprecated. All apps and examples that use the old functions are
updated to use the new functions.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
13 files changed:
app/test/test_cryptodev.c
app/test/test_cryptodev_perf.c
app/test/test_mbuf.c
app/test/test_mempool.c
app/test/test_mempool_perf.c
doc/guides/rel_notes/deprecation.rst
drivers/net/qede/qede_rxtx.c
drivers/net/thunderx/nicvf_ethdev.c
examples/multi_process/l2fwd_fork/main.c
examples/qos_sched/main.c
lib/librte_mempool/rte_mempool.c
lib/librte_mempool/rte_mempool.h
lib/librte_mempool/rte_mempool_version.map