[1/4] mempool: clarify mempool cache flush API behavior
Checks
Commit Message
Clarify that mempool cache flush API works with default mempool cache.
It is applications responsibility to validate that the cache
belongs to the specified mempool.
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Kamalakshitha Aligeri <kamalakshitha.aligeri@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
lib/mempool/rte_mempool.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
Comments
> From: Honnappa Nagarahalli [mailto:honnappa.nagarahalli@arm.com]
> Sent: Thursday, 9 March 2023 05.58
>
> Clarify that mempool cache flush API works with default mempool cache.
> It is applications responsibility to validate that the cache
> belongs to the specified mempool.
>
> Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
> Reviewed-by: Kamalakshitha Aligeri <kamalakshitha.aligeri@arm.com>
> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
> ---
Acked-by: Morten Brørup <mb@smartsharesystems.com>
@@ -1326,10 +1326,14 @@ rte_mempool_default_cache(struct rte_mempool *mp, unsigned lcore_id)
}
/**
- * Flush a user-owned mempool cache to the specified mempool.
+ * Flush a mempool cache to the specified mempool.
+ *
+ * It is application's responsibility to validate that the mempool cache
+ * belongs to the specified mempool.
*
* @param cache
- * A pointer to the mempool cache.
+ * A pointer to the mempool cache. If NULL, default mempool cache
+ * is used if configured.
* @param mp
* A pointer to the mempool.
*/