eal/linux: fix build with extra pci config
authorHelin Zhang <helin.zhang@intel.com>
Tue, 28 Jul 2015 22:48:27 +0000 (06:48 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 30 Jul 2015 00:15:32 +0000 (02:15 +0200)
Build log:
lib/librte_eal/common/eal_common_pci.c:188:4: error:
implicit declaration of function pci_config_space_set

The function rte_eal_pci_probe_one_driver, which calls
pci_config_space_set, was moved to eal_common_pci.c,
but pci_config_space_set was left in eal_pci.c with static specifier.

Fixes: 4d4ebca4 ("pci: merge probing and closing functions for linux and bsd")

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
lib/librte_eal/common/include/rte_pci.h
lib/librte_eal/linuxapp/eal/eal_pci.c

index 34cafa6..3fb2d3a 100644 (file)
@@ -487,6 +487,17 @@ int rte_eal_pci_read_config(const struct rte_pci_device *device,
 int rte_eal_pci_write_config(const struct rte_pci_device *device,
                             const void *buf, size_t len, off_t offset);
 
+#ifdef RTE_PCI_CONFIG
+/**
+ * Set special config space registers for performance purpose.
+ *
+ * @param dev
+ *   A pointer to a rte_pci_device structure describing the device
+ *   to use
+ */
+void pci_config_space_set(struct rte_pci_device *dev);
+#endif /* RTE_PCI_CONFIG */
+
 #ifdef __cplusplus
 }
 #endif
index df21846..0e62f65 100644 (file)
@@ -557,7 +557,7 @@ pci_config_max_read_request_size(struct rte_pci_device *dev)
        return 0;
 }
 
-static void
+void
 pci_config_space_set(struct rte_pci_device *dev)
 {
        if (rte_eal_process_type() != RTE_PROC_PRIMARY)