pci: export device mapping functions
authorYuanhan Liu <yuanhan.liu@linux.intel.com>
Tue, 2 Feb 2016 13:48:18 +0000 (21:48 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 3 Feb 2016 15:07:50 +0000 (16:07 +0100)
commit962cf902e6ebcb035fedc61847041769894e5f4c
tree88a60033f76a7f2f8f0686bc4923aca442ff9a35
parent1905e101dc4aabff6e0cd4dc58ed095d3f0a5c26
pci: export device mapping functions

Normally we could set RTE_PCI_DRV_NEED_MAPPING flag so that eal will
invoke pci_map_device internally for us. From that point view, there
is no need to export pci_map_device.

However, for virtio pmd driver, which is designed to work without
binding UIO (or something similar first), pci_map_device() will fail,
which ends up with virtio pmd driver being skipped. Therefore, we can
not set RTE_PCI_DRV_NEED_MAPPING blindly at virtio pmd driver.

Therefore, this patch exports pci_map_device, and let virtio pmd call
it when necessary.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Tested-by: Santosh Shukla <sshukla@mvista.com>
Tested-by: Qian Xu <qian.q.xu@intel.com>
Reviewed-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Tested-by: Tetsuya Mukawa <mukawa@igel.co.jp>
Acked-by: David Marchand <david.marchand@6wind.com>
Acked-by: Huawei Xie <huawei.xie@intel.com>
lib/librte_eal/bsdapp/eal/eal_pci.c
lib/librte_eal/bsdapp/eal/rte_eal_version.map
lib/librte_eal/common/eal_common_pci.c
lib/librte_eal/common/eal_private.h
lib/librte_eal/common/include/rte_pci.h
lib/librte_eal/linuxapp/eal/eal_pci.c
lib/librte_eal/linuxapp/eal/rte_eal_version.map