path: root/drivers/net/failsafe/failsafe_eal.c
diff options
authorThomas Monjalon <>2018-09-08 00:27:27 +0200
committerThomas Monjalon <>2018-10-11 14:09:24 +0200
commit911462eb4a5fc38b4e3581d167a1541207a69d5c (patch)
tree4a50445c513930762a1dce3aa278cfeb9b7b73d7 /drivers/net/failsafe/failsafe_eal.c
parent6878cd397d20d65991e6fcd3a3bcc39323a692cf (diff)
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 <> Reviewed-by: Andrew Rybchenko <> Acked-by: Gaetan Rivet <> Reviewed-by: Stephen Hemminger <>
Diffstat (limited to 'drivers/net/failsafe/failsafe_eal.c')
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;
- 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);