[4/5] kvargs: remove experimental function to compare string
Checks
Commit Message
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 by
rte_kvargs_get_with_value() in previous commit.
Remove this function, as it is not used anymore.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
lib/kvargs/rte_kvargs.c | 9 ---------
lib/kvargs/rte_kvargs.h | 26 --------------------------
2 files changed, 35 deletions(-)
Comments
On Fri, Sep 24, 2021 at 05:57:39PM +0200, Olivier Matz wrote:
> 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 by
> rte_kvargs_get_with_value() in previous commit.
>
> Remove this function, as it is not used anymore.
>
> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Self-nack, I forgot to remove the rte_kvargs_strcmp entry
from version.map.
Will send a v2.
@@ -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));
-}
@@ -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