On Sat, Mar 10, 2018 at 03:39:36PM +0000, Andrew Rybchenko wrote:
> The callback was introduced to let generic code to know octeontx
> mempool driver requirements to use single physically contiguous
> memory chunk to store all objects and align object address to
> total object size. Now these requirements are met using a new
> callbacks to calculate required memory chunk size and to populate
> objects using provided memory chunk.
> 
> These capability flags are not used anywhere else.
> 
> Restricting capabilities to flags is not generic and likely to
> be insufficient to describe mempool driver features. If required
> in the future, API which returns structured information may be
> added.
> 
> Signed-off-by: Andrew Rybchenko <arybche...@solarflare.com>

Looks fine...


> --- a/drivers/mempool/octeontx/rte_mempool_octeontx.c
> +++ b/drivers/mempool/octeontx/rte_mempool_octeontx.c
> @@ -126,14 +126,29 @@ octeontx_fpavf_get_count(const struct rte_mempool *mp)
>       return octeontx_fpa_bufpool_free_count(pool);
>  }
>  
> -static int
> -octeontx_fpavf_get_capabilities(const struct rte_mempool *mp,
> -                             unsigned int *flags)
> +static ssize_t
> +octeontx_fpavf_calc_mem_size(const struct rte_mempool *mp,
> +                          uint32_t obj_num, uint32_t pg_shift,
> +                          size_t *min_chunk_size, size_t *align)
>  {
> -     RTE_SET_USED(mp);
> -     *flags |= (MEMPOOL_F_CAPA_PHYS_CONTIG |
> -                     MEMPOOL_F_CAPA_BLK_ALIGNED_OBJECTS);
> -     return 0;
> +     ssize_t mem_size;
> +
> +     /*
> +      * Simply need space for one more object to be able to
> +      * fullfil alignment requirements.
> +      */

...ah, just one typo:

  fullfil -> fulfil or fulfill

Reply via email to