From 3037e5e268ef3811c179a3229118c818ba305528 Mon Sep 17 00:00:00 2001 From: Thomas Monjalon Date: Thu, 9 Jun 2016 16:40:01 +0200 Subject: [PATCH] eal: remove useless includes of mempool and ring The libraries rte_mempool and rte_ring are not used in EAL, except for the ivshmem part (CONFIG_RTE_LIBRTE_IVSHMEM). Signed-off-by: Thomas Monjalon Acked-by: David Marchand --- lib/librte_eal/bsdapp/eal/Makefile | 1 - lib/librte_eal/linuxapp/eal/Makefile | 3 +++ lib/librte_eal/linuxapp/eal/eal_interrupts.c | 2 -- lib/librte_eal/linuxapp/eal/eal_ivshmem.c | 1 - lib/librte_ivshmem/Makefile | 4 +++- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/librte_eal/bsdapp/eal/Makefile b/lib/librte_eal/bsdapp/eal/Makefile index 474651bdec..698fa0a1a1 100644 --- a/lib/librte_eal/bsdapp/eal/Makefile +++ b/lib/librte_eal/bsdapp/eal/Makefile @@ -40,7 +40,6 @@ VPATH += $(RTE_SDK)/lib/librte_eal/common/arch/$(ARCH_DIR) CFLAGS += -I$(SRCDIR)/include CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common/include -CFLAGS += -I$(RTE_SDK)/lib/librte_ring CFLAGS += $(WERROR_FLAGS) -O3 LDLIBS += -lexecinfo diff --git a/lib/librte_eal/linuxapp/eal/Makefile b/lib/librte_eal/linuxapp/eal/Makefile index e1093619b8..30b30f3381 100644 --- a/lib/librte_eal/linuxapp/eal/Makefile +++ b/lib/librte_eal/linuxapp/eal/Makefile @@ -44,9 +44,12 @@ VPATH += $(RTE_SDK)/lib/librte_eal/common CFLAGS += -I$(SRCDIR)/include CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common/include +ifeq ($(CONFIG_RTE_LIBRTE_IVSHMEM),y) +# workaround for circular dependency eal -> ivshmem -> ring/mempool -> eal CFLAGS += -I$(RTE_SDK)/lib/librte_ring CFLAGS += -I$(RTE_SDK)/lib/librte_mempool CFLAGS += -I$(RTE_SDK)/lib/librte_ivshmem +endif CFLAGS += $(WERROR_FLAGS) -O3 LDLIBS += -ldl diff --git a/lib/librte_eal/linuxapp/eal/eal_interrupts.c b/lib/librte_eal/linuxapp/eal/eal_interrupts.c index 06b26a9e14..a9af396f48 100644 --- a/lib/librte_eal/linuxapp/eal/eal_interrupts.c +++ b/lib/librte_eal/linuxapp/eal/eal_interrupts.c @@ -57,10 +57,8 @@ #include #include #include -#include #include #include -#include #include #include #include diff --git a/lib/librte_eal/linuxapp/eal/eal_ivshmem.c b/lib/librte_eal/linuxapp/eal/eal_ivshmem.c index eea0314b5f..67b3caf26c 100644 --- a/lib/librte_eal/linuxapp/eal/eal_ivshmem.c +++ b/lib/librte_eal/linuxapp/eal/eal_ivshmem.c @@ -49,7 +49,6 @@ #include #include #include -#include #include #include #include diff --git a/lib/librte_ivshmem/Makefile b/lib/librte_ivshmem/Makefile index 16defdbaac..c099438c8e 100644 --- a/lib/librte_ivshmem/Makefile +++ b/lib/librte_ivshmem/Makefile @@ -46,7 +46,9 @@ SRCS-$(CONFIG_RTE_LIBRTE_IVSHMEM) := rte_ivshmem.c # install includes SYMLINK-$(CONFIG_RTE_LIBRTE_IVSHMEM)-include := rte_ivshmem.h -# this lib needs eal +# this lib needs EAL, ring and mempool +DEPDIRS-$(CONFIG_RTE_LIBRTE_IVSHMEM) += lib/librte_eal +DEPDIRS-$(CONFIG_RTE_LIBRTE_IVSHMEM) += lib/librte_ring DEPDIRS-$(CONFIG_RTE_LIBRTE_IVSHMEM) += lib/librte_mempool include $(RTE_SDK)/mk/rte.lib.mk -- 2.20.1