From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tetsuya Mukawa Subject: [PATCH 2/3] eal, ethdev: Remove CONFIG_RTE_LIBRTE_EAL_HOTPLUG Date: Wed, 4 Mar 2015 12:11:42 +0900 Message-ID: <1425438703-18895-2-git-send-email-mukawa@igel.co.jp> References: <1425438703-18895-1-git-send-email-mukawa@igel.co.jp> To: dev-VfR2kkLFssw@public.gmane.org Return-path: In-Reply-To: <1425438703-18895-1-git-send-email-mukawa-AlSX/UN32fvPDbFq/vQRIQ@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" The patch removes CONFIG_RTE_LIBRTE_EAL_HOTPLUG option from DPDK. Signed-off-by: Tetsuya Mukawa --- config/common_bsdapp | 6 ------ config/common_linuxapp | 5 ----- lib/librte_eal/common/eal_common_dev.c | 2 -- lib/librte_eal/common/eal_common_pci.c | 2 -- lib/librte_eal/common/include/rte_pci.h | 2 -- lib/librte_eal/linuxapp/eal/eal_pci.c | 12 ------------ lib/librte_eal/linuxapp/eal/eal_pci_init.h | 2 -- lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 2 -- lib/librte_ether/rte_ethdev.c | 21 --------------------- 9 files changed, 54 deletions(-) diff --git a/config/common_bsdapp b/config/common_bsdapp index 8ff4dc2..88b44e9 100644 --- a/config/common_bsdapp +++ b/config/common_bsdapp @@ -116,12 +116,6 @@ CONFIG_RTE_LIBRTE_EAL_BSDAPP=y CONFIG_RTE_LIBRTE_EAL_LINUXAPP=n # -# Compile Environment Abstraction Layer to support hotplug -# So far, Hotplug functions only support linux -# -CONFIG_RTE_LIBRTE_EAL_HOTPLUG=n - -# # Compile Environment Abstraction Layer to support Vmware TSC map # CONFIG_RTE_LIBRTE_EAL_VMWARE_TSC_MAP_SUPPORT=y diff --git a/config/common_linuxapp b/config/common_linuxapp index 97f1c9e..f9c9780 100644 --- a/config/common_linuxapp +++ b/config/common_linuxapp @@ -114,11 +114,6 @@ CONFIG_RTE_PCI_MAX_READ_REQUEST_SIZE=0 CONFIG_RTE_LIBRTE_EAL_LINUXAPP=y # -# Compile Environment Abstraction Layer to support hotplug -# -CONFIG_RTE_LIBRTE_EAL_HOTPLUG=y - -# # Compile Environment Abstraction Layer to support Vmware TSC map # CONFIG_RTE_LIBRTE_EAL_VMWARE_TSC_MAP_SUPPORT=y diff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c index 92a5a94..4089d66 100644 --- a/lib/librte_eal/common/eal_common_dev.c +++ b/lib/librte_eal/common/eal_common_dev.c @@ -125,7 +125,6 @@ rte_eal_dev_init(void) return 0; } -#ifdef RTE_LIBRTE_EAL_HOTPLUG int rte_eal_vdev_uninit(const char *name) { @@ -151,4 +150,3 @@ rte_eal_vdev_uninit(const char *name) RTE_LOG(ERR, EAL, "no driver found for %s\n", name); return -EINVAL; } -#endif /* RTE_LIBRTE_EAL_HOTPLUG */ diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c index 5b6b55d..80f51d3 100644 --- a/lib/librte_eal/common/eal_common_pci.c +++ b/lib/librte_eal/common/eal_common_pci.c @@ -126,7 +126,6 @@ pci_probe_all_drivers(struct rte_pci_device *dev) return 1; } -#ifdef RTE_LIBRTE_EAL_HOTPLUG /* * If vendor/device ID match, call the devuninit() function of all * registered driver for the given device. Return -1 if initialization @@ -217,7 +216,6 @@ err_return: dev->addr.devid, dev->addr.function); return -1; } -#endif /* RTE_LIBRTE_EAL_HOTPLUG */ /* * Scan the content of the PCI bus, and call the devinit() function for diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h index dc74821..3c8a26b 100644 --- a/lib/librte_eal/common/include/rte_pci.h +++ b/lib/librte_eal/common/include/rte_pci.h @@ -335,7 +335,6 @@ int rte_eal_pci_scan(void); */ int rte_eal_pci_probe(void); -#ifdef RTE_LIBRTE_EAL_HOTPLUG /** * Probe the single PCI device. * @@ -365,7 +364,6 @@ int rte_eal_pci_probe_one(struct rte_pci_addr *addr); * - Negative on error. */ int rte_eal_pci_close_one(struct rte_pci_addr *addr); -#endif /* RTE_LIBRTE_EAL_HOTPLUG */ /** * Dump the content of the PCI bus. diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c index 6d4932d..3914f52 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci.c +++ b/lib/librte_eal/linuxapp/eal/eal_pci.c @@ -595,7 +595,6 @@ pci_map_device(struct rte_pci_device *dev) return ret; } -#ifdef RTE_LIBRTE_EAL_HOTPLUG static void pci_unmap_device(struct rte_pci_device *dev) { @@ -618,7 +617,6 @@ pci_unmap_device(struct rte_pci_device *dev) break; } } -#endif /* RTE_LIBRTE_EAL_HOTPLUG */ /* * If vendor/device ID match, call the devinit() function of the @@ -691,7 +689,6 @@ rte_eal_pci_probe_one_driver(struct rte_pci_driver *dr, struct rte_pci_device *d return 1; } -#ifdef RTE_LIBRTE_EAL_HOTPLUG /* * If vendor/device ID match, call the devuninit() function of the * driver. @@ -750,15 +747,6 @@ rte_eal_pci_close_one_driver(struct rte_pci_driver *dr, /* return positive value if driver is not found */ return 1; } -#else /* RTE_LIBRTE_EAL_HOTPLUG */ -int -rte_eal_pci_close_one_driver(struct rte_pci_driver *dr __rte_unused, - struct rte_pci_device *dev __rte_unused) -{ - RTE_LOG(ERR, EAL, "Hotplug support isn't enabled\n"); - return -1; -} -#endif /* RTE_LIBRTE_EAL_HOTPLUG */ /* Init the PCI EAL subsystem */ int diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_init.h b/lib/librte_eal/linuxapp/eal/eal_pci_init.h index 6af84d1..86088bd 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci_init.h +++ b/lib/librte_eal/linuxapp/eal/eal_pci_init.h @@ -74,10 +74,8 @@ int pci_uio_map_resource(struct rte_pci_device *dev); void pci_unmap_resource(void *requested_addr, size_t size); -#ifdef RTE_LIBRTE_EAL_HOTPLUG /* unmap IGB_UIO resource prototype */ void pci_uio_unmap_resource(struct rte_pci_device *dev); -#endif /* RTE_LIBRTE_EAL_HOTPLUG */ #ifdef VFIO_PRESENT diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c index 0b397ca..a0bf9d7 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c +++ b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c @@ -388,7 +388,6 @@ pci_uio_map_resource(struct rte_pci_device *dev) return 0; } -#ifdef RTE_LIBRTE_EAL_HOTPLUG static void pci_uio_unmap(struct mapped_pci_resource *uio_res) { @@ -451,4 +450,3 @@ pci_uio_unmap_resource(struct rte_pci_device *dev) dev->intr_handle.fd = -1; dev->intr_handle.type = RTE_INTR_HANDLE_UNKNOWN; } -#endif /* RTE_LIBRTE_EAL_HOTPLUG */ diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index 9687fab..42e3f92 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -426,9 +426,6 @@ rte_eth_dev_count(void) return (nb_ports); } -/* So far, DPDK hotplug function only supports linux */ -#ifdef RTE_LIBRTE_EAL_HOTPLUG - static enum rte_eth_dev_type rte_eth_dev_get_device_type(uint8_t port_id) { @@ -709,24 +706,6 @@ rte_eth_dev_detach(uint8_t port_id, char *name) } else return rte_eth_dev_detach_vdev(port_id, name); } -#else /* RTE_LIBRTE_EAL_HOTPLUG */ -int -rte_eth_dev_attach(const char *devargs __rte_unused, - uint8_t *port_id __rte_unused) -{ - RTE_LOG(ERR, EAL, "Hotplug support isn't enabled\n"); - return -1; -} - -/* detach the device, then store the name of the device */ -int -rte_eth_dev_detach(uint8_t port_id __rte_unused, - char *name __rte_unused) -{ - RTE_LOG(ERR, EAL, "Hotplug support isn't enabled\n"); - return -1; -} -#endif /* RTE_LIBRTE_EAL_HOTPLUG */ static int rte_eth_dev_rx_queue_config(struct rte_eth_dev *dev, uint16_t nb_queues) -- 1.9.1