X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_eal%2Flinuxapp%2Feal%2Feal_pci_init.h;h=7104b1368aa83a6820f5059fab34b1e7bb3aee61;hb=b2b5baa02945354b9bade697840f6f24d4d1a722;hp=6af84d131017de59ae7894bb0a690b4472811349;hpb=b8be05722f9dffc8aedd1163017ead94c40302c9;p=dpdk.git diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_init.h b/lib/librte_eal/linuxapp/eal/eal_pci_init.h index 6af84d1310..7104b1368a 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci_init.h +++ b/lib/librte_eal/linuxapp/eal/eal_pci_init.h @@ -36,48 +36,18 @@ #include "eal_vfio.h" -struct pci_map { - void *addr; - char *path; - uint64_t offset; - uint64_t size; - uint64_t phaddr; -}; - -/* - * For multi-process we need to reproduce all PCI mappings in secondary - * processes, so save them in a tailq. - */ -struct mapped_pci_resource { - TAILQ_ENTRY(mapped_pci_resource) next; - - struct rte_pci_addr pci_addr; - char path[PATH_MAX]; - int nb_maps; - struct pci_map maps[PCI_MAX_RESOURCE]; -}; - -TAILQ_HEAD(mapped_pci_res_list, mapped_pci_resource); -extern struct mapped_pci_res_list *pci_res_list; - /* * Helper function to map PCI resources right after hugepages in virtual memory */ extern void *pci_map_addr; void *pci_find_max_end_va(void); -void *pci_map_resource(void *requested_addr, int fd, off_t offset, - size_t size, int additional_flags); - -/* map IGB_UIO resource prototype */ -int pci_uio_map_resource(struct rte_pci_device *dev); - -void pci_unmap_resource(void *requested_addr, size_t size); - -#ifdef RTE_LIBRTE_EAL_HOTPLUG -/* unmap IGB_UIO resource prototype */ -void pci_uio_unmap_resource(struct rte_pci_device *dev); -#endif /* RTE_LIBRTE_EAL_HOTPLUG */ +int pci_uio_alloc_resource(struct rte_pci_device *dev, + struct mapped_pci_resource **uio_res); +void pci_uio_free_resource(struct rte_pci_device *dev, + struct mapped_pci_resource *uio_res); +int pci_uio_map_resource_by_index(struct rte_pci_device *dev, int res_idx, + struct mapped_pci_resource *uio_res, int map_idx); #ifdef VFIO_PRESENT