Hi Lazaros, On 06/29/2016 01:47 AM, Lazaros Koromilas wrote: > The mempool cache is only available to EAL threads as a per-lcore > resource. Change this so that the user can create and provide their own > cache on mempool get and put operations. This works with non-EAL threads > too. This commit introduces the new API calls: > > rte_mempool_cache_create(size, socket_id) > rte_mempool_cache_free(cache) > rte_mempool_cache_flush(cache, mp) > rte_mempool_default_cache(mp, lcore_id) > > Changes the API calls: > > rte_mempool_generic_put(mp, obj_table, n, cache, flags) > rte_mempool_generic_get(mp, obj_table, n, cache, flags) > > The cache-oblivious API calls use the per-lcore default local cache. > > Signed-off-by: Lazaros Koromilas <l at nofutznetworks.com> > Acked-by: Olivier Matz <olivier.matz at 6wind.com> > --- > app/test/test_mempool.c | 73 ++++++++--- > app/test/test_mempool_perf.c | 73 +++++++++-- > doc/guides/prog_guide/env_abstraction_layer.rst | 4 +- > doc/guides/prog_guide/mempool_lib.rst | 6 +- > lib/librte_mempool/rte_mempool.c | 66 +++++++++- > lib/librte_mempool/rte_mempool.h | 164 > +++++++++++++++++------- > lib/librte_mempool/rte_mempool_version.map | 4 + > 7 files changed, 308 insertions(+), 82 deletions(-) >
Thanks Lazaros for the doc update, looks good to me. Thomas, as discussed IRL, could you please remove the deprecation notice and add the following note in release_16_07.rst when applying the patches? * **Added mempool external cache for non-EAL thread.** Added new functions to create, free or flush a user-owned mempool cache for non-EAL threads. Previously, cache was always disabled on these threads. Thanks, Olivier