[dpdk-dev,19/25] eal/pci: Change scope of rte_eal_pci_scan to global
Commit Message
The function is called by port hotplug framework, so change scope of the
function to global.
Signed-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>
---
lib/librte_eal/common/include/eal_private.h | 11 +++++++++++
lib/librte_eal/linuxapp/eal/eal_pci.c | 6 +++---
2 files changed, 14 insertions(+), 3 deletions(-)
@@ -154,6 +154,17 @@ struct rte_pci_driver;
struct rte_pci_device;
/**
+ * Scan the content of the PCI bus, and the devices in the devices
+ * list
+ *
+ * This function is private to EAL.
+ *
+ * @return
+ * 0 on success, negative on error
+ */
+int rte_eal_pci_scan(void);
+
+/**
* Mmap memory for single PCI device
*
* This function is private to EAL.
@@ -361,8 +361,8 @@ error:
* Scan the content of the PCI bus, and the devices in the devices
* list
*/
-static int
-pci_scan(void)
+int
+rte_eal_pci_scan(void)
{
struct dirent *e;
DIR *dir;
@@ -612,7 +612,7 @@ rte_eal_pci_init(void)
if (internal_config.no_pci)
return 0;
- if (pci_scan() < 0) {
+ if (rte_eal_pci_scan() < 0) {
RTE_LOG(ERR, EAL, "%s(): Cannot scan PCI bus\n", __func__);
return -1;
}