kvargs: promote or remove experimental api
cover kvargs: promote or remove experimental api
This patchset promotes 2 functions rte_kvargs_parse_delim() and rte_kvargs_get() as stable.
It also replaces rte_kvargs_strcmp() by a new one rte_kvargs_get_with_value(), which is easier to use.
Olivier Matz (5):
kvargs: promote delimited parsing as stable
kvargs: promote get from key as stable
kvargs: new function to get from key and value
kvargs: remove experimental function to compare string
kvargs: fix comments style
drivers/bus/auxiliary/auxiliary_params.c | 9 ++-- drivers/bus/vdev/vdev_params.c | 13 +----- lib/kvargs/rte_kvargs.c | 32 +++++++------ lib/kvargs/rte_kvargs.h | 59 ++++++++++++------------ lib/kvargs/version.map | 7 +-- 5 files changed, 57 insertions(+), 63 deletions(-)
Signature · 1 line
2.30.2
PATCH 1/5 kvargs: promote delimited parsing as stable
This function is used by EAL to parse key/value strings separated with specified delimiters.
It was introduced in 2018 by commit 5d6af85ab00c ("kvargs: introduce a more flexible parsing function"), and can be promoted as stable.
--- lib/kvargs/rte_kvargs.h | 1 - lib/kvargs/version.map | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-)
lib/kvargs/rte_kvargs.h +0 -1
@@ -98,7 +98,6 @@ struct rte_kvargs *rte_kvargs_parse(const char *args,* - A pointer to an allocated rte_kvargs structure on success * - NULL on error */ -__rte_experimental struct rte_kvargs *rte_kvargs_parse_delim (const char *args,const char *const valid_keys[],const char *valid_ends);
lib/kvargs/version.map +1 -1
@@ -4,6 +4,7 @@ DPDK_22 { rte_kvargs_count; rte_kvargs_free; rte_kvargs_parse; + rte_kvargs_parse_delim; rte_kvargs_process; local: *;
@@ -12,7 +13,6 @@ DPDK_22 { EXPERIMENTAL { global: - rte_kvargs_parse_delim; rte_kvargs_strcmp; # added in 21.05
Signature · 1 line
2.30.2
PATCH 2/5 kvargs: promote get from key as stable
In reply to Olivier MatzThe function rte_kvargs_get() is used by eal and pci bus driver since its introduction in commit 3ab385063cb9 ("kvargs: add get by key") and commit d2a66ad79480 ("bus: add device arguments name parsing"), in dpdk 21.05.
Let's promote it as stable.
--- lib/kvargs/rte_kvargs.h | 1 - lib/kvargs/version.map | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-)
lib/kvargs/rte_kvargs.h +0 -1
@@ -130,7 +130,6 @@ void rte_kvargs_free(struct rte_kvargs *kvlist);* NULL if no key matches the input, * a value associated with a matching key otherwise. */ -__rte_experimental const char *rte_kvargs_get (const struct rte_kvargs *kvlist,const char *key);/**
lib/kvargs/version.map +1 -2
@@ -3,6 +3,7 @@ DPDK_22 { rte_kvargs_count; rte_kvargs_free; + rte_kvargs_get; rte_kvargs_parse; rte_kvargs_parse_delim; rte_kvargs_process;
@@ -15,6 +16,4 @@ EXPERIMENTAL { rte_kvargs_strcmp; - # added in 21.05 - rte_kvargs_get; };
Signature · 1 line
2.30.2
PATCH 3/5 kvargs: new function to get from key and value
In reply to Olivier MatzA 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.
--- drivers/bus/auxiliary/auxiliary_params.c | 9 ++++---- drivers/bus/vdev/vdev_params.c | 13 ++--------- lib/kvargs/rte_kvargs.c | 23 +++++++++++++++---- lib/kvargs/rte_kvargs.h | 29 +++++++++++++++++++++++- lib/kvargs/version.map | 2 ++ 5 files changed, 54 insertions(+), 22 deletions(-)
drivers/bus/auxiliary/auxiliary_params.c +4 -5
@@ -25,13 +25,12 @@ auxiliary_dev_match(const struct rte_device *dev, const void *_kvlist) {const struct rte_kvargs *kvlist = _kvlist; -int ret; +const char *key = auxiliary_params_keys[RTE_AUXILIARY_PARAM_NAME ]; - ret =rte_kvargs_process (kvlist, - auxiliary_params_keys[RTE_AUXILIARY_PARAM_NAME ], - rte_kvargs_strcmp, (void *)(uintptr_t )dev->name); +if (rte_kvargs_get_with_value (kvlist, key, dev->name) ==NULL ) +return -1 ; -return ret !=0 ?-1 :0 ; +return 0 ; } void *
drivers/bus/vdev/vdev_params.c +2 -11
@@ -26,19 +26,10 @@ static int vdev_dev_match(const struct rte_device *dev, const void *_kvlist) { - int ret; const struct rte_kvargs *kvlist = _kvlist; -char *name; +const char *key = vdev_params_keys[RTE_VDEV_PARAM_NAME ]; -/* cannot pass const dev->name to rte_kvargs_process() */ - name =strdup (dev->name); -if (name ==NULL ) -return -1 ; - ret =rte_kvargs_process (kvlist, - vdev_params_keys[RTE_VDEV_PARAM_NAME ], - rte_kvargs_strcmp, name); -free (name); -if (ret !=0 ) +if (rte_kvargs_get_with_value (kvlist, key, dev->name) ==NULL )return -1 ;return 0 ;
lib/kvargs/rte_kvargs.c +18 -5
@@ -204,21 +204,34 @@ rte_kvargs_free(struct rte_kvargs *kvlist)free (kvlist); } -/* Lookup a value in an rte_kvargs list by its key. */ +/* Lookup a value in an rte_kvargs list by its key and value. */ const char * -rte_kvargs_get (const struct rte_kvargs *kvlist,const char *key) +rte_kvargs_get_with_value (const struct rte_kvargs *kvlist,const char *key, +const char *value) {unsigned int i; -if (kvlist ==NULL || key ==NULL ) +if (kvlist ==NULL )return NULL ;for (i =0 ; i < kvlist->count; ++i) { -if (strcmp (kvlist->pairs[i].key, key) ==0 ) -return kvlist->pairs[i].value; +if (key !=NULL &&strcmp (kvlist->pairs[i].key, key) !=0 ) +continue ; +if (value !=NULL &&strcmp (kvlist->pairs[i].value, value) !=0 ) +continue ; +return kvlist->pairs[i].value; }return NULL ; } +/* Lookup a value in an rte_kvargs list by its key. */ +const char * +rte_kvargs_get (const struct rte_kvargs *kvlist,const char *key) +{ +if (kvlist ==NULL || key ==NULL ) +return NULL ; +return rte_kvargs_get_with_value (kvlist, key,NULL ); +} +/* * Parse the arguments "key=value,key=value,..." string and return * an allocated structure that contains a key/value list. Also
lib/kvargs/rte_kvargs.h +28 -1
@@ -116,7 +116,7 @@ void rte_kvargs_free(struct rte_kvargs *kvlist);/** * Get the value associated with a given key. * -* If multiple key matches, the value of the first one is returned. +* If multiple keys match, the value of the first one is returned. * * The memory returned is allocated as part of the rte_kvargs structure, * it must never be modified.
@@ -132,6 +132,33 @@ void rte_kvargs_free(struct rte_kvargs *kvlist);*/ const char *rte_kvargs_get (const struct rte_kvargs *kvlist,const char *key); +/** +* @warning +* @b EXPERIMENTAL: this API may change without prior notice +* +* Get the value associated with a given key and value. +* +* Find the first entry in the kvlist whose key and value match the +* ones passed as argument. +* +* The memory returned is allocated as part of the rte_kvargs structure, +* it must never be modified. +* +* @param kvlist +* A list of rte_kvargs pair of 'key=value'. +* @param key +* The matching key. If NULL, any key will match. +* @param value +* The matching value. If NULL, any value will match. +* +* @return +* NULL if no key matches the input, +* a value associated with a matching key otherwise. +*/ +__rte_experimental +const char *rte_kvargs_get_with_value(const struct rte_kvargs *kvlist, +const char *key,const char *value); +/** * Call a handler function for each key/value matching the key *
lib/kvargs/version.map +2 -0
@@ -16,4 +16,6 @@ EXPERIMENTAL { rte_kvargs_strcmp; + # added in 21.11 + rte_kvargs_get_with_value; };
Signature · 1 line
2.30.2
PATCH 4/5 kvargs: remove experimental function to compare string
In reply to Olivier MatzThe function was designed to be used as a handler for rte_kvargs_process() to compare the value string in a kvlist. For readability, its usages in DPDK have been replaced by rte_kvargs_get_with_value() in previous commit.
Remove this function, as it is not used anymore.
--- lib/kvargs/rte_kvargs.c | 9 --------- lib/kvargs/rte_kvargs.h | 26 -------------------------- 2 files changed, 35 deletions(-)
lib/kvargs/rte_kvargs.c +0 -9
@@ -283,12 +283,3 @@ rte_kvargs_parse_delim(const char *args, const char * const valid_keys[],free (copy);return kvlist; } - -int -rte_kvargs_strcmp(const char *key __rte_unused, -const char *value,void *opaque) -{ -const char *str = opaque; - -return -abs (strcmp (str, value)); -}
lib/kvargs/rte_kvargs.h +0 -26
@@ -197,32 +197,6 @@ int rte_kvargs_process(const struct rte_kvargs *kvlist,unsigned rte_kvargs_count (const struct rte_kvargs *kvlist,const char *key_match); -/** -* Generic kvarg handler for string comparison. -* -* This function can be used for a generic string comparison processing -* on a list of kvargs. -* -* @param key -* kvarg pair key. -* -* @param value -* kvarg pair value. -* -* @param opaque -* Opaque pointer to a string. -* -* @return -* 0 if the strings match. -* !0 otherwise or on error. -* -* Unlike strcmp, comparison ordering is not kept. -* In order for rte_kvargs_process to stop processing on match error, -* a negative value is returned even if strcmp had returned a positive one. -*/ -__rte_experimental -int rte_kvargs_strcmp(const char *key, const char *value, void *opaque); - #ifdef __cplusplus }#endif
Signature · 1 line
2.30.2
Re: [dpdk-dev] [PATCH 4/5] kvargs: remove experimental function to compare string
Quoted 8 lines · Olivier Matz
The function was designed to be used as a handler for
rte_kvargs_process()to compare the value string in a kvlist. For readability, its usages in DPDK have been replaced byrte_kvargs_get_with_value()in previous commit.Remove this function, as it is not used anymore.
Signed-off-by Olivier Matz <[email protected]>
Self-nack, I forgot to remove the rte_kvargs_strcmp entry from version.map.
Will send a v2.
PATCH 5/5 kvargs: fix comments style
In reply to Olivier MatzA '*' is missing at 2 places, add them.
--- lib/kvargs/rte_kvargs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
lib/kvargs/rte_kvargs.h +2 -2
@@ -125,7 +125,7 @@ void rte_kvargs_free(struct rte_kvargs *kvlist);* A list of rte_kvargs pair of 'key=value'. * @param key * The matching key. - +* * @return * NULL if no key matches the input, * a value associated with a matching key otherwise.
@@ -190,7 +190,7 @@ int rte_kvargs_process(const struct rte_kvargs *kvlist,* The rte_kvargs structure * @param key_match * The key that should match, or NULL to count all associations - +* * @return * The number of entries */
Signature · 1 line
2.30.2
Quoted 13 lines · Olivier Matz
This patchset promotes 2 functions
rte_kvargs_parse_delim()andrte_kvargs_get()as stable.It also replaces
rte_kvargs_strcmp()by a new onerte_kvargs_get_with_value(), which is easier to use.Olivier Matz (5):
kvargs: promote delimited parsing as stable
kvargs: promote get from key as stable
kvargs: new function to get from key and value
kvargs: remove experimental function to compare string
kvargs: fix comments style
Quoted 7 lines
drivers/bus/auxiliary/auxiliary_params.c | 9 ++-- drivers/bus/vdev/vdev_params.c | 13 +----- lib/kvargs/rte_kvargs.c | 32 +++++++------ lib/kvargs/rte_kvargs.h | 59 ++++++++++++------------ lib/kvargs/version.map | 7 +-- 5 files changed, 57 insertions(+), 63 deletions(-)
The whole series looks good to me, the new function that match key and value directly looks more efficient, thanks!
v2 cover kvargs: promote or remove experimental api
In reply to Olivier MatzThis patchset promotes 2 functions rte_kvargs_parse_delim() and rte_kvargs_get() as stable.
It also replaces rte_kvargs_strcmp() by a new one rte_kvargs_get_with_value(), which is easier to use.
v2
* remove rte_kvargs_strcmp from version.map
Olivier Matz (5):
kvargs: promote delimited parsing as stable
kvargs: promote get from key as stable
kvargs: new function to get from key and value
kvargs: remove experimental function to compare string
kvargs: fix comments style
drivers/bus/auxiliary/auxiliary_params.c | 9 ++-- drivers/bus/vdev/vdev_params.c | 13 +----- lib/kvargs/rte_kvargs.c | 32 +++++++------ lib/kvargs/rte_kvargs.h | 59 ++++++++++++------------ lib/kvargs/version.map | 9 ++-- 5 files changed, 57 insertions(+), 65 deletions(-)
Signature · 1 line
2.30.2
PATCH v2 1/5 kvargs: promote delimited parsing as stable
This function is used by EAL to parse key/value strings separated with specified delimiters.
It was introduced in 2018 by commit 5d6af85ab00c ("kvargs: introduce a more flexible parsing function"), and can be promoted as stable.
--- lib/kvargs/rte_kvargs.h | 1 - lib/kvargs/version.map | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-)
lib/kvargs/rte_kvargs.h +0 -1
@@ -98,7 +98,6 @@ struct rte_kvargs *rte_kvargs_parse(const char *args,* - A pointer to an allocated rte_kvargs structure on success * - NULL on error */ -__rte_experimental struct rte_kvargs *rte_kvargs_parse_delim (const char *args,const char *const valid_keys[],const char *valid_ends);
lib/kvargs/version.map +1 -1
@@ -4,6 +4,7 @@ DPDK_22 { rte_kvargs_count; rte_kvargs_free; rte_kvargs_parse; + rte_kvargs_parse_delim; rte_kvargs_process; local: *;
@@ -12,7 +13,6 @@ DPDK_22 { EXPERIMENTAL { global: - rte_kvargs_parse_delim; rte_kvargs_strcmp; # added in 21.05
Signature · 1 line
2.30.2
PATCH v2 2/5 kvargs: promote get from key as stable
In reply to Olivier MatzThe function rte_kvargs_get() is used by eal and pci bus driver since its introduction in commit 3ab385063cb9 ("kvargs: add get by key") and commit d2a66ad79480 ("bus: add device arguments name parsing"), in dpdk 21.05.
Let's promote it as stable.
--- lib/kvargs/rte_kvargs.h | 1 - lib/kvargs/version.map | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-)
lib/kvargs/rte_kvargs.h +0 -1
@@ -130,7 +130,6 @@ void rte_kvargs_free(struct rte_kvargs *kvlist);* NULL if no key matches the input, * a value associated with a matching key otherwise. */ -__rte_experimental const char *rte_kvargs_get (const struct rte_kvargs *kvlist,const char *key);/**
lib/kvargs/version.map +1 -2
@@ -3,6 +3,7 @@ DPDK_22 { rte_kvargs_count; rte_kvargs_free; + rte_kvargs_get; rte_kvargs_parse; rte_kvargs_parse_delim; rte_kvargs_process;
@@ -15,6 +16,4 @@ EXPERIMENTAL { rte_kvargs_strcmp; - # added in 21.05 - rte_kvargs_get; };
Signature · 1 line
2.30.2
PATCH v2 3/5 kvargs: new function to get from key and value
In reply to Olivier MatzA 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.
--- drivers/bus/auxiliary/auxiliary_params.c | 9 ++++---- drivers/bus/vdev/vdev_params.c | 13 ++--------- lib/kvargs/rte_kvargs.c | 23 +++++++++++++++---- lib/kvargs/rte_kvargs.h | 29 +++++++++++++++++++++++- lib/kvargs/version.map | 2 ++ 5 files changed, 54 insertions(+), 22 deletions(-)
drivers/bus/auxiliary/auxiliary_params.c +4 -5
@@ -25,13 +25,12 @@ auxiliary_dev_match(const struct rte_device *dev, const void *_kvlist) {const struct rte_kvargs *kvlist = _kvlist; -int ret; +const char *key = auxiliary_params_keys[RTE_AUXILIARY_PARAM_NAME ]; - ret =rte_kvargs_process (kvlist, - auxiliary_params_keys[RTE_AUXILIARY_PARAM_NAME ], - rte_kvargs_strcmp, (void *)(uintptr_t )dev->name); +if (rte_kvargs_get_with_value (kvlist, key, dev->name) ==NULL ) +return -1 ; -return ret !=0 ?-1 :0 ; +return 0 ; } void *
drivers/bus/vdev/vdev_params.c +2 -11
@@ -26,19 +26,10 @@ static int vdev_dev_match(const struct rte_device *dev, const void *_kvlist) { - int ret; const struct rte_kvargs *kvlist = _kvlist; -char *name; +const char *key = vdev_params_keys[RTE_VDEV_PARAM_NAME ]; -/* cannot pass const dev->name to rte_kvargs_process() */ - name =strdup (dev->name); -if (name ==NULL ) -return -1 ; - ret =rte_kvargs_process (kvlist, - vdev_params_keys[RTE_VDEV_PARAM_NAME ], - rte_kvargs_strcmp, name); -free (name); -if (ret !=0 ) +if (rte_kvargs_get_with_value (kvlist, key, dev->name) ==NULL )return -1 ;return 0 ;
lib/kvargs/rte_kvargs.c +18 -5
@@ -204,21 +204,34 @@ rte_kvargs_free(struct rte_kvargs *kvlist)free (kvlist); } -/* Lookup a value in an rte_kvargs list by its key. */ +/* Lookup a value in an rte_kvargs list by its key and value. */ const char * -rte_kvargs_get (const struct rte_kvargs *kvlist,const char *key) +rte_kvargs_get_with_value (const struct rte_kvargs *kvlist,const char *key, +const char *value) {unsigned int i; -if (kvlist ==NULL || key ==NULL ) +if (kvlist ==NULL )return NULL ;for (i =0 ; i < kvlist->count; ++i) { -if (strcmp (kvlist->pairs[i].key, key) ==0 ) -return kvlist->pairs[i].value; +if (key !=NULL &&strcmp (kvlist->pairs[i].key, key) !=0 ) +continue ; +if (value !=NULL &&strcmp (kvlist->pairs[i].value, value) !=0 ) +continue ; +return kvlist->pairs[i].value; }return NULL ; } +/* Lookup a value in an rte_kvargs list by its key. */ +const char * +rte_kvargs_get (const struct rte_kvargs *kvlist,const char *key) +{ +if (kvlist ==NULL || key ==NULL ) +return NULL ; +return rte_kvargs_get_with_value (kvlist, key,NULL ); +} +/* * Parse the arguments "key=value,key=value,..." string and return * an allocated structure that contains a key/value list. Also
lib/kvargs/rte_kvargs.h +28 -1
@@ -116,7 +116,7 @@ void rte_kvargs_free(struct rte_kvargs *kvlist);/** * Get the value associated with a given key. * -* If multiple key matches, the value of the first one is returned. +* If multiple keys match, the value of the first one is returned. * * The memory returned is allocated as part of the rte_kvargs structure, * it must never be modified.
@@ -132,6 +132,33 @@ void rte_kvargs_free(struct rte_kvargs *kvlist);*/ const char *rte_kvargs_get (const struct rte_kvargs *kvlist,const char *key); +/** +* @warning +* @b EXPERIMENTAL: this API may change without prior notice +* +* Get the value associated with a given key and value. +* +* Find the first entry in the kvlist whose key and value match the +* ones passed as argument. +* +* The memory returned is allocated as part of the rte_kvargs structure, +* it must never be modified. +* +* @param kvlist +* A list of rte_kvargs pair of 'key=value'. +* @param key +* The matching key. If NULL, any key will match. +* @param value +* The matching value. If NULL, any value will match. +* +* @return +* NULL if no key matches the input, +* a value associated with a matching key otherwise. +*/ +__rte_experimental +const char *rte_kvargs_get_with_value(const struct rte_kvargs *kvlist, +const char *key,const char *value); +/** * Call a handler function for each key/value matching the key *
lib/kvargs/version.map +2 -0
@@ -16,4 +16,6 @@ EXPERIMENTAL { rte_kvargs_strcmp; + # added in 21.11 + rte_kvargs_get_with_value; };
Signature · 1 line
2.30.2
PATCH v2 4/5 kvargs: remove experimental function to compare string
In reply to Olivier MatzThe function was designed to be used as a handler for rte_kvargs_process() to compare the value string in a kvlist. For readability, its usages in DPDK have been replaced by rte_kvargs_get_with_value() in previous commit.
Remove this function, as it is not used anymore.
--- lib/kvargs/rte_kvargs.c | 9 --------- lib/kvargs/rte_kvargs.h | 26 -------------------------- lib/kvargs/version.map | 2 -- 3 files changed, 37 deletions(-)
lib/kvargs/rte_kvargs.c +0 -9
@@ -283,12 +283,3 @@ rte_kvargs_parse_delim(const char *args, const char * const valid_keys[],free (copy);return kvlist; } - -int -rte_kvargs_strcmp(const char *key __rte_unused, -const char *value,void *opaque) -{ -const char *str = opaque; - -return -abs (strcmp (str, value)); -}
lib/kvargs/rte_kvargs.h +0 -26
@@ -197,32 +197,6 @@ int rte_kvargs_process(const struct rte_kvargs *kvlist,unsigned rte_kvargs_count (const struct rte_kvargs *kvlist,const char *key_match); -/** -* Generic kvarg handler for string comparison. -* -* This function can be used for a generic string comparison processing -* on a list of kvargs. -* -* @param key -* kvarg pair key. -* -* @param value -* kvarg pair value. -* -* @param opaque -* Opaque pointer to a string. -* -* @return -* 0 if the strings match. -* !0 otherwise or on error. -* -* Unlike strcmp, comparison ordering is not kept. -* In order for rte_kvargs_process to stop processing on match error, -* a negative value is returned even if strcmp had returned a positive one. -*/ -__rte_experimental -int rte_kvargs_strcmp(const char *key, const char *value, void *opaque); - #ifdef __cplusplus }#endif
lib/kvargs/version.map +0 -2
@@ -14,8 +14,6 @@ DPDK_22 { EXPERIMENTAL { global: - rte_kvargs_strcmp; - # added in 21.11 rte_kvargs_get_with_value; };
Signature · 1 line
2.30.2
Re: [dpdk-dev] [PATCH v2 4/5] kvargs: remove experimental function to compare string
Quoted 9 lines · Olivier Matz
The function was designed to be used as a handler for
rte_kvargs_process()to compare the value string in a kvlist. For readability, its usages in DPDK have been replaced byrte_kvargs_get_with_value()in previous commit.Remove this function, as it is not used anymore.
Signed-off-by Olivier Matz <[email protected]>Reviewed-by Xueming Li <[email protected]>
Maybe a quick note could be added in the release note. Something like this:
* kvargs: The experimental function ``rte_kvargs_strcmp()`` has been removed. Its usages have been replaced by a new function ``rte_kvargs_get_with_value()``.
David, do you want me to send a v3 with this note?
Thanks,
Olivier
Re: [dpdk-dev] [PATCH v2 4/5] kvargs: remove experimental function to compare string
Quoted 12 lines · Olivier Matz
Quoted 9 lines · Olivier Matz
The function was designed to be used as a handler for
rte_kvargs_process()to compare the value string in a kvlist. For readability, its usages in DPDK have been replaced byrte_kvargs_get_with_value()in previous commit.Remove this function, as it is not used anymore.
Signed-off-by Olivier Matz <[email protected]>Reviewed-by Xueming Li <[email protected]>
Quoted 8 lines
Maybe a quick note could be added in the release note. Something like this:
* kvargs: The experimental function ``rte_kvargs_strcmp()`` has been removed. Its usages have been replaced by a new function ``rte_kvargs_get_with_value()``.
David, do you want me to send a v3 with this note?
Yes, a RN update for API changes is a good practice :-). No need to send v3, I'll add it and merge the series (soon).
Thanks Olivier.
Signature · 1 line
David Marchand
PATCH v2 5/5 kvargs: fix comments style
In reply to Olivier MatzA '*' is missing at 2 places, add them.
--- lib/kvargs/rte_kvargs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
lib/kvargs/rte_kvargs.h +2 -2
@@ -125,7 +125,7 @@ void rte_kvargs_free(struct rte_kvargs *kvlist);* A list of rte_kvargs pair of 'key=value'. * @param key * The matching key. - +* * @return * NULL if no key matches the input, * a value associated with a matching key otherwise.
@@ -190,7 +190,7 @@ int rte_kvargs_process(const struct rte_kvargs *kvlist,* The rte_kvargs structure * @param key_match * The key that should match, or NULL to count all associations - +* * @return * The number of entries */
Signature · 1 line
2.30.2
Quoted 10 lines · Olivier Matz
This patchset promotes 2 functions
rte_kvargs_parse_delim()andrte_kvargs_get()as stable.It also replaces
rte_kvargs_strcmp()by a new onerte_kvargs_get_with_value(), which is easier to use.v2
* removerte_kvargs_strcmpfrom version.map
Quoted 6 lines
Olivier Matz (5):
kvargs: promote delimited parsing as stable
kvargs: promote get from key as stable
kvargs: new function to get from key and value
kvargs: remove experimental function to compare string
kvargs: fix comments style
Thanks, for the series,
Signature · 1 line
David Marchand
Kinsella, Ray
Acked-byQuoted 18 lines · David Marchand
Quoted 10 lines · Olivier Matz
This patchset promotes 2 functions
rte_kvargs_parse_delim()andrte_kvargs_get()as stable.It also replaces
rte_kvargs_strcmp()by a new onerte_kvargs_get_with_value(), which is easier to use.v2
* removerte_kvargs_strcmpfrom version.mapQuoted 6 lines
Olivier Matz (5):
kvargs: promote delimited parsing as stable
kvargs: promote get from key as stable
kvargs: new function to get from key and value
kvargs: remove experimental function to compare string
kvargs: fix comments style
Quoted 3 lines
Thanks, for the series,
Reviewed-by David Marchand <[email protected]>
Quoted 19 lines · Ray
Quoted 18 lines · David Marchand
Quoted 16 lines · Olivier Matz
This patchset promotes 2 functions
rte_kvargs_parse_delim()andrte_kvargs_get()as stable.It also replaces
rte_kvargs_strcmp()by a new onerte_kvargs_get_with_value(), which is easier to use.v2
* removerte_kvargs_strcmpfrom version.mapOlivier Matz (5):
kvargs: promote delimited parsing as stable
kvargs: promote get from key as stable
kvargs: new function to get from key and value
kvargs: remove experimental function to compare string
kvargs: fix comments style
Quoted 4 lines
Quoted 2 lines
Thanks, for the series,
Reviewed-by David Marchand <[email protected]>Acked-by Ray Kinsella <[email protected]>
Added RN update and applied as discussed.
Thanks.
Signature · 1 line
David Marchand