On 10/20/2023 5:08 PM, Morten Brørup wrote: >> From: Ferruh Yigit [mailto:[email protected]] >> 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: [email protected] >> >> Reported-by: Mahesh Adulla <[email protected]> >> Signed-off-by: Ferruh Yigit <[email protected]> >> --- > > I agree that this is the current situation, and is relied upon elsewhere in > DPDK. > > Reviewed-by: Morten Brørup <[email protected]> > > 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.) >
Hi Morten, Yes, mempool_ops are missing API parameter documentation, although this is not directly related with this patch, I can update 'rte_mempool_dequeue_t' while I am around. > [1]: > https://elixir.bootlin.com/dpdk/latest/source/lib/mempool/rte_mempool.h#L476 >

