eal: allow probing a device again
[dpdk.git] / drivers / bus / vdev / vdev.c
index 3f27f35..06f3148 100644 (file)
@@ -226,6 +226,11 @@ insert_vdev(const char *name, const char *args, struct rte_vdev_device **p_dev)
        dev->device.name = devargs->name;
 
        if (find_vdev(name)) {
+               /*
+                * A vdev is expected to have only one port.
+                * So there is no reason to try probing again,
+                * even with new arguments.
+                */
                ret = -EEXIST;
                goto fail;
        }
@@ -481,7 +486,7 @@ vdev_probe(void)
                 * we call each driver probe.
                 */
 
-               if (dev->device.driver)
+               if (rte_dev_is_probed(&dev->device))
                        continue;
 
                if (vdev_probe_all_drivers(dev)) {