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. In order to simplify implementation of kvargs checks, a new pointer parameter may be used to get the match count.
The change of the function prototype would be as below: int rte_kvargs_process(const struct rte_kvargs *kvlist, const char *key_match, + int *match_count, arg_handler_t handler, void *opaque_arg) Signed-off-by: Thomas Monjalon <tho...@monjalon.net> --- v1: callback for no-match v2: integer for match count (Olivier suggestion) --- doc/guides/rel_notes/deprecation.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 34b28234c..dccf7bee6 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -11,6 +11,9 @@ API and ABI deprecation notices are to be posted here. Deprecation Notices ------------------- +* kvargs: The function ``rte_kvargs_process`` will get a new parameter + for returning key match count. It will ease handling of no-match case. + * eal: both declaring and identifying devices will be streamlined in v18.11. New functions will appear to query a specific port from buses, classes of device and device drivers. Device declaration will be made coherent with the -- 2.19.0