[dpdk-dev] [RFC PATCH] kvargs: add match count inside processing

Stephen Hemminger stephen at networkplumber.org
Mon Jun 12 04:32:50 CEST 2023


On Fri, 30 Nov 2018 01:39:38 +0100
Thomas Monjalon <thomas at monjalon.net> wrote:

> After processing a kvlist in rte_kvargs_process(),
> it may be needed to loop again over kvlist, in order to know
> whether the key is matched or not, as done with rte_kvargs_count().
> 
> In order to simplify implementation of kvargs checks,
> a new pointer parameter is added to get the match count from
> the function rte_kvargs_process().
> 
> This count could have been returned as a positive value of the function,
> but it would change also the meaning of "return 0".
> It looks simpler to keep return code as 0 or negative,
> and add a dedicated output parameter for counting purpose.
> 
> Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
> ---
> 
> This RFC is not complete: the calls to rte_kvargs_process()
> in the drivers must be updated with the new parameter,
> and simplified if rte_kvargs_count() is used.

This is not a bad idea, but the patch was never completed for over 5 years.
By now, not sure what more needs to do or if anyone cares.
If there still is a use case, then rebase and resubmit.

Will mark this one as changes needed.


More information about the dev mailing list