mempool: support handler operations
authorDavid Hunt <david.hunt@intel.com>
Wed, 22 Jun 2016 09:27:27 +0000 (10:27 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Fri, 24 Jun 2016 09:01:05 +0000 (11:01 +0200)
commit449c49b93a6b87506c7bb07468e82b539efddca3
tree0d7f5410ba3c159882944caa340863f226f2150e
parent479e160b2ec30d97c116ba348bdd312dc930bb10
mempool: support handler operations

Until now, the objects stored in a mempool were internally stored in a
ring. This patch introduces the possibility to register external handlers
replacing the ring.

The default behavior remains unchanged, but calling the new function
rte_mempool_set_ops_byname() right after rte_mempool_create_empty() allows
the user to change the handler that will be used when populating
the mempool.

This patch also adds a set of default ops (function callbacks) based
on rte_ring.

Signed-off-by: David Hunt <david.hunt@intel.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
app/test/test_mempool_perf.c
doc/guides/prog_guide/mempool_lib.rst
doc/guides/rel_notes/deprecation.rst
lib/librte_mempool/Makefile
lib/librte_mempool/rte_mempool.c
lib/librte_mempool/rte_mempool.h
lib/librte_mempool/rte_mempool_ops.c [new file with mode: 0644]
lib/librte_mempool/rte_mempool_ring.c [new file with mode: 0644]
lib/librte_mempool/rte_mempool_version.map