From 66c51d2a525d58353acf8ca836a7ab962d8055cd Mon Sep 17 00:00:00 2001 From: Helin Zhang Date: Wed, 29 Jul 2015 06:48:27 +0800 Subject: [PATCH] eal/linux: fix build with extra pci config 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 --- lib/librte_eal/common/include/rte_pci.h | 11 +++++++++++ lib/librte_eal/linuxapp/eal/eal_pci.c | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h index 34cafa6ef8..3fb2d3a9e6 100644 --- a/lib/librte_eal/common/include/rte_pci.h +++ b/lib/librte_eal/common/include/rte_pci.h @@ -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 diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c index df21846f47..0e62f65eea 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci.c +++ b/lib/librte_eal/linuxapp/eal/eal_pci.c @@ -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) -- 2.20.1