remove experimental tag for hotplug API
cover remove experimental tag for hotplug API
There are new functions in 18.11 which are fixing some hotplug issues. OVS would like to use them but do not want to allow experimental functions.
As these are major functions, fixing some issues, and replacing a deprecated function, an exception should be done.
Thomas Monjalon (2):
eal: remove experimental tag for probe/remove
ethdev: remove experimental tag for iterator API
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 ++-- lib/librte_ethdev/rte_ethdev.c | 6 +++--- lib/librte_ethdev/rte_ethdev.h | 12 ------------ lib/librte_ethdev/rte_ethdev_version.map | 6 +++--- 6 files changed, 12 insertions(+), 30 deletions(-)
Signature · 1 line
2.19.0
PATCH 1/2 eal: remove experimental tag for probe/remove
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.
--- 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(-)
lib/librte_eal/common/eal_common_dev.c +2 -2
@@ -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;
lib/librte_eal/common/include/rte_dev.h +2 -8
@@ -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.
lib/librte_eal/rte_eal_version.map +2 -2
@@ -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;
Signature · 1 line
2.19.0
Re: [PATCH 1/2] eal: remove experimental tag for probe/remove
Quoted 10 lines · Thomas Monjalon
The functions
rte_dev_probe()andrte_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()andrte_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.
Quoted 7 lines
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 <[email protected]>
one minor comment below, but it's no big deal..
Quoted 75 lines
--- 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(-)lib/librte_eal/common/eal_common_dev.c +2
-2@@ -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;lib/librte_eal/common/include/rte_dev.h +2
-8@@ -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. lib/librte_eal/rte_eal_version.map +0
-0
lib/librte_eal/rte_eal_version.map DPDK_18.11 { · line 266
Quoted 5 lines
lib/librte_eal/rte_eal_version.map +2
-0@@ -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
Quoted 13 lines
lib/librte_eal/rte_eal_version.map +0
-2rte_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;
Re: [PATCH 1/2] eal: remove experimental tag for probe/remove
05/11/2018 13:19, Kevin Traynor:
Quoted 23 lines · Thomas Monjalon
Quoted 10 lines
The functions
rte_dev_probe()andrte_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()andrte_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.Quoted 7 lines
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 <[email protected]>one minor comment below, but it's no big deal..
Acked-by Kevin Traynor <[email protected]>Tested-by Kevin Traynor <[email protected]>
[...]
Quoted 10 lines
lib/librte_eal/rte_eal_version.map DPDK_18.11 { · line 266
Quoted 8 lines
lib/librte_eal/rte_eal_version.map +2
-0@@ -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
Re: [PATCH 1/2] eal: remove experimental tag for probe/remove
05/11/2018 14:13, Thomas Monjalon:
Quoted 36 lines
05/11/2018 13:19, Kevin Traynor:
Quoted 23 lines · Thomas Monjalon
Quoted 10 lines
The functions
rte_dev_probe()andrte_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()andrte_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.Quoted 7 lines
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 <[email protected]>one minor comment below, but it's no big deal..
Acked-by Kevin Traynor <[email protected]>Tested-by Kevin Traynor <[email protected]>[...]
Quoted 10 lines
lib/librte_eal/rte_eal_version.map DPDK_18.11 { · line 266
Quoted 8 lines
lib/librte_eal/rte_eal_version.map +2
-0@@ -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
Quoted 2 lines
Oh yes, I must revise the alphabetical order!
Thanks
Series applied with above change.
PATCH 2/2 ethdev: remove experimental tag for iterator API
In reply to Thomas MonjalonAfter removing the function rte_eth_dev_attach(),
there are two replacement solutions possible:
one using probe event notification, and one using a new iterator. So the application can get the new probed ports either asynchronously or synchronously.
The iterator API is new in DPDK 18.11 so they got the experimental tag by policy. It causes an issue for strict applications which do not use experimental functions, and want to use the synchronous method.
The replacement for removed API should not be experimental. That's why the experimental status of the ethdev iterator is removed.
--- lib/librte_ethdev/rte_ethdev.c | 6 +++--- lib/librte_ethdev/rte_ethdev.h | 12 ------------ lib/librte_ethdev/rte_ethdev_version.map | 6 +++--- 3 files changed, 6 insertions(+), 18 deletions(-)
lib/librte_ethdev/rte_ethdev.c +3 -3
@@ -187,7 +187,7 @@ enum { STAT_QMAP_RX }; -int __rte_experimental +int rte_eth_iterator_init (struct rte_dev_iterator *iter,const char *devargs_str) {int ret;
@@ -288,7 +288,7 @@ rte_eth_iterator_init(struct rte_dev_iterator *iter, const char *devargs_str)return ret; } -uint16_t __rte_experimental +uint16_t rte_eth_iterator_next (struct rte_dev_iterator *iter) {if (iter->cls ==NULL )/* invalid ethdev iterator */
@@ -317,7 +317,7 @@ rte_eth_iterator_next(struct rte_dev_iterator *iter)return RTE_MAX_ETHPORTS ; } -void __rte_experimental +void rte_eth_iterator_cleanup (struct rte_dev_iterator *iter) {if (iter->bus_str ==NULL )
lib/librte_ethdev/rte_ethdev.h +0 -12
@@ -167,9 +167,6 @@ extern int rte_eth_dev_logtype;struct rte_mbuf ;/** -* @warning -* @b EXPERIMENTAL: this API may change without prior notice. -* * Initializes a device iterator. * * This iterator allows accessing a list of devices matching some devargs.
@@ -185,13 +182,9 @@ struct rte_mbuf;* @return * 0 on successful initialization, negative otherwise. */ -__rte_experimental int rte_eth_iterator_init (struct rte_dev_iterator *iter,const char *devargs);/** -* @warning -* @b EXPERIMENTAL: this API may change without prior notice. -* * Iterates on devices with devargs filter. * The ownership is not checked. *
@@ -205,13 +198,9 @@ int rte_eth_iterator_init(struct rte_dev_iterator *iter, const char *devargs);* @return * A port id if found, RTE_MAX_ETHPORTS otherwise. */ -__rte_experimental uint16_t rte_eth_iterator_next (struct rte_dev_iterator *iter);/** -* @warning -* @b EXPERIMENTAL: this API may change without prior notice. -* * Free some allocated fields of the iterator. * * This function is automatically called by rte_eth_iterator_next()
@@ -223,7 +212,6 @@ uint16_t rte_eth_iterator_next(struct rte_dev_iterator *iter);* Device iterator handle initialized by rte_eth_iterator_init(). * The fields bus_str and cls_str are freed if needed. */ -__rte_experimental void rte_eth_iterator_cleanup (struct rte_dev_iterator *iter);/**
lib/librte_ethdev/rte_ethdev_version.map +3 -3
@@ -223,6 +223,9 @@ DPDK_18.11 { rte_eth_dev_rx_offload_name; rte_eth_dev_tx_offload_name; + rte_eth_iterator_cleanup; + rte_eth_iterator_init; + rte_eth_iterator_next; } DPDK_18.08;
@@ -242,9 +245,6 @@ EXPERIMENTAL { rte_eth_dev_owner_set; rte_eth_dev_owner_unset; rte_eth_dev_rx_intr_ctl_q_get_fd; - rte_eth_iterator_cleanup; - rte_eth_iterator_init; - rte_eth_iterator_next; rte_eth_switch_domain_alloc; rte_eth_switch_domain_free; rte_flow_conv;
Signature · 1 line
2.19.0
Re: [PATCH 2/2] ethdev: remove experimental tag for iterator API
Quoted 6 lines · Thomas Monjalon
After removing the function
rte_eth_dev_attach(),
there are two replacement solutions possible:
one using probe event notification, and one using a new iterator. So the application can get the new probed ports either asynchronously or synchronously.
Quoted 8 lines
The iterator API is new in DPDK 18.11 so they got the experimental tag by policy. It causes an issue for strict applications which do not use experimental functions, and want to use the synchronous method.
The replacement for removed API should not be experimental. That's why the experimental status of the ethdev iterator is removed.
Signed-off-by Thomas Monjalon <[email protected]>
Quoted 112 lines
--- lib/librte_ethdev/rte_ethdev.c | 6 +++--- lib/librte_ethdev/rte_ethdev.h | 12 ------------ lib/librte_ethdev/rte_ethdev_version.map | 6 +++--- 3 files changed, 6 insertions(+), 18 deletions(-)lib/librte_ethdev/rte_ethdev.c +3
-3@@ -187,7 +187,7 @@ enum { STAT_QMAP_RX }; -int __rte_experimental +int rte_eth_iterator_init (struct rte_dev_iterator *iter,const char *devargs_str) {int ret;@@ -288,7 +288,7 @@ rte_eth_iterator_init(struct rte_dev_iterator *iter, const char *devargs_str)return ret; } -uint16_t __rte_experimental +uint16_t rte_eth_iterator_next (struct rte_dev_iterator *iter) {if (iter->cls ==NULL )/* invalid ethdev iterator */ @@ -317,7 +317,7 @@ rte_eth_iterator_next(struct rte_dev_iterator *iter)return RTE_MAX_ETHPORTS ; } -void __rte_experimental +void rte_eth_iterator_cleanup (struct rte_dev_iterator *iter) {if (iter->bus_str ==NULL )lib/librte_ethdev/rte_ethdev.h +0
-12@@ -167,9 +167,6 @@ extern int rte_eth_dev_logtype;struct rte_mbuf ;/** -* @warning -* @b EXPERIMENTAL: this API may change without prior notice. -* * Initializes a device iterator. * * This iterator allows accessing a list of devices matching some devargs. @@ -185,13 +182,9 @@ struct rte_mbuf;* @return * 0 on successful initialization, negative otherwise. */ -__rte_experimental int rte_eth_iterator_init (struct rte_dev_iterator *iter,const char *devargs);/** -* @warning -* @b EXPERIMENTAL: this API may change without prior notice. -* * Iterates on devices with devargs filter. * The ownership is not checked. * @@ -205,13 +198,9 @@ int rte_eth_iterator_init(struct rte_dev_iterator *iter, const char *devargs);* @return * A port id if found, RTE_MAX_ETHPORTS otherwise. */ -__rte_experimental uint16_t rte_eth_iterator_next (struct rte_dev_iterator *iter);/** -* @warning -* @b EXPERIMENTAL: this API may change without prior notice. -* * Free some allocated fields of the iterator. * * This function is automatically called by rte_eth_iterator_next() @@ -223,7 +212,6 @@ uint16_t rte_eth_iterator_next(struct rte_dev_iterator *iter);* Device iterator handle initialized by rte_eth_iterator_init(). * The fields bus_str and cls_str are freed if needed. */ -__rte_experimental void rte_eth_iterator_cleanup (struct rte_dev_iterator *iter);/** lib/librte_ethdev/rte_ethdev_version.map +3
-3@@ -223,6 +223,9 @@ DPDK_18.11 { rte_eth_dev_rx_offload_name; rte_eth_dev_tx_offload_name; + rte_eth_iterator_cleanup; + rte_eth_iterator_init; + rte_eth_iterator_next; } DPDK_18.08;@@ -242,9 +245,6 @@ EXPERIMENTAL { rte_eth_dev_owner_set; rte_eth_dev_owner_unset; rte_eth_dev_rx_intr_ctl_q_get_fd; - rte_eth_iterator_cleanup; - rte_eth_iterator_init; - rte_eth_iterator_next; rte_eth_switch_domain_alloc; rte_eth_switch_domain_free; rte_flow_conv;
Any comment?
01/11/2018 15:46, Thomas Monjalon:
Quoted 9 lines
There are new functions in 18.11 which are fixing some hotplug issues. OVS would like to use them but do not want to allow experimental functions.
As these are major functions, fixing some issues, and replacing a deprecated function, an exception should be done.Thomas Monjalon (2):
eal: remove experimental tag for probe/remove
ethdev: remove experimental tag for iterator API