[v3,3/4] eal: remove experimental flag of hotplug functions

Message ID 20180928162144.1972-4-thomas@monjalon.net (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series eal: simplify devargs and hotplug functions |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Thomas Monjalon Sept. 28, 2018, 4:21 p.m. UTC
  These functions are quite old and are the only available replacement
for the deprecated attach/detach functions.

Note: some new functions may (again) replace these hotplug functions,
in future, with better parameters.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 lib/librte_eal/common/eal_common_dev.c  |  7 ++++---
 lib/librte_eal/common/include/rte_dev.h | 11 ++---------
 lib/librte_eal/rte_eal_version.map      |  4 ++--
 3 files changed, 8 insertions(+), 14 deletions(-)
  

Comments

Andrew Rybchenko Oct. 1, 2018, 11:26 a.m. UTC | #1
On 9/28/18 7:21 PM, Thomas Monjalon wrote:
> These functions are quite old and are the only available replacement
> for the deprecated attach/detach functions.
>
> Note: some new functions may (again) replace these hotplug functions,
> in future, with better parameters.
>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>

Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>

Should it be mentioned in release notes?
  
Thomas Monjalon Oct. 1, 2018, 7:54 p.m. UTC | #2
01/10/2018 13:26, Andrew Rybchenko:
> On 9/28/18 7:21 PM, Thomas Monjalon wrote:
> > These functions are quite old and are the only available replacement
> > for the deprecated attach/detach functions.
> >
> > Note: some new functions may (again) replace these hotplug functions,
> > in future, with better parameters.
> >
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> 
> Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
> 
> Should it be mentioned in release notes?

There is no dedicated section for functions becoming "stable".
I am afraid it may become too much administrative if we want to note
all functions moving from experimental.
  
Ferruh Yigit Oct. 2, 2018, 10:28 a.m. UTC | #3
On 9/28/2018 5:21 PM, Thomas Monjalon wrote:
> These functions are quite old and are the only available replacement
> for the deprecated attach/detach functions.
> 
> Note: some new functions may (again) replace these hotplug functions,
> in future, with better parameters.
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
>  lib/librte_eal/common/eal_common_dev.c  |  7 ++++---
>  lib/librte_eal/common/include/rte_dev.h | 11 ++---------
>  lib/librte_eal/rte_eal_version.map      |  4 ++--

Can remove "-DALLOW_EXPERIMENTAL_API" (or "allow_experimental_apis = true" for
meson) from drivers/raw/ifpga_rawdev when these APIs are not experimental anymore.
For reference: https://patches.dpdk.org/patch/45836/

It is easy to know when to add "-DALLOW_EXPERIMENTAL_API" but it is hard to know
when to remove one, some helper should be good there.
  
Thomas Monjalon Oct. 3, 2018, 8:42 a.m. UTC | #4
02/10/2018 12:28, Ferruh Yigit:
> On 9/28/2018 5:21 PM, Thomas Monjalon wrote:
> > These functions are quite old and are the only available replacement
> > for the deprecated attach/detach functions.
> > 
> > Note: some new functions may (again) replace these hotplug functions,
> > in future, with better parameters.
> > 
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > ---
> >  lib/librte_eal/common/eal_common_dev.c  |  7 ++++---
> >  lib/librte_eal/common/include/rte_dev.h | 11 ++---------
> >  lib/librte_eal/rte_eal_version.map      |  4 ++--
> 
> Can remove "-DALLOW_EXPERIMENTAL_API" (or "allow_experimental_apis = true" for
> meson) from drivers/raw/ifpga_rawdev when these APIs are not experimental anymore.
> For reference: https://patches.dpdk.org/patch/45836/

Yes we could remove this flag in this patch.
But the next series would add it again:
	https://patches.dpdk.org/patch/45601/

So I think it is not worth for now.

> It is easy to know when to add "-DALLOW_EXPERIMENTAL_API" but it is hard to know
> when to remove one, some helper should be good there.

Yes, we should try to clean up those flags regularly after each -rc1 release.
But we don't have any tooling for that.
  

Patch

diff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c
index e81ff4258..a9be58edf 100644
--- a/lib/librte_eal/common/eal_common_dev.c
+++ b/lib/librte_eal/common/eal_common_dev.c
@@ -127,8 +127,9 @@  int rte_eal_dev_detach(struct rte_device *dev)
 	return ret;
 }
 
-int __rte_experimental rte_eal_hotplug_add(const char *busname, const char *devname,
-			const char *devargs)
+int
+rte_eal_hotplug_add(const char *busname, const char *devname,
+		    const char *devargs)
 {
 	struct rte_bus *bus;
 	struct rte_device *dev;
@@ -193,7 +194,7 @@  int __rte_experimental rte_eal_hotplug_add(const char *busname, const char *devn
 	return ret;
 }
 
-int __rte_experimental
+int
 rte_eal_hotplug_remove(const char *busname, const char *devname)
 {
 	struct rte_bus *bus;
diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h
index b80a80598..d440c4e58 100644
--- a/lib/librte_eal/common/include/rte_dev.h
+++ b/lib/librte_eal/common/include/rte_dev.h
@@ -189,9 +189,6 @@  __rte_deprecated
 int rte_eal_dev_detach(struct rte_device *dev);
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
  * Hotplug add a given device to a specific bus.
  *
  * @param busname
@@ -204,13 +201,10 @@  int rte_eal_dev_detach(struct rte_device *dev);
  * @return
  *   0 on success, negative on error.
  */
-int __rte_experimental rte_eal_hotplug_add(const char *busname, const char *devname,
+int rte_eal_hotplug_add(const char *busname, const char *devname,
 			const char *devargs);
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
  * Hotplug remove a given device from a specific bus.
  *
  * @param busname
@@ -220,8 +214,7 @@  int __rte_experimental rte_eal_hotplug_add(const char *busname, const char *devn
  * @return
  *   0 on success, negative on error.
  */
-int __rte_experimental rte_eal_hotplug_remove(const char *busname,
-					  const char *devname);
+int rte_eal_hotplug_remove(const char *busname, const char *devname);
 
 /**
  * Device comparison function.
diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map
index 3df7f9831..6bff37f4b 100644
--- a/lib/librte_eal/rte_eal_version.map
+++ b/lib/librte_eal/rte_eal_version.map
@@ -261,6 +261,8 @@  DPDK_18.08 {
 DPDK_18.11 {
 	global:
 
+	rte_eal_hotplug_add;
+	rte_eal_hotplug_remove;
 	rte_strscpy;
 
 } DPDK_18.08;
@@ -288,8 +290,6 @@  EXPERIMENTAL {
 	rte_devargs_remove;
 	rte_devargs_type_count;
 	rte_eal_cleanup;
-	rte_eal_hotplug_add;
-	rte_eal_hotplug_remove;
 	rte_fbarray_attach;
 	rte_fbarray_destroy;
 	rte_fbarray_detach;