[PATCH v14 2/6] mempool: add functions to get extra mempool info
Paul Szczepanek
paul.szczepanek at arm.com
Tue Jun 11 15:06:55 CEST 2024
On 10/06/2024 15:24, Konstantin Ananyev wrote:
[snip]
>
> With that changes in place:
> Acked-by: Konstantin Ananyev <konstantin.ananyev at huawei.com>
>
I have applied your comments in v15.
[snip]
>> +
>> +size_t rte_mempool_get_obj_alignment(const struct rte_mempool *mp)
>> +{
>> + if (mp == NULL)
>> + return 0;
>
> In case of mp==NULL, would it be better to return negative error code (-EINVAL or so)?
> In that case the function should be changed to return ssize_t though.
>
I have chosen size_t for portability and ease of use as that is the type
most likely expected by the caller and because there are no other error
modes expected in the future that would require distinguishing between
them. I hope this is an acceptable solution and have kept it in v15.
[snip]
More information about the dev
mailing list