[PATCH] mempool: fix internal function documentation

Ferruh Yigit ferruh.yigit at amd.com
Mon Oct 23 11:07:54 CEST 2023


On 10/20/2023 5:08 PM, Morten Brørup wrote:
>> 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.)
> 

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
> 



More information about the stable mailing list