[1/2] eal: remove experimental tag for probe/remove

Message ID 20181101144633.13429-2-thomas@monjalon.net (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series remove experimental tag for hotplug API |

Checks

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

Commit Message

Thomas Monjalon Nov. 1, 2018, 2:46 p.m. UTC
  The functions rte_dev_probe() and rte_dev_remove() are new
in DPDK 18.11 so they got the experimental tag by policy.
However they are too much basic functions for being skipped
by strict applications which do not use experimental functions.

The alternative is to use rte_eal_hotplug_add() and
rte_eal_hotplug_remove(), but their API requires the application
to parse the devargs string in order to provide bus name,
device name and driver arguments.

The new function rte_dev_probe() is really simpler to use and
more flexible by accepting any devargs string.
Let's encourage applications to use it.

The old functions rte_eal_hotplug_* may be deprecated later.

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

Comments

Kevin Traynor Nov. 5, 2018, 12:19 p.m. UTC | #1
On 11/01/2018 02:46 PM, Thomas Monjalon wrote:
> The functions rte_dev_probe() and rte_dev_remove() are new
> in DPDK 18.11 so they got the experimental tag by policy.
> However they are too much basic functions for being skipped
> by strict applications which do not use experimental functions.
> 
> The alternative is to use rte_eal_hotplug_add() and
> rte_eal_hotplug_remove(), but their API requires the application
> to parse the devargs string in order to provide bus name,
> device name and driver arguments.
> 
> The new function rte_dev_probe() is really simpler to use and
> more flexible by accepting any devargs string.
> Let's encourage applications to use it.
> 
> The old functions rte_eal_hotplug_* may be deprecated later.
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>

one minor comment below, but it's no big deal..

Acked-by: Kevin Traynor <ktraynor@redhat.com>
Tested-by: Kevin Traynor <ktraynor@redhat.com>

> ---
>  lib/librte_eal/common/eal_common_dev.c  |  4 ++--
>  lib/librte_eal/common/include/rte_dev.h | 10 ++--------
>  lib/librte_eal/rte_eal_version.map      |  4 ++--
>  3 files changed, 6 insertions(+), 12 deletions(-)
> 
> diff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c
> index 62e9ed477..5759ec2d8 100644
> --- a/lib/librte_eal/common/eal_common_dev.c
> +++ b/lib/librte_eal/common/eal_common_dev.c
> @@ -186,7 +186,7 @@ local_dev_probe(const char *devargs, struct rte_device **new_dev)
>  	return ret;
>  }
>  
> -int __rte_experimental
> +int
>  rte_dev_probe(const char *devargs)
>  {
>  	struct eal_dev_mp_req req;
> @@ -322,7 +322,7 @@ local_dev_remove(struct rte_device *dev)
>  	return 0;
>  }
>  
> -int __rte_experimental
> +int
>  rte_dev_remove(struct rte_device *dev)
>  {
>  	struct eal_dev_mp_req req;
> diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h
> index cd6c187cc..a9724dc91 100644
> --- a/lib/librte_eal/common/include/rte_dev.h
> +++ b/lib/librte_eal/common/include/rte_dev.h
> @@ -196,9 +196,6 @@ int rte_eal_hotplug_add(const char *busname, const char *devname,
>  			const char *drvargs);
>  
>  /**
> - * @warning
> - * @b EXPERIMENTAL: this API may change without prior notice
> - *
>   * Add matching devices.
>   *
>   * In multi-process, it will request other processes to add the same device.
> @@ -209,7 +206,7 @@ int rte_eal_hotplug_add(const char *busname, const char *devname,
>   * @return
>   *   0 on success, negative on error.
>   */
> -int __rte_experimental rte_dev_probe(const char *devargs);
> +int rte_dev_probe(const char *devargs);
>  
>  /**
>   * Hotplug remove a given device from a specific bus.
> @@ -227,9 +224,6 @@ int __rte_experimental rte_dev_probe(const char *devargs);
>  int rte_eal_hotplug_remove(const char *busname, const char *devname);
>  
>  /**
> - * @warning
> - * @b EXPERIMENTAL: this API may change without prior notice
> - *
>   * Remove one device.
>   *
>   * In multi-process, it will request other processes to remove the same device.
> @@ -240,7 +234,7 @@ int rte_eal_hotplug_remove(const char *busname, const char *devname);
>   * @return
>   *   0 on success, negative on error.
>   */
> -int __rte_experimental rte_dev_remove(struct rte_device *dev);
> +int rte_dev_remove(struct rte_device *dev);
>  
>  /**
>   * Device comparison function.
> diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map
> index 04f624246..be4976e3d 100644
> --- a/lib/librte_eal/rte_eal_version.map
> +++ b/lib/librte_eal/rte_eal_version.map
> @@ -262,6 +262,8 @@ DPDK_18.11 {
>  	rte_eal_get_runtime_dir;
>  	rte_eal_hotplug_add;
>  	rte_eal_hotplug_remove;
> +	rte_dev_probe;
> +	rte_dev_remove;

maybe you want to keep these in alphabetical order

>  	rte_strscpy;
>  
>  } DPDK_18.08;
> @@ -285,8 +287,6 @@ EXPERIMENTAL {
>  	rte_dev_is_probed;
>  	rte_dev_iterator_init;
>  	rte_dev_iterator_next;
> -	rte_dev_probe;
> -	rte_dev_remove;
>  	rte_devargs_add;
>  	rte_devargs_dump;
>  	rte_devargs_insert;
>
  
Thomas Monjalon Nov. 5, 2018, 1:13 p.m. UTC | #2
05/11/2018 13:19, Kevin Traynor:
> On 11/01/2018 02:46 PM, Thomas Monjalon wrote:
> > The functions rte_dev_probe() and rte_dev_remove() are new
> > in DPDK 18.11 so they got the experimental tag by policy.
> > However they are too much basic functions for being skipped
> > by strict applications which do not use experimental functions.
> > 
> > The alternative is to use rte_eal_hotplug_add() and
> > rte_eal_hotplug_remove(), but their API requires the application
> > to parse the devargs string in order to provide bus name,
> > device name and driver arguments.
> > 
> > The new function rte_dev_probe() is really simpler to use and
> > more flexible by accepting any devargs string.
> > Let's encourage applications to use it.
> > 
> > The old functions rte_eal_hotplug_* may be deprecated later.
> > 
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> 
> one minor comment below, but it's no big deal..
> 
> Acked-by: Kevin Traynor <ktraynor@redhat.com>
> Tested-by: Kevin Traynor <ktraynor@redhat.com>
[...]
> > --- a/lib/librte_eal/rte_eal_version.map
> > +++ b/lib/librte_eal/rte_eal_version.map
> > @@ -262,6 +262,8 @@ DPDK_18.11 {
> >  	rte_eal_get_runtime_dir;
> >  	rte_eal_hotplug_add;
> >  	rte_eal_hotplug_remove;
> > +	rte_dev_probe;
> > +	rte_dev_remove;
> 
> maybe you want to keep these in alphabetical order

Oh yes, I must revise the alphabetical order!
Thanks
  
Thomas Monjalon Nov. 5, 2018, 11:08 p.m. UTC | #3
05/11/2018 14:13, Thomas Monjalon:
> 05/11/2018 13:19, Kevin Traynor:
> > On 11/01/2018 02:46 PM, Thomas Monjalon wrote:
> > > The functions rte_dev_probe() and rte_dev_remove() are new
> > > in DPDK 18.11 so they got the experimental tag by policy.
> > > However they are too much basic functions for being skipped
> > > by strict applications which do not use experimental functions.
> > > 
> > > The alternative is to use rte_eal_hotplug_add() and
> > > rte_eal_hotplug_remove(), but their API requires the application
> > > to parse the devargs string in order to provide bus name,
> > > device name and driver arguments.
> > > 
> > > The new function rte_dev_probe() is really simpler to use and
> > > more flexible by accepting any devargs string.
> > > Let's encourage applications to use it.
> > > 
> > > The old functions rte_eal_hotplug_* may be deprecated later.
> > > 
> > > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > 
> > one minor comment below, but it's no big deal..
> > 
> > Acked-by: Kevin Traynor <ktraynor@redhat.com>
> > Tested-by: Kevin Traynor <ktraynor@redhat.com>
> [...]
> > > --- a/lib/librte_eal/rte_eal_version.map
> > > +++ b/lib/librte_eal/rte_eal_version.map
> > > @@ -262,6 +262,8 @@ DPDK_18.11 {
> > >  	rte_eal_get_runtime_dir;
> > >  	rte_eal_hotplug_add;
> > >  	rte_eal_hotplug_remove;
> > > +	rte_dev_probe;
> > > +	rte_dev_remove;
> > 
> > maybe you want to keep these in alphabetical order
> 
> Oh yes, I must revise the alphabetical order!
> Thanks

Series applied with above change.
  

Patch

diff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c
index 62e9ed477..5759ec2d8 100644
--- a/lib/librte_eal/common/eal_common_dev.c
+++ b/lib/librte_eal/common/eal_common_dev.c
@@ -186,7 +186,7 @@  local_dev_probe(const char *devargs, struct rte_device **new_dev)
 	return ret;
 }
 
-int __rte_experimental
+int
 rte_dev_probe(const char *devargs)
 {
 	struct eal_dev_mp_req req;
@@ -322,7 +322,7 @@  local_dev_remove(struct rte_device *dev)
 	return 0;
 }
 
-int __rte_experimental
+int
 rte_dev_remove(struct rte_device *dev)
 {
 	struct eal_dev_mp_req req;
diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h
index cd6c187cc..a9724dc91 100644
--- a/lib/librte_eal/common/include/rte_dev.h
+++ b/lib/librte_eal/common/include/rte_dev.h
@@ -196,9 +196,6 @@  int rte_eal_hotplug_add(const char *busname, const char *devname,
 			const char *drvargs);
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
  * Add matching devices.
  *
  * In multi-process, it will request other processes to add the same device.
@@ -209,7 +206,7 @@  int rte_eal_hotplug_add(const char *busname, const char *devname,
  * @return
  *   0 on success, negative on error.
  */
-int __rte_experimental rte_dev_probe(const char *devargs);
+int rte_dev_probe(const char *devargs);
 
 /**
  * Hotplug remove a given device from a specific bus.
@@ -227,9 +224,6 @@  int __rte_experimental rte_dev_probe(const char *devargs);
 int rte_eal_hotplug_remove(const char *busname, const char *devname);
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
  * Remove one device.
  *
  * In multi-process, it will request other processes to remove the same device.
@@ -240,7 +234,7 @@  int rte_eal_hotplug_remove(const char *busname, const char *devname);
  * @return
  *   0 on success, negative on error.
  */
-int __rte_experimental rte_dev_remove(struct rte_device *dev);
+int rte_dev_remove(struct rte_device *dev);
 
 /**
  * Device comparison function.
diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map
index 04f624246..be4976e3d 100644
--- a/lib/librte_eal/rte_eal_version.map
+++ b/lib/librte_eal/rte_eal_version.map
@@ -262,6 +262,8 @@  DPDK_18.11 {
 	rte_eal_get_runtime_dir;
 	rte_eal_hotplug_add;
 	rte_eal_hotplug_remove;
+	rte_dev_probe;
+	rte_dev_remove;
 	rte_strscpy;
 
 } DPDK_18.08;
@@ -285,8 +287,6 @@  EXPERIMENTAL {
 	rte_dev_is_probed;
 	rte_dev_iterator_init;
 	rte_dev_iterator_next;
-	rte_dev_probe;
-	rte_dev_remove;
 	rte_devargs_add;
 	rte_devargs_dump;
 	rte_devargs_insert;