When a device is hotplugged via rte_dev_probe(), the EAL adds the
devargs to its global list before calling the bus plug callback.
However, fslmc_bus_plug() never refreshes dev->device.devargs from
the EAL list -- it was only set during the initial bus scan.

As a result, PMD-specific devargs (e.g. drv_no_taildrop) passed
through rte_dev_probe() are silently ignored by the driver.

Refresh devargs from the EAL list in fslmc_bus_plug() before probing,
the same way it is done during the initial bus scan.

Fixes: b5721f271cbf ("bus/fslmc: support DPNI hotplug")
Signed-off-by: Maxime Leroy <[email protected]>
---
 drivers/bus/fslmc/fslmc_bus.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index abdb0ad50d..a539753649 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -596,6 +596,11 @@ fslmc_bus_plug(struct rte_device *rte_dev)
                        struct rte_dpaa2_device, device);
        struct rte_dpaa2_driver *drv;
 
+       /* Refresh devargs from the EAL devargs list, as they may
+        * have been added after the initial bus scan (e.g. hotplug).
+        */
+       dev->device.devargs = fslmc_devargs_lookup(dev);
+
        TAILQ_FOREACH(drv, &rte_fslmc_bus.driver_list, next) {
                ret = rte_fslmc_match(drv, dev);
                if (ret)
-- 
2.43.0

Reply via email to