[PATCH v2 2/2] mempool: clarify enqueue and dequeue ops return type
Ferruh Yigit
ferruh.yigit at amd.com
Mon Oct 23 11:38:43 CEST 2023
API documentations doesn't clarify expected return types for enqueue and
dequeue mempool_ops, clarifying it.
Fixes: 449c49b93a6b ("mempool: support handler operations")
Cc: stable at dpdk.org
Reported-by: Morten Brørup <mb at smartsharesystems.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit at amd.com>
---
lib/mempool/rte_mempool.h | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/lib/mempool/rte_mempool.h b/lib/mempool/rte_mempool.h
index 86598bc639e6..8ed0386ba3f1 100644
--- a/lib/mempool/rte_mempool.h
+++ b/lib/mempool/rte_mempool.h
@@ -465,13 +465,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);
--
2.34.1
More information about the stable
mailing list