[PATCH 2/4] mempool: clarify comments for mempool cache implementation

Morten Brørup mb at smartsharesystems.com
Wed Jun 7 12:10:01 CEST 2023


> From: Honnappa Nagarahalli [mailto:honnappa.nagarahalli at arm.com]
> Sent: Thursday, 9 March 2023 05.58
> 
> Clarify that the mempool cache create and free API implementations
> work on user owned mempool caches.
> 
> Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli at arm.com>
> Reviewed-by: Kamalakshitha Aligeri <kamalakshitha.aligeri at arm.com>
> Reviewed-by: Ruifeng Wang <ruifeng.wang at arm.com>
> ---
>  lib/mempool/rte_mempool.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/lib/mempool/rte_mempool.c b/lib/mempool/rte_mempool.c
> index cf5dea2304..a46d855dbf 100644
> --- a/lib/mempool/rte_mempool.c
> +++ b/lib/mempool/rte_mempool.c
> @@ -757,9 +757,9 @@ mempool_cache_init(struct rte_mempool_cache *cache,
> uint32_t size)
>  }
> 
>  /*
> - * Create and initialize a cache for objects that are retrieved from and
> - * returned to an underlying mempool. This structure is identical to the
> - * local_cache[lcore_id] pointed to by the mempool structure.
> + * Create and initialize a user owned cache for objects that are retrieved
> + * from and returned to an underlying mempool. This structure is identical
> + * to the local_cache[lcore_id] pointed to by the mempool structure.
>   */
>  struct rte_mempool_cache *
>  rte_mempool_cache_create(uint32_t size, int socket_id)
> @@ -786,9 +786,9 @@ rte_mempool_cache_create(uint32_t size, int socket_id)
>  }
> 
>  /*
> - * Free a cache. It's the responsibility of the user to make sure that any
> - * remaining objects in the cache are flushed to the corresponding
> - * mempool.
> + * Free a user owned cache. It's the responsibility of the user to make
> + * sure that any remaining objects in the cache are flushed to the
> + * corresponding mempool.
>   */
>  void
>  rte_mempool_cache_free(struct rte_mempool_cache *cache)
> --
> 2.25.1
> 

These comments should probably be updated in the function descriptions in rte_mempool.h too, so they go into the auto-generated documentation.



More information about the dev mailing list