[dpdk-dev] [PATCH v5] ethdev: add sanity checks in control APIs

Min Hu (Connor) humin29 at huawei.com
Fri Apr 16 09:04:00 CEST 2021



在 2021/4/16 0:21, Thomas Monjalon 写道:
> 15/04/2021 17:45, Ferruh Yigit:
>> Not exactly related to this patch, but related to the API input, some input that
>> is filled by API is memset first before passing it to the PMD, which makes
>> sense. And for this we have two different ordering with dev_ops check:
>>
>> 1.
>> memset(input)
>> check dev_ops, return error if not supported
>> call dev_ops
>>
>> 2.
>> check dev_ops, return error if not supported
>> memset(input)
>> call dev_ops
>>
>> Connor, Thomas, Andrew,
>> Do you think does it have any benifit to unify it, and is one better than other?
> 
> Yes good catch.
> It deserves a separate patch to not memset if not needed.
> We must check if supported before memset.
>
Agreed, I will send next patch to fix it.

>
> .
> 


More information about the dev mailing list