kvargs: add function to get from key and value
authorOlivier Matz <olivier.matz@6wind.com>
Wed, 29 Sep 2021 21:39:41 +0000 (23:39 +0200)
committerDavid Marchand <david.marchand@redhat.com>
Thu, 30 Sep 2021 15:38:02 +0000 (17:38 +0200)
commit6aebb942907da015be55338a912e83e370b2e102
treef9eb24c7a7689eabacfea69de17ed3ddc9dc6a56
parentb36d02ab394c4ab230af2c61ace424f6ec2ca74b
kvargs: add function to get from key and value

A quite common scenario with kvargs is to lookup for a <key>=<value> in
a kvlist. For instance, check if name=foo is present in
name=toto,name=foo,name=bar. This is currently done in drivers/bus with
rte_kvargs_process() + the rte_kvargs_strcmp() handler.

This approach is not straightforward, and can be replaced by this new
function.

rte_kvargs_strcmp() is then removed.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: Xueming Li <xuemingl@nvidia.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ray Kinsella <mdr@ashroe.eu>
doc/guides/rel_notes/release_21_11.rst
drivers/bus/auxiliary/auxiliary_params.c
drivers/bus/vdev/vdev_params.c
lib/kvargs/rte_kvargs.c
lib/kvargs/rte_kvargs.h
lib/kvargs/version.map