mempool: return 0 if area is too small on populate
authorOlivier Matz <olivier.matz@6wind.com>
Mon, 4 May 2020 12:49:18 +0000 (14:49 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 4 May 2020 22:27:05 +0000 (00:27 +0200)
commitc0280d5d8ac047b9f56d21d17e2fd0961891072a
tree22f5266c12329ff37627ba2bf814a089db903e84
parent105f3039c78991d3b28847f3bb059bc33be5300b
mempool: return 0 if area is too small on populate

Change rte_mempool_populate_iova() and rte_mempool_populate_virt() to
return 0 instead of -EINVAL when there is not enough room to store one
object, as it can be helpful for applications to distinguish this
specific case.

As this is an ABI change, use symbol versioning to preserve old
behavior for binary applications.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
doc/guides/rel_notes/deprecation.rst
doc/guides/rel_notes/release_20_05.rst
examples/ntb/ntb_fwd.c
lib/librte_mempool/meson.build
lib/librte_mempool/rte_mempool.c
lib/librte_mempool/rte_mempool.h
lib/librte_mempool/rte_mempool_version.map