mempool: create the internal ring when populating
authorOlivier Matz <olivier.matz@6wind.com>
Wed, 18 May 2016 11:04:49 +0000 (13:04 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 19 May 2016 12:40:14 +0000 (14:40 +0200)
commita4673d4a813c9ab6355041b763ae1d3da5602736
treeee512186e990947d0ef6671311d56696d40f46e0
parentc042ba20674ab55872df5aa5abf0efe4ec8dc6c3
mempool: create the internal ring when populating

Instead of creating the internal ring at mempool creation, do
it when populating the mempool with the first memory chunk. The
objective here is to simplify the change of external handler
when it will be introduced.

For instance, this will be possible:

  mp = rte_mempool_create_empty(...)
  rte_mempool_set_ext_handler(mp, my_handler)
  rte_mempool_populate_default()

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