mbuf: maintain user and compile time mempool ops name
At present the userdefined mempool ops name overwrites the default mempool ops name variable in internal_config. This patch change the logic to maintain the value of user defined only in the internal config. The pktmbuf_create_pool is updated to reflect the same ie. use user defined. If not present than use the default. Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com> Acked-by: Olivier Matz <olivier.matz@6wind.com> Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
This commit is contained in:
parent
96fd032ba8
commit
8b0f7f4341
@ -218,7 +218,7 @@ eal_reset_internal_config(struct internal_config *internal_cfg)
|
||||
#endif
|
||||
internal_cfg->vmware_tsc_map = 0;
|
||||
internal_cfg->create_uio_dev = 0;
|
||||
internal_cfg->user_mbuf_pool_ops_name = RTE_MBUF_DEFAULT_MEMPOOL_OPS;
|
||||
internal_cfg->user_mbuf_pool_ops_name = NULL;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -177,6 +177,8 @@ rte_pktmbuf_pool_create(const char *name, unsigned n,
|
||||
return NULL;
|
||||
|
||||
mp_ops_name = rte_eal_mbuf_default_mempool_ops();
|
||||
if (mp_ops_name == NULL)
|
||||
mp_ops_name = RTE_MBUF_DEFAULT_MEMPOOL_OPS;
|
||||
ret = rte_mempool_set_ops_byname(mp, mp_ops_name, NULL);
|
||||
if (ret != 0) {
|
||||
RTE_LOG(ERR, MBUF, "error setting mempool handler\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user