Skip to content

Commit

Permalink
mempool: fix get function documentation
Browse files Browse the repository at this point in the history
[ upstream commit 9b3233ab09ea331dcf5fb38d215d91818bef3b47 ]

static function `rte_mempool_do_generic_get()` returns zero on success,
not >=0 as its function comment documents.

Since this function called by public API, the comment causes confusion
on the public API return value.

Fixing the internal function documentation for return value.

Fixes: af75078 ("first public release")

Reported-by: Mahesh Adulla <mahesh.adulla@amd.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Huisong Li <lihuisong@huawei.com>
  • Loading branch information
ferruhy authored and bluca committed Nov 29, 2023
1 parent f26a6e7 commit 714ae83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/librte_mempool/rte_mempool.h
Original file line number Diff line number Diff line change
Expand Up @@ -1402,7 +1402,7 @@ rte_mempool_put(struct rte_mempool *mp, void *obj)
* @param cache
* A pointer to a mempool cache structure. May be NULL if not needed.
* @return
* - >=0: Success; number of objects supplied.
* - 0: Success.
* - <0: Error; code of driver dequeue function.
*/
static __rte_always_inline int
Expand Down

0 comments on commit 714ae83

Please sign in to comment.