]> git.droids-corp.org - dpdk.git/blobdiff - lib/librte_eal/linuxapp/eal/eal_pci.c
tailq: move to dynamic tailq
[dpdk.git] / lib / librte_eal / linuxapp / eal / eal_pci.c
index 595f17bad58ba25d516784bd957c2f2abe2e54f3..c42e843db029ebe620e132ded64cfc369faee651 100644 (file)
 
 struct mapped_pci_res_list *pci_res_list = NULL;
 
+static struct rte_tailq_elem rte_pci_tailq = {
+       .name = "PCI_RESOURCE_LIST",
+};
+EAL_REGISTER_TAILQ(rte_pci_tailq)
+
 /* unbind kernel driver for this device */
 static int
 pci_unbind_kernel_driver(struct rte_pci_device *dev)
@@ -765,8 +770,7 @@ rte_eal_pci_init(void)
 {
        TAILQ_INIT(&pci_driver_list);
        TAILQ_INIT(&pci_device_list);
-       pci_res_list = RTE_TAILQ_LOOKUP_BY_IDX(RTE_TAILQ_PCI,
-                                              mapped_pci_res_list);
+       pci_res_list = RTE_TAILQ_CAST(rte_pci_tailq.head, mapped_pci_res_list);
 
        /* for debug purposes, PCI can be disabled */
        if (internal_config.no_pci)