path: root/lib/librte_eal/common/eal_common_bus.c
diff options
authorThomas Monjalon <>2017-07-07 02:03:07 +0200
committerThomas Monjalon <>2017-07-08 22:27:01 +0200
commit8d73e58f0b2cfe15373407119b8b621cb7c88eee (patch)
tree8db29e255b23dcfbbf17eab780a747f6450bdb63 /lib/librte_eal/common/eal_common_bus.c
parentb17e43295120f6cd1f299091f2e2167853101584 (diff)
bus: fix driver registration
The bus name was stored with embedded double quotes. Indeed the bus name is given with a string in a macro, which is not used elsewhere. These macros are useless because the buses are drivers, so they must not have any API for the application writer. The registration can be done with a hardcoded value without quotes. There is another (small) benefit of not using macros for driver names: it is to have a meaningful constructor function name. For instance, it was businitfn_PCI_BUS_NAME instead of businitfn_pci. The bus registration macro is also changed to use the new RTE_INIT_PRIO macro, similar to RTE_INIT used for other drivers. The priority is the highest (101) in order to be sure that the bus driver is registered before its device drivers. Fixes: 0fd1a0eaae19 ("pci: add bus driver") Fixes: fea892e35f21 ("bus/vdev: use standard bus registration") Fixes: 7e7df6d0a41d ("bus/fslmc: introduce fsl-mc bus driver") Signed-off-by: Thomas Monjalon <> Reviewed-by: Santosh Shukla <> Acked-by: Shreyansh Jain <>
Diffstat (limited to 'lib/librte_eal/common/eal_common_bus.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/librte_eal/common/eal_common_bus.c b/lib/librte_eal/common/eal_common_bus.c
index 997009d..96eb4fd 100644
--- a/lib/librte_eal/common/eal_common_bus.c
+++ b/lib/librte_eal/common/eal_common_bus.c
@@ -92,7 +92,7 @@ rte_bus_probe(void)
struct rte_bus *bus, *vbus = NULL;
TAILQ_FOREACH(bus, &rte_bus_list, next) {
- if (!strcmp(bus->name, "virtual")) {
+ if (!strcmp(bus->name, "vdev")) {
vbus = bus;