On Wed, Oct 9, 2024 at 6:50 AM Chengwen Feng <fengcheng...@huawei.com> wrote: > > The rte_kvargs_process() was used to parse key-value (e.g. socket_id=0), > it also supports to parse 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 parse both key-value and > only-key. > 2) Constraint the rte_kvargs_process() can only parse key-value. > > [1] > https://patches.dpdk.org/project/dpdk/patch/20230320092110.37295-1-fengcheng...@huawei.com/ > > Chengwen Feng (4): > kvargs: add one new process API > net/sfc: use new API to parse kvargs > net/tap: use new API to parse kvargs > common/nfp: use new API to parse kvargs
I see Stephen wanted to have a look on the series, but rc1 is close, and I decided to merge it with following comments. I marked the new API as stable from the go. The reason being that it provides the "legacy" behavior of previous rte_kvargs_process function, and as such, some users may have been relying on it. If you think this is wrong, please submit a followup patch. I was surprised of the change in behavior wrt to a NULL kvlist input parameter mixed in the change. But I left it as is. Idem, a followup patch may be sent. Series applied, thanks for fixing this old issue Chengwen. -- David Marchand