DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: dev@dpdk.org
Cc: gaetan.rivet@6wind.com, ophirmu@mellanox.com,
	qi.z.zhang@intel.com, ferruh.yigit@intel.com,
	ktraynor@redhat.com
Subject: [dpdk-dev] [PATCH v2 1/4] devargs: remove deprecated functions
Date: Wed, 26 Sep 2018 23:47:56 +0200	[thread overview]
Message-ID: <20180926214759.1856-2-thomas@monjalon.net> (raw)
In-Reply-To: <20180926214759.1856-1-thomas@monjalon.net>

rte_eal_parse_devargs_str() does not support parsing the bus name
at the start of devargs. So it has been renamed and deprecated.

rte_eal_devargs_add(), rte_eal_devargs_type_count() and
rte_eal_devargs_dump() were declared deprecated and had their
implementation body renamed.

All these functions were deprecated in release 18.05.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
The library version is not updated because it should be done
in earlier patch https://patches.dpdk.org/patch/43903/
---
 lib/librte_eal/common/eal_common_devargs.c  | 30 ---------
 lib/librte_eal/common/include/rte_devargs.h | 71 ---------------------
 lib/librte_eal/rte_eal_version.map          |  4 --
 3 files changed, 105 deletions(-)

diff --git a/lib/librte_eal/common/eal_common_devargs.c b/lib/librte_eal/common/eal_common_devargs.c
index dac2402a4..f63d2c663 100644
--- a/lib/librte_eal/common/eal_common_devargs.c
+++ b/lib/librte_eal/common/eal_common_devargs.c
@@ -31,36 +31,6 @@ TAILQ_HEAD(rte_devargs_list, rte_devargs);
 struct rte_devargs_list devargs_list =
 	TAILQ_HEAD_INITIALIZER(devargs_list);
 
