DPDK patches and discussions
 help / color / mirror / Atom feed
From: Olivier Matz <olivier.matz@6wind.com>
To: dev@dpdk.org
Cc: Olivier Matz <olivier.matz@6wind.com>,
	Bruce Richardson <bruce.richardson@intel.com>,
	Xueming Li <xuemingl@nvidia.com>, Gaetan Rivet <grive@u256.net>,
	Ray Kinsella <mdr@ashroe.eu>
Subject: [dpdk-dev] [PATCH 4/5] kvargs: remove experimental function to compare string
Date: Fri, 24 Sep 2021 17:57:39 +0200	[thread overview]
Message-ID: <20210924155740.20510-5-olivier.matz@6wind.com> (raw)
In-Reply-To: <20210924155740.20510-1-olivier.matz@6wind.com>

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(-)

diff --git a/lib/kvargs/rte_kvargs.c b/lib/kvargs/rte_kvargs.c
index 20abb23183..11f624ef14 100644
--- a/lib/kvargs/rte_kvargs.c
+++ b/lib/kvargs/rte_kvargs.c
@@ -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));
-}
diff --git a/lib/kvargs/rte_kvargs.h b/lib/kvargs/rte_kvargs.h
index e40df1bd2a..3c1754c3d9 100644
--- a/lib/kvargs/rte_kvargs.h
+++ b/lib/kvargs/rte_kvargs.h
@@ -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
-- 
2.30.2


  parent reply	other threads:[~2021-09-24 15:58 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-24 15:57 [dpdk-dev] [PATCH 0/5] kvargs: promote or remove experimental api Olivier Matz
2021-09-24 15:57 ` [dpdk-dev] [PATCH 1/5] kvargs: promote delimited parsing as stable Olivier Matz
2021-09-24 15:57 ` [dpdk-dev] [PATCH 2/5] kvargs: promote get from key " Olivier Matz
2021-09-24 15:57 ` [dpdk-dev] [PATCH 3/5] kvargs: new function to get from key and value Olivier Matz
2021-09-24 15:57 ` Olivier Matz [this message]
2021-09-26 16:30   ` [dpdk-dev] [PATCH 4/5] kvargs: remove experimental function to compare string Olivier Matz
2021-09-24 15:57 ` [dpdk-dev] [PATCH 5/5] kvargs: fix comments style Olivier Matz
2021-09-25  7:02 ` [dpdk-dev] [PATCH 0/5] kvargs: promote or remove experimental api Xueming(Steven) Li
2021-09-29 21:39 ` [dpdk-dev] [PATCH v2 " Olivier Matz
2021-09-29 21:39   ` [dpdk-dev] [PATCH v2 1/5] kvargs: promote delimited parsing as stable Olivier Matz
2021-09-29 21:39   ` [dpdk-dev] [PATCH v2 2/5] kvargs: promote get from key " Olivier Matz
2021-09-29 21:39   ` [dpdk-dev] [PATCH v2 3/5] kvargs: new function to get from key and value Olivier Matz
2021-09-29 21:39   ` [dpdk-dev] [PATCH v2 4/5] kvargs: remove experimental function to compare string Olivier Matz
2021-09-30 14:00     ` Olivier Matz
2021-09-30 15:19       ` David Marchand
2021-09-29 21:39   ` [dpdk-dev] [PATCH v2 5/5] kvargs: fix comments style Olivier Matz
2021-09-30  8:25   ` [dpdk-dev] [PATCH v2 0/5] kvargs: promote or remove experimental api David Marchand
2021-09-30  9:57     ` Kinsella, Ray
2021-09-30 16:19       ` David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210924155740.20510-5-olivier.matz@6wind.com \
    --to=olivier.matz@6wind.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=grive@u256.net \
    --cc=mdr@ashroe.eu \
    --cc=xuemingl@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).