From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: [PATCH v2 2/2] vfio: don't build unnecessary files Date: Thu, 9 Jul 2015 16:26:27 -0700 Message-ID: <1436484387-29273-3-git-send-email-stephen@networkplumber.org> References: <1436484387-29273-1-git-send-email-stephen@networkplumber.org> Cc: Stephen Hemminger To: dev@dpdk.org Return-path: Received: from mail-pa0-f41.google.com (mail-pa0-f41.google.com [209.85.220.41]) by dpdk.org (Postfix) with ESMTP id A23045A6D for ; Fri, 10 Jul 2015 01:26:20 +0200 (CEST) Received: by pabvl15 with SMTP id vl15so157614685pab.1 for ; Thu, 09 Jul 2015 16:26:20 -0700 (PDT) In-Reply-To: <1436484387-29273-1-git-send-email-stephen@networkplumber.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Stephen Hemminger If VFIO is configured, it is better to just not build the source files (rather than generating empty object files). Signed-off-by: Stephen Hemminger --- lib/librte_eal/linuxapp/eal/Makefile | 4 ++-- lib/librte_eal/linuxapp/eal/eal_pci_vfio.c | 3 --- lib/librte_eal/linuxapp/eal/eal_pci_vfio_mp_sync.c | 3 --- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal/Makefile b/lib/librte_eal/linuxapp/eal/Makefile index 42a16fe..bc513c0 100644 --- a/lib/librte_eal/linuxapp/eal/Makefile +++ b/lib/librte_eal/linuxapp/eal/Makefile @@ -64,8 +64,8 @@ SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += eal_thread.c SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += eal_log.c SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += eal_pci.c SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += eal_pci_uio.c -SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += eal_pci_vfio.c -SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += eal_pci_vfio_mp_sync.c +SRCS-$(CONFIG_RTE_EAL_VFIO) += eal_pci_vfio.c +SRCS-$(CONFIG_RTE_EAL_VFIO) += eal_pci_vfio_mp_sync.c SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += eal_debug.c SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += eal_lcore.c SRCS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += eal_timer.c diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c b/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c index 426953a..9ba4b10 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c +++ b/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c @@ -59,8 +59,6 @@ * This file is only compiled if CONFIG_RTE_EAL_VFIO is set to "y". */ -#ifdef VFIO_PRESENT - #define PAGE_SIZE (sysconf(_SC_PAGESIZE)) #define PAGE_MASK (~(PAGE_SIZE - 1)) @@ -909,4 +907,3 @@ pci_vfio_is_enabled(void) { return vfio_cfg.vfio_enabled; } -#endif diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_vfio_mp_sync.c b/lib/librte_eal/linuxapp/eal/eal_pci_vfio_mp_sync.c index fec7080..657fc2c 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci_vfio_mp_sync.c +++ b/lib/librte_eal/linuxapp/eal/eal_pci_vfio_mp_sync.c @@ -62,8 +62,6 @@ * This file is only compiled if CONFIG_RTE_EAL_VFIO is set to "y". */ -#ifdef VFIO_PRESENT - #define SOCKET_PATH_FMT "%s/.%s_mp_socket" #define CMSGLEN (CMSG_LEN(sizeof(int))) #define FD_TO_CMSGHDR(fd, chdr) \ @@ -391,4 +389,3 @@ pci_vfio_mp_sync_setup(void) return 0; } -#endif -- 2.1.4