Skip to content

Commit

Permalink
mempool: clarify enqueue/dequeue ops documentation
Browse files Browse the repository at this point in the history
[ upstream commit 37fc1db98c082d3f423c46bed7357a158abe53e9 ]

API documentations doesn't clarify expected return types for enqueue and
dequeue mempool_ops, clarifying it.

Fixes: 449c49b ("mempool: support handler operations")

Reported-by: Morten Brørup <mb@smartsharesystems.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
  • Loading branch information
ferruhy authored and bluca committed Nov 29, 2023
1 parent 714ae83 commit a8853f9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/librte_mempool/rte_mempool.h
Original file line number Diff line number Diff line change
Expand Up @@ -404,13 +404,19 @@ typedef int (*rte_mempool_alloc_t)(struct rte_mempool *mp);
typedef void (*rte_mempool_free_t)(struct rte_mempool *mp);

/**
* Enqueue an object into the external pool.
* Enqueue 'n' objects into the external pool.
* @return
* - 0: Success
* - <0: Error
*/
typedef int (*rte_mempool_enqueue_t)(struct rte_mempool *mp,
void * const *obj_table, unsigned int n);

/**
* Dequeue an object from the external pool.
* Dequeue 'n' objects from the external pool.
* @return
* - 0: Success
* - <0: Error
*/
typedef int (*rte_mempool_dequeue_t)(struct rte_mempool *mp,
void **obj_table, unsigned int n);
Expand Down

0 comments on commit a8853f9

Please sign in to comment.