[PATCH v6 1/4] kvargs: add one new process API
Ferruh Yigit
ferruh.yigit at amd.com
Thu Oct 10 04:50:45 CEST 2024
On 10/9/2024 5:50 AM, Chengwen Feng wrote:
> The rte_kvargs_process() was used to handle key=value (e.g.
> socket_id=0), it also supports to handle only-key (e.g. socket_id).
> But many drivers's callback can only handle key=value, it will segment
> fault if handles only-key. so the patchset [1] was introduced.
>
> Because the patchset [1] modified too much drivers, therefore:
> 1) A new API rte_kvargs_process_opt() was introduced, it inherits the
> function of rte_kvargs_process() which could handle both key=value and
> only-key cases.
> 2) Constraint the rte_kvargs_process() can only handle key=value cases,
> it will return -1 when handle only-key case (that is the matched key's
> value is NULL).
>
> This patch also make sure the rte_kvargs_process_opt() and
> rte_kvargs_process() API both return -1 when the kvlist parameter is
> NULL.
>
> [1] https://patches.dpdk.org/project/dpdk/patch/20230320092110.37295-1-
> fengchengwen at huawei.com/
>
> Signed-off-by: Chengwen Feng <fengchengwen at huawei.com>
>
Acked-by: Ferruh Yigit <ferruh.yigit at amd.com>
More information about the dev
mailing list