[PATCH] mempool: fix internal function documentation
Morten Brørup
mb at smartsharesystems.com
Fri Oct 20 18:08:12 CEST 2023
> From: Ferruh Yigit [mailto:ferruh.yigit at 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: stable at dpdk.org
>
> Reported-by: Mahesh Adulla <mahesh.adulla at amd.com>
> Signed-off-by: Ferruh Yigit <ferruh.yigit at amd.com>
> ---
I agree that this is the current situation, and is relied upon elsewhere in DPDK.
Reviewed-by: Morten Brørup <mb at 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
More information about the stable
mailing list