pci: use lookup tailq api
authorDavid Marchand <david.marchand@6wind.com>
Wed, 4 Mar 2015 21:50:02 +0000 (22:50 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 10 Mar 2015 10:40:21 +0000 (11:40 +0100)
There is no reason why we should use the "reserve" tailq api, since the pci
entry is already statically reserved.

Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
lib/librte_eal/bsdapp/eal/eal_pci.c
lib/librte_eal/linuxapp/eal/eal_pci.c

index e692b35..4d2fbbb 100644 (file)
@@ -493,7 +493,7 @@ rte_eal_pci_init(void)
 {
        TAILQ_INIT(&pci_driver_list);
        TAILQ_INIT(&pci_device_list);
-       uio_res_list = RTE_TAILQ_RESERVE_BY_IDX(RTE_TAILQ_PCI, uio_res_list);
+       uio_res_list = RTE_TAILQ_LOOKUP_BY_IDX(RTE_TAILQ_PCI, uio_res_list);
 
        /* for debug purposes, PCI can be disabled */
        if (internal_config.no_pci)
index 6d4932d..8f44f09 100644 (file)
@@ -766,8 +766,8 @@ rte_eal_pci_init(void)
 {
        TAILQ_INIT(&pci_driver_list);
        TAILQ_INIT(&pci_device_list);
-       pci_res_list = RTE_TAILQ_RESERVE_BY_IDX(RTE_TAILQ_PCI,
-                       mapped_pci_res_list);
+       pci_res_list = RTE_TAILQ_LOOKUP_BY_IDX(RTE_TAILQ_PCI,
+                                              mapped_pci_res_list);
 
        /* for debug purposes, PCI can be disabled */
        if (internal_config.no_pci)