[dpdk-dev] [PATCH v5] ethdev: add sanity checks in control APIs
Thomas Monjalon
thomas at monjalon.net
Thu Apr 15 18:21:36 CEST 2021
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.
More information about the dev
mailing list