[dpdk-dev] [PATCH] mempool: Introduce _populate_mz_range api

Jerin Jacob jerin.jacob at caviumnetworks.com
Fri Jan 20 15:38:06 CET 2017


On Fri, Jan 20, 2017 at 07:50:17PM +0530, santosh.shukla at caviumnetworks.com wrote:
> From: Santosh Shukla <santosh.shukla at caviumnetworks.com>
>  
> +/*
> + * wrapper to populate mz's pa/va addr range and len info to external
> + * mempool. HW mempool implementation to cache-in this inforamation
> + * in their local data structure.
> + * Note: api always get called before ops_alloc().
> + * */
> +void
> +rte_mempool_ops_populate_mz_range(struct rte_mempool *mp,
> +				  const struct rte_memzone *mz)
> +{
> +	struct rte_mempool_ops *ops;
> +
> +	ops = rte_mempool_get_ops(mp->ops_index);
> +	return ops->populate_mz_range(mp, mz);

Check for the NULL before calling the function pointer.



More information about the dev mailing list