pci: rename device and driver lists for bsd
authorOlivier Matz <olivier.matz@6wind.com>
Fri, 25 Apr 2014 11:59:39 +0000 (13:59 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 29 Apr 2014 23:28:19 +0000 (01:28 +0200)
The bsdapp part was missing in commit 5b1f4a67dd5bcfa8d5139c064ced6e37a9149419.

To avoid confusion with virtual devices, rename device_list as
pci_device_list and driver_list as pci_driver_list.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
lib/librte_eal/bsdapp/eal/eal_pci.c

index 7b04fa6..64bdea0 100644 (file)
@@ -362,13 +362,13 @@ pci_scan_one(int dev_pci_fd, struct pci_conf *conf)
        }
 
        /* device is valid, add in list (sorted) */
-       if (TAILQ_EMPTY(&device_list)) {
-               TAILQ_INSERT_TAIL(&device_list, dev, next);
+       if (TAILQ_EMPTY(&pci_device_list)) {
+               TAILQ_INSERT_TAIL(&pci_device_list, dev, next);
        }       
        else {
                struct rte_pci_device *dev2 = NULL;
 
-               TAILQ_FOREACH(dev2, &device_list, next) {
+               TAILQ_FOREACH(dev2, &pci_device_list, next) {
                        if (pci_addr_comparison(&dev->addr, &dev2->addr))
                                continue;
                        else {
@@ -376,7 +376,7 @@ pci_scan_one(int dev_pci_fd, struct pci_conf *conf)
                                return 0;
                        }
                }
-               TAILQ_INSERT_TAIL(&device_list, dev, next);
+               TAILQ_INSERT_TAIL(&pci_device_list, dev, next);
        }
                                
        return 0;
@@ -503,8 +503,8 @@ rte_eal_pci_probe_one_driver(struct rte_pci_driver *dr, struct rte_pci_device *d
 int
 rte_eal_pci_init(void)
 {
-       TAILQ_INIT(&driver_list);
-       TAILQ_INIT(&device_list);
+       TAILQ_INIT(&pci_driver_list);
+       TAILQ_INIT(&pci_device_list);
        uio_res_list = RTE_TAILQ_RESERVE_BY_IDX(RTE_TAILQ_PCI, uio_res_list);
 
        /* for debug purposes, PCI can be disabled */