eal: probe new virtual bus after other bus devices

Also see commit f4ce209a8ce5 ("eal: postpone vdev initialization").

Signed-off-by: Jan Blunck <jblunck@infradead.org>
This commit is contained in:
Jan Blunck 2017-04-11 17:44:05 +02:00 committed by Thomas Monjalon
parent 9a8ad786c7
commit da76cc0234

View File

@ -86,9 +86,14 @@ int
rte_bus_probe(void)
{
int ret;
struct rte_bus *bus;
struct rte_bus *bus, *vbus = NULL;
TAILQ_FOREACH(bus, &rte_bus_list, next) {
if (!strcmp(bus->name, "virtual")) {
vbus = bus;
continue;
}
ret = bus->probe();
if (ret) {
RTE_LOG(ERR, EAL, "Bus (%s) probe failed.\n",
@ -97,6 +102,15 @@ rte_bus_probe(void)
}
}
if (vbus) {
ret = vbus->probe();
if (ret) {
RTE_LOG(ERR, EAL, "Bus (%s) probe failed.\n",
vbus->name);
return ret;
}
}
return 0;
}