summaryrefslogtreecommitdiff
path: root/drivers/net/failsafe/failsafe_eal.c
diff options
context:
space:
mode:
authorThomas Monjalon <thomas@monjalon.net>2018-09-08 00:27:27 +0200
committerThomas Monjalon <thomas@monjalon.net>2018-10-11 14:09:24 +0200
commit911462eb4a5fc38b4e3581d167a1541207a69d5c (patch)
tree4a50445c513930762a1dce3aa278cfeb9b7b73d7 /drivers/net/failsafe/failsafe_eal.c
parent6878cd397d20d65991e6fcd3a3bcc39323a692cf (diff)
downloaddpdk-next-eventdev-911462eb4a5fc38b4e3581d167a1541207a69d5c.zip
dpdk-next-eventdev-911462eb4a5fc38b4e3581d167a1541207a69d5c.tar.gz
dpdk-next-eventdev-911462eb4a5fc38b4e3581d167a1541207a69d5c.tar.xz
eal: simplify parameters of hotplug functions
All information about a device to probe can be grouped in a common string, which is what we usually call devargs. An application should not have to parse this string before calling the EAL probe function. And the syntax could evolve to be more complex and support matching multiple devices in one string. That's why the bus name and device name should be removed from rte_eal_hotplug_add(). Instead of changing this function, a simpler one is added and used in the old one, which may be deprecated later. When removing a device, we already know its rte_device handle which can be directly passed as parameter of rte_eal_hotplug_remove(). If the rte_device is not known, it can be retrieved with the devargs, by iterating in the device list (future RTE_DEV_FOREACH()). Similarly to the probing case, a new function is added and used in the old one, which may be deprecated later. The new function is used in failsafe, because the replacement is easy. Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com> Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com> Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Diffstat (limited to 'drivers/net/failsafe/failsafe_eal.c')
-rw-r--r--drivers/net/failsafe/failsafe_eal.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/failsafe/failsafe_eal.c b/drivers/net/failsafe/failsafe_eal.c
index ce1633f..8a888b1 100644
--- a/drivers/net/failsafe/failsafe_eal.c
+++ b/drivers/net/failsafe/failsafe_eal.c
@@ -144,8 +144,7 @@ fs_bus_uninit(struct rte_eth_dev *dev)
int ret = 0;
FOREACH_SUBDEV_STATE(sdev, i, dev, DEV_PROBED) {
- sdev_ret = rte_eal_hotplug_remove(sdev->bus->name,
- sdev->dev->name);
+ sdev_ret = rte_dev_remove(sdev->dev);
if (sdev_ret) {
ERROR("Failed to remove requested device %s (err: %d)",
sdev->dev->name, sdev_ret);