> From: Ferruh Yigit [mailto:ferruh.yi...@amd.com]
> Sent: Friday, 20 October 2023 16.47
> 
> 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: af75078fece3 ("first public release")
> Cc: sta...@dpdk.org
> 
> Reported-by: Mahesh Adulla <mahesh.adu...@amd.com>
> Signed-off-by: Ferruh Yigit <ferruh.yi...@amd.com>
> ---

I agree that this is the current situation, and is relied upon elsewhere in 
DPDK.

Reviewed-by: Morten Brørup <m...@smartsharesystems.com>

However, the documentation for the mempool driver dequeue function type, 
rte_mempool_dequeue_t [1], does not specify allowed return values, so some 
future mempool driver might return a positive value. Please consider updating 
this too. (Also, the mempool driver enqueue/dequeue functions work on a bulk of 
objects, not "an object", as their documentation says.)

[1]: 
https://elixir.bootlin.com/dpdk/latest/source/lib/mempool/rte_mempool.h#L476

Reply via email to