[v2,2/2] mempool: clarify enqueue and dequeue ops return type

Message ID 20231023093844.4150572-2-ferruh.yigit@amd.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series [v2,1/2] mempool: fix internal function documentation |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/github-robot: build success github build: passed
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS

Commit Message

Ferruh Yigit Oct. 23, 2023, 9:38 a.m. UTC
  API documentations doesn't clarify expected return types for enqueue and
dequeue mempool_ops, clarifying it.

Fixes: 449c49b93a6b ("mempool: support handler operations")
Cc: stable@dpdk.org

Reported-by: Morten Brørup <mb@smartsharesystems.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
 lib/mempool/rte_mempool.h | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
  

Comments

Morten Brørup Oct. 23, 2023, 9:43 a.m. UTC | #1
> From: Ferruh Yigit [mailto:ferruh.yigit@amd.com]
> Sent: Monday, 23 October 2023 11.39
and dequeue ops return type
> 
> API documentations doesn't clarify expected return types for enqueue and
> dequeue mempool_ops, clarifying it.
> 
> Fixes: 449c49b93a6b ("mempool: support handler operations")
> Cc: stable@dpdk.org
> 
> Reported-by: Morten Brørup <mb@smartsharesystems.com>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
> ---

Thank you, Ferruh.

Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
  
Thomas Monjalon Nov. 27, 2023, 3:27 p.m. UTC | #2
23/10/2023 11:43, Morten Brørup:
> > From: Ferruh Yigit [mailto:ferruh.yigit@amd.com]
> > Sent: Monday, 23 October 2023 11.39
> and dequeue ops return type
> > 
> > API documentations doesn't clarify expected return types for enqueue and
> > dequeue mempool_ops, clarifying it.
> > 
> > Fixes: 449c49b93a6b ("mempool: support handler operations")
> > Cc: stable@dpdk.org
> > 
> > Reported-by: Morten Brørup <mb@smartsharesystems.com>
> > Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
> > ---
> 
> Thank you, Ferruh.
> 
> Reviewed-by: Morten Brørup <mb@smartsharesystems.com>

Series applied, thanks.
  

Patch

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);