-int
-rte_eal_parse_devargs_str(const char *devargs_str,
-			char **drvname, char **drvargs)
-{
-	char *sep;
-
-	if ((devargs_str) == NULL || (drvname) == NULL || (drvargs == NULL))
-		return -1;
-
-	*drvname = strdup(devargs_str);
-	if (*drvname == NULL)
-		return -1;
-
-	/* set the first ',' to '\0' to split name and arguments */
-	sep = strchr(*drvname, ',');
-	if (sep != NULL) {
-		sep[0] = '\0';
-		*drvargs = strdup(sep + 1);
-	} else {
-		*drvargs = strdup("");
-	}
-
-	if (*drvargs == NULL) {
-		free(*drvname);
-		*drvname = NULL;
-		return -1;
-	}
-	return 0;
-}
-
 static size_t
 devargs_layer_count(const char *s)
 {
diff --git a/lib/librte_eal/common/include/rte_devargs.h b/lib/librte_eal/common/include/rte_devargs.h
index 097a4ce7b..0eef6e9c4 100644
--- a/lib/librte_eal/common/include/rte_devargs.h
+++ b/lib/librte_eal/common/include/rte_devargs.h
@@ -66,36 +66,6 @@ struct rte_devargs {
 	const char *data; /**< Device string storage. */
 };
 
-/**
- * @deprecated
- * Parse a devargs string.
- *
- * For PCI devices, the format of arguments string is "PCI_ADDR" or
- * "PCI_ADDR,key=val,key2=val2,...". Examples: "08:00.1", "0000:5:00.0",
- * "04:00.0,arg=val".
- *
- * For virtual devices, the format of arguments string is "DRIVER_NAME*"
- * or "DRIVER_NAME*,key=val,key2=val2,...". Examples: "net_ring",
- * "net_ring0", "net_pmdAnything,arg=0:arg2=1".
- *
- * The function parses the arguments string to get driver name and driver
- * arguments.
- *
- * @param devargs_str
- *   The arguments as given by the user.
- * @param drvname
- *   The pointer to the string to store parsed driver name.
- * @param drvargs
- *   The pointer to the string to store parsed driver arguments.
- *
- * @return
- *   - 0 on success
- *   - A negative value on error
- */
-__rte_deprecated
-int rte_eal_parse_devargs_str(const char *devargs_str,
-				char **drvname, char **drvargs);
-
 /**
  * Parse a device string.
  *
@@ -201,23 +171,6 @@ rte_devargs_insert(struct rte_devargs *da);
 __rte_experimental
 int rte_devargs_add(enum rte_devtype devtype, const char *devargs_str);
 
-/**
- * @deprecated
- * Add a device to the user device list
- * See rte_devargs_parse() for details.
- *
- * @param devtype
- *   The type of the device.
- * @param devargs_str
- *   The arguments as given by the user.
- *
- * @return
- *   - 0 on success
- *   - A negative value on error
- */
-__rte_deprecated
-int rte_eal_devargs_add(enum rte_devtype devtype, const char *devargs_str);
-
 /**
  * Remove a device from the user device list.
  * Its resources are freed.
@@ -251,20 +204,6 @@ __rte_experimental
 unsigned int
 rte_devargs_type_count(enum rte_devtype devtype);
 
-/**
- * @deprecated
- * Count the number of user devices of a specified type
- *
- * @param devtype
- *   The type of the devices to counted.
- *
- * @return
- *   The number of devices.
- */
-__rte_deprecated
-unsigned int
-rte_eal_devargs_type_count(enum rte_devtype devtype);
-
 /**
  * This function dumps the list of user device and their arguments.
  *
@@ -274,16 +213,6 @@ rte_eal_devargs_type_count(enum rte_devtype devtype);
 __rte_experimental
 void rte_devargs_dump(FILE *f);
 
-/**
- * @deprecated
- * This function dumps the list of user device and their arguments.
- *
- * @param f
- *   A pointer to a file for output
- */
-__rte_deprecated
-void rte_eal_devargs_dump(FILE *f);
-
 /**
  * Find next rte_devargs matching the provided bus name.
  *
diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map
index 73282bbb0..3df7f9831 100644
--- a/lib/librte_eal/rte_eal_version.map
+++ b/lib/librte_eal/rte_eal_version.map
@@ -19,9 +19,6 @@ DPDK_2.0 {
 	rte_dump_tailq;
 	rte_eal_alarm_cancel;
 	rte_eal_alarm_set;
-	rte_eal_devargs_add;
-	rte_eal_devargs_dump;
-	rte_eal_devargs_type_count;
 	rte_eal_get_configuration;
 	rte_eal_get_lcore_state;
 	rte_eal_get_physmem_size;
@@ -32,7 +29,6 @@ DPDK_2.0 {
 	rte_eal_lcore_role;
 	rte_eal_mp_remote_launch;
 	rte_eal_mp_wait_lcore;
-	rte_eal_parse_devargs_str;
 	rte_eal_process_type;
 	rte_eal_remote_launch;
 	rte_eal_tailq_lookup;
-- 
2.19.0

  reply	other threads:[~2018-09-26 21:48 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-07 22:27 [dpdk-dev] [RFC] eal: simplify parameters of hotplug functions Thomas Monjalon
2018-09-26 21:47 ` [dpdk-dev] [PATCH v2 0/4] eal: simplify devargs and " Thomas Monjalon
2018-09-26 21:47   ` Thomas Monjalon [this message]
2018-09-26 21:47   ` [dpdk-dev] [PATCH v2 2/4] devargs: simplify parameters of removal function Thomas Monjalon
2018-09-27  8:24     ` Ophir Munk
2018-09-27 21:31       ` Thomas Monjalon
2018-09-26 21:47   ` [dpdk-dev] [PATCH v2 3/4] eal: remove experimental flag of hotplug functions Thomas Monjalon
2018-09-26 21:47   ` [dpdk-dev] [PATCH v2 4/4] eal: simplify parameters " Thomas Monjalon
2018-09-28 16:21 ` [dpdk-dev] [PATCH v3 0/4] eal: simplify devargs and " Thomas Monjalon
2018-09-28 16:21   ` [dpdk-dev] [PATCH v3 1/4] devargs: remove deprecated functions Thomas Monjalon
2018-10-01 11:24     ` Andrew Rybchenko
2018-10-01 17:10       ` Thomas Monjalon
2018-09-28 16:21   ` [dpdk-dev] [PATCH v3 2/4] devargs: simplify parameters of removal function Thomas Monjalon
2018-10-01 11:25     ` Andrew Rybchenko
2018-10-01 19:47       ` Thomas Monjalon
2018-09-28 16:21   ` [dpdk-dev] [PATCH v3 3/4] eal: remove experimental flag of hotplug functions Thomas Monjalon
2018-10-01 11:26     ` Andrew Rybchenko
2018-10-01 19:54       ` Thomas Monjalon
2018-10-02 10:28     ` Ferruh Yigit
2018-10-03  8:42       ` Thomas Monjalon
2018-09-28 16:21   ` [dpdk-dev] [PATCH v3 4/4] eal: simplify parameters " Thomas Monjalon
2018-10-01 11:26     ` Andrew Rybchenko
2018-10-01 20:03       ` Thomas Monjalon
2018-10-01 20:52 ` [dpdk-dev] [PATCH v4 0/4] eal: simplify devargs and " Thomas Monjalon
2018-10-01 20:52   ` [dpdk-dev] [PATCH v4 1/4] devargs: remove deprecated functions Thomas Monjalon
2018-10-01 20:52   ` [dpdk-dev] [PATCH v4 2/4] devargs: simplify parameters of removal function Thomas Monjalon
2018-10-01 20:52   ` [dpdk-dev] [PATCH v4 3/4] eal: remove experimental flag of hotplug functions Thomas Monjalon
2018-10-01 20:52   ` [dpdk-dev] [PATCH v4 4/4] eal: simplify parameters " Thomas Monjalon
2018-10-03 23:10 ` [dpdk-dev] [PATCH v5 0/5] eal: simplify devargs and " Thomas Monjalon
2018-10-03 23:10   ` [dpdk-dev] [PATCH v5 1/5] devargs: remove deprecated functions Thomas Monjalon
2018-10-04  9:19     ` Gaëtan Rivet
2018-10-03 23:10   ` [dpdk-dev] [PATCH v5 2/5] devargs: simplify parameters of removal function Thomas Monjalon
2018-10-04  9:21     ` Gaëtan Rivet
2018-10-03 23:10   ` [dpdk-dev] [PATCH v5 3/5] eal: add bus pointer in device structure Thomas Monjalon
2018-10-04  9:31     ` Gaëtan Rivet
2018-10-04  9:48       ` Thomas Monjalon
2018-10-03 23:10   ` [dpdk-dev] [PATCH v5 4/5] eal: remove experimental flag of hotplug functions Thomas Monjalon
2018-10-04  9:33     ` Gaëtan Rivet
2018-10-03 23:10   ` [dpdk-dev] [PATCH v5 5/5] eal: simplify parameters " Thomas Monjalon
2018-10-04  9:44     ` Gaëtan Rivet
2018-10-04 11:46       ` Thomas Monjalon
2018-10-04 11:51         ` Gaëtan Rivet
2018-10-07  9:32 ` [dpdk-dev] [PATCH v6 0/5] eal: simplify devargs and " Thomas Monjalon
2018-10-07  9:32   ` [dpdk-dev] [PATCH v6 1/5] devargs: remove deprecated functions Thomas Monjalon
2018-10-07  9:32   ` [dpdk-dev] [PATCH v6 2/5] devargs: simplify parameters of removal function Thomas Monjalon
2018-10-07  9:32   ` [dpdk-dev] [PATCH v6 3/5] eal: add bus pointer in device structure Thomas Monjalon
2018-10-07  9:32   ` [dpdk-dev] [PATCH v6 4/5] eal: remove experimental flag of hotplug functions Thomas Monjalon
2018-10-07  9:32   ` [dpdk-dev] [PATCH v6 5/5] eal: simplify parameters " Thomas Monjalon
2018-10-08 21:45   ` [dpdk-dev] [PATCH v6 0/5] eal: simplify devargs and " Stephen Hemminger
2018-10-11 12:10     ` Thomas Monjalon

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=20180926214759.1856-2-thomas@monjalon.net \
    --to=thomas@monjalon.net \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=gaetan.rivet@6wind.com \
    --cc=ktraynor@redhat.com \
    --cc=ophirmu@mellanox.com \
    --cc=qi.z.zhang@intel.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).