From: Jan Blunck Date: Tue, 11 Apr 2017 15:44:05 +0000 (+0200) Subject: eal: probe new virtual bus after other bus devices X-Git-Tag: spdx-start~3665 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=da76cc02342b05a80810f1853450dba8a1a782f4;p=dpdk.git eal: probe new virtual bus after other bus devices Also see commit f4ce209a8ce5 ("eal: postpone vdev initialization"). Signed-off-by: Jan Blunck --- diff --git a/lib/librte_eal/common/eal_common_bus.c b/lib/librte_eal/common/eal_common_bus.c index 4638e78d2e..8f9baf8b8a 100644 --- a/lib/librte_eal/common/eal_common_bus.c +++ b/lib/librte_eal/common/eal_common_bus.c @@ -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; }