> From: Paul Szczepanek [mailto:paul.szczepa...@arm.com]
> Sent: Wednesday, 29 May 2024 12.23
> 
> Add two functions:
> - rte_mempool_get_mem_range - get virtual memory range
> of the objects in the mempool,
> - rte_mempool_get_obj_alignment - get alignment of
> objects in the mempool.
> 
> Add two tests that test these new functions.
> 
> Signed-off-by: Paul Szczepanek <paul.szczepa...@arm.com>
> Reviewed-by: Jack Bond-Preston <jack.bond-pres...@foss.arm.com>
> Reviewed-by: Nathan Brown <nathan.br...@arm.com>
> ---
> 
> +/**
> + * @warning
> + * @b EXPERIMENTAL: this API may change without prior notice.
> + *
> + * Get information about the memory range used by the mempool.
> + *
> + * @param[in] mp
> + *   Pointer to an initialized mempool.
> + * @param[out] mem_range_start
> + *   Returns lowest address in mempool.
> + * @param[out] mem_range_length
> + *   Returns the length of the memory range containing all the addresses
> + *   in the memory pool.
> + * @return
> + *   0 on success, -EINVAL if arguments are not valid.
> + *
> + **/
> +__rte_experimental
> +int rte_mempool_get_mem_range(struct rte_mempool *mp,
> +             void **mem_range_start, size_t *mem_range_length);

Paul,

Could you please add one more output parameter "bool *mem_range_contiguous" to 
this function, returning true if the memory chunks are contiguous.

It will be useful instead of implementing get_memhdr_info() locally in this 
other patch series:
https://inbox.dpdk.org/dev/mw4pr11mb58724ac82a34a3eefef78e898e...@mw4pr11mb5872.namprd11.prod.outlook.com/

Please coordinate this change directly with Frank Du <frank...@intel.com>.

-Morten

Reply via email to