eal: register drivers explicitly
authorJan Viktorin <viktorin@rehivetech.com>
Tue, 20 Sep 2016 12:41:34 +0000 (18:11 +0530)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 3 Oct 2016 14:33:59 +0000 (16:33 +0200)
To register both vdev and pci drivers into the list of all rte_driver,
we have to call rte_eal_driver_register explicitly.

Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: David Marchand <david.marchand@6wind.com>
lib/librte_eal/common/eal_common_pci.c
lib/librte_eal/common/eal_common_vdev.c

index 79f5526..0b032d6 100644 (file)
@@ -471,11 +471,13 @@ void
 rte_eal_pci_register(struct rte_pci_driver *driver)
 {
        TAILQ_INSERT_TAIL(&pci_driver_list, driver, next);
+       rte_eal_driver_register(&driver->driver);
 }
 
 /* unregister a driver */
 void
 rte_eal_pci_unregister(struct rte_pci_driver *driver)
 {
+       rte_eal_driver_unregister(&driver->driver);
        TAILQ_REMOVE(&pci_driver_list, driver, next);
 }
index 1a4dec6..6dab782 100644 (file)
@@ -48,12 +48,14 @@ void
 rte_eal_vdrv_register(struct rte_vdev_driver *driver)
 {
        TAILQ_INSERT_TAIL(&vdev_driver_list, driver, next);
+       rte_eal_driver_register(&driver->driver);
 }
 
 /* unregister a driver */
 void
 rte_eal_vdrv_unregister(struct rte_vdev_driver *driver)
 {
+       rte_eal_driver_unregister(&driver->driver);
        TAILQ_REMOVE(&vdev_driver_list, driver, next);
 }