From: Jan Viktorin <vikto...@rehivetech.com> (I rebased these over HEAD e228563)
These patches were initially part of Jan's original series on SoC Framework ([1],[2]). An update to that series, without these patches, was posted by me here [3]. Main motivation for these is aim of introducing a non-PCI centric subsystem in EAL. As of now the first usecase is SoC, but not limited to it. 5 patches in this series are independent of each other, as well as SoC framework. All these focus on generalizing some structure or functions present with the PCI specific code to EAL Common area (or splitting a function to be more userful). - 0001: move the rte_kernel_driver enum from rte_pci to rte_dev. As of now this structure is embedded in rte_pci_device, but, going ahead it can be part of other rte_xxx_device structures. Either way, it has no impact on PCI. - 0002: eal_parse_sysfs_value function has been split into two, one accepting filename and other working on a file object. This is helpful if multiple calls to this are made from EAL - that way infra can maintain a file object. - 0003: Functions pci_map_resource/pci_unmap_resource are moved to EAL common as rte_eal_map_resource/rte_eal_unmap_resource, respectively. - 0004: Split the pci_unbind_kernel_driver into two, still working on the PCI BDF sysfs layout, first handles the file path (and validations) and second does the actual unbind. The second part might be useful in case of non-PCI layouts. - 0005: Move pci_get_kernel_driver_by_path to rte_eal_get_kernel_driver_by_path in EAL common. This function is generic for any sysfs compliant driver and can be re-used by other non-PCI subsystem. If need be, I can propose them as 5 separate patches - but I think clubbing them together makes more sense (these are loosely related). [1] http://dpdk.org/ml/archives/dev/2016-January/030915.html [2] http://www.dpdk.org/ml/archives/dev/2016-May/038486.html [3] http://dpdk.org/ml/archives/dev/2016-August/045993.html Jan Viktorin (5): eal: make enum rte_kernel_driver non-PCI specific eal: extract function eal_parse_sysfs_valuef eal: Convert pci_(un)map_resource to rte_eal_(un)map_resource eal/linux: extract function rte_eal_unbind_kernel_driver eal/linux: extract function rte_eal_get_kernel_driver_by_path lib/librte_eal/bsdapp/eal/eal_pci.c | 2 +- lib/librte_eal/bsdapp/eal/rte_eal_version.map | 8 +++ lib/librte_eal/common/eal_common_dev.c | 39 +++++++++++ lib/librte_eal/common/eal_common_pci.c | 39 ----------- lib/librte_eal/common/eal_common_pci_uio.c | 16 +++-- lib/librte_eal/common/eal_filesystem.h | 5 ++ lib/librte_eal/common/eal_private.h | 27 ++++++++ lib/librte_eal/common/include/rte_dev.h | 44 ++++++++++++ lib/librte_eal/common/include/rte_pci.h | 41 ----------- lib/librte_eal/linuxapp/eal/eal.c | 91 ++++++++++++++++++++++--- lib/librte_eal/linuxapp/eal/eal_pci.c | 62 +++-------------- lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 2 +- lib/librte_eal/linuxapp/eal/eal_pci_vfio.c | 5 +- lib/librte_eal/linuxapp/eal/rte_eal_version.map | 8 +++ 14 files changed, 234 insertions(+), 155 deletions(-) -- 2.7.4