From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E7073A057C; Fri, 27 Mar 2020 02:16:46 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3564B1C067; Fri, 27 Mar 2020 02:16:45 +0100 (CET) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 00ED33B5 for ; Fri, 27 Mar 2020 02:16:44 +0100 (CET) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id A7C6A5C02A0; Thu, 26 Mar 2020 21:16:43 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Thu, 26 Mar 2020 21:16:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=mesmtp; bh=/Tp4SpxF/U KWq2nMi8ngVScTKbA26vtSN0VP7zLPTCA=; b=GeLAHYUzohASHQW2TXrulXp/fN lQEd4inPHsDRxz9oJJTvs9RXFxwxiHZ+jDjvuBZSbGE2BTx1HzXpYZrtvD2gRyxs anv0tL8o51suSrn+Ah/vDg9H16S2TgY3n8wmyFzUWkH9m/w/PRjwT+1NggIG0YU0 9eFpN+B88Qhb2HU2k= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=/Tp4SpxF/UKWq2nMi8ngVScTKbA26vtSN0VP7zLPTCA=; b=MGvvLNdQ ljp/gqJ0zJSpKxxr0GW1F//MOeJ5nT3+RwMpC/CSZ2fY9eKa2YLoRuf26/obV6mq 5+tNn39uT8FTqf4mQydMCoXPBkEx1OU4O2Hftw7JQEnx/+PlkLoihglar61K3QtN xzpRs3172fKGqNaP1VsMvZb0ycDFL+DGxKWBWBJq6SZlIm8a3M3tEdHD1sm7OWFB dZBkU/wrTI1kqSIl5XTJTZw1hfm3eBR7wJl9T25XziEZe+PbRJc1tqypGZN6hDbj ZexNf1dwALDzR7RHOVv7O711vs9qqShiu13qVlxlNtz/Fqf87g4rME6fa4ZNsfB6 5ilNag1YaRDSAA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudehjedgudefudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ffohhmrghinhephhhurghrmhdrtghomhenucfkphepjeejrddufeegrddvtdefrddukeeg necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhoh hmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id D9575306ABFD; Thu, 26 Mar 2020 21:16:41 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: david.marchand@redhat.com, Jan Viktorin , Gavin Hu , Bruce Richardson , David Christensen , Konstantin Ananyev Date: Fri, 27 Mar 2020 02:15:35 +0100 Message-Id: <20200327011540.954014-4-thomas@monjalon.net> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200327011540.954014-1-thomas@monjalon.net> References: <20200320001220.150235-1-thomas@monjalon.net> <20200327011540.954014-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 3/8] eal: move arch-specific C files X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The arch-specific directories arm, ppc and x86 in common/arch/ are moved at the same level as the OS-specific directories. It makes more clear that EAL is covering a matrix combining OS and arch. Signed-off-by: Thomas Monjalon --- MAINTAINERS | 6 +++--- devtools/build-tags.sh | 7 +++---- lib/librte_eal/arm/meson.build | 8 ++++++++ lib/librte_eal/{common/arch => }/arm/rte_cpuflags.c | 0 lib/librte_eal/{common/arch => }/arm/rte_cycles.c | 0 lib/librte_eal/{common/arch => }/arm/rte_hypervisor.c | 0 lib/librte_eal/common/arch/arm/meson.build | 5 ----- lib/librte_eal/common/arch/ppc | 1 - lib/librte_eal/common/arch/x86/meson.build | 5 ----- lib/librte_eal/common/meson.build | 7 ------- lib/librte_eal/freebsd/eal/Makefile | 2 +- lib/librte_eal/linux/eal/Makefile | 2 +- lib/librte_eal/meson.build | 4 +++- lib/librte_eal/{common/arch/ppc_64 => ppc}/meson.build | 7 +++++-- .../{common/arch/ppc_64 => ppc}/rte_cpuflags.c | 0 lib/librte_eal/{common/arch/ppc_64 => ppc}/rte_cycles.c | 0 .../{common/arch/ppc_64 => ppc}/rte_hypervisor.c | 0 lib/librte_eal/x86/meson.build | 9 +++++++++ lib/librte_eal/{common/arch => }/x86/rte_cpuflags.c | 0 lib/librte_eal/{common/arch => }/x86/rte_cpuid.h | 0 lib/librte_eal/{common/arch => }/x86/rte_cycles.c | 0 lib/librte_eal/{common/arch => }/x86/rte_hypervisor.c | 0 lib/librte_eal/{common/arch => }/x86/rte_spinlock.c | 0 23 files changed, 33 insertions(+), 30 deletions(-) create mode 100644 lib/librte_eal/arm/meson.build rename lib/librte_eal/{common/arch => }/arm/rte_cpuflags.c (100%) rename lib/librte_eal/{common/arch => }/arm/rte_cycles.c (100%) rename lib/librte_eal/{common/arch => }/arm/rte_hypervisor.c (100%) delete mode 100644 lib/librte_eal/common/arch/arm/meson.build delete mode 120000 lib/librte_eal/common/arch/ppc delete mode 100644 lib/librte_eal/common/arch/x86/meson.build rename lib/librte_eal/{common/arch/ppc_64 => ppc}/meson.build (51%) rename lib/librte_eal/{common/arch/ppc_64 => ppc}/rte_cpuflags.c (100%) rename lib/librte_eal/{common/arch/ppc_64 => ppc}/rte_cycles.c (100%) rename lib/librte_eal/{common/arch/ppc_64 => ppc}/rte_hypervisor.c (100%) create mode 100644 lib/librte_eal/x86/meson.build rename lib/librte_eal/{common/arch => }/x86/rte_cpuflags.c (100%) rename lib/librte_eal/{common/arch => }/x86/rte_cpuid.h (100%) rename lib/librte_eal/{common/arch => }/x86/rte_cycles.c (100%) rename lib/librte_eal/{common/arch => }/x86/rte_hypervisor.c (100%) rename lib/librte_eal/{common/arch => }/x86/rte_spinlock.c (100%) diff --git a/MAINTAINERS b/MAINTAINERS index d30bb6e9dd..a1f1a22833 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -261,7 +261,7 @@ F: app/test/test_rand_perf.c ARM v7 M: Jan Viktorin M: Gavin Hu -F: lib/librte_eal/common/arch/arm/ +F: lib/librte_eal/arm/ F: lib/librte_eal/common/include/arch/arm/ ARM v8 @@ -281,7 +281,7 @@ F: drivers/net/virtio/virtio_rxtx_simple_neon.c IBM POWER (alpha) M: David Christensen -F: lib/librte_eal/common/arch/ppc_64/ +F: lib/librte_eal/ppc/ F: lib/librte_eal/common/include/arch/ppc_64/ F: drivers/net/i40e/i40e_rxtx_vec_altivec.c F: examples/l3fwd/*altivec.h @@ -289,7 +289,7 @@ F: examples/l3fwd/*altivec.h Intel x86 M: Bruce Richardson M: Konstantin Ananyev -F: lib/librte_eal/common/arch/x86/ +F: lib/librte_eal/x86/ F: lib/librte_eal/common/include/arch/x86/ Linux EAL (with overlaps) diff --git a/devtools/build-tags.sh b/devtools/build-tags.sh index dc037f92b3..8221f90f70 100755 --- a/devtools/build-tags.sh +++ b/devtools/build-tags.sh @@ -79,7 +79,7 @@ bsd_sources() arm_common() { - find_sources "lib/librte_eal/common/arch/arm" '*.[chS]' + find_sources "lib/librte_eal/arm" '*.[chS]' find_sources "$source_dirs" '*neon*.[chS]' } @@ -100,8 +100,7 @@ arm_64_sources() x86_common() { - find_sources "lib/librte_eal/common/arch/x86" '*.[chS]' - + find_sources "lib/librte_eal/x86" '*.[chS]' find_sources "examples/performance-thread/common/arch/x86" '*.[chS]' find_sources "$source_dirs" '*_sse*.[chS]' find_sources "$source_dirs" '*_avx*.[chS]' @@ -124,7 +123,7 @@ x86_64_sources() ppc_64_sources() { - find_sources "lib/librte_eal/common/arch/ppc_64" '*.[chS]' + find_sources "lib/librte_eal/ppc" '*.[chS]' find_sources "lib/librte_eal/common/include/arch/ppc_64" '*.[chS]' find_sources "$source_dirs" '*altivec*.[chS]' } diff --git a/lib/librte_eal/arm/meson.build b/lib/librte_eal/arm/meson.build new file mode 100644 index 0000000000..f8f7dea9b2 --- /dev/null +++ b/lib/librte_eal/arm/meson.build @@ -0,0 +1,8 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2017 Intel Corporation. + +sources += files( + 'rte_cpuflags.c', + 'rte_cycles.c', + 'rte_hypervisor.c', +) diff --git a/lib/librte_eal/common/arch/arm/rte_cpuflags.c b/lib/librte_eal/arm/rte_cpuflags.c similarity index 100% rename from lib/librte_eal/common/arch/arm/rte_cpuflags.c rename to lib/librte_eal/arm/rte_cpuflags.c diff --git a/lib/librte_eal/common/arch/arm/rte_cycles.c b/lib/librte_eal/arm/rte_cycles.c similarity index 100% rename from lib/librte_eal/common/arch/arm/rte_cycles.c rename to lib/librte_eal/arm/rte_cycles.c diff --git a/lib/librte_eal/common/arch/arm/rte_hypervisor.c b/lib/librte_eal/arm/rte_hypervisor.c similarity index 100% rename from lib/librte_eal/common/arch/arm/rte_hypervisor.c rename to lib/librte_eal/arm/rte_hypervisor.c diff --git a/lib/librte_eal/common/arch/arm/meson.build b/lib/librte_eal/common/arch/arm/meson.build deleted file mode 100644 index 79731e1a2c..0000000000 --- a/lib/librte_eal/common/arch/arm/meson.build +++ /dev/null @@ -1,5 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2017 Intel Corporation. - -eal_common_arch_sources = files('rte_cpuflags.c', - 'rte_cycles.c', 'rte_hypervisor.c') diff --git a/lib/librte_eal/common/arch/ppc b/lib/librte_eal/common/arch/ppc deleted file mode 120000 index 2db6a0c918..0000000000 --- a/lib/librte_eal/common/arch/ppc +++ /dev/null @@ -1 +0,0 @@ -ppc_64 \ No newline at end of file diff --git a/lib/librte_eal/common/arch/x86/meson.build b/lib/librte_eal/common/arch/x86/meson.build deleted file mode 100644 index 14bf204c6f..0000000000 --- a/lib/librte_eal/common/arch/x86/meson.build +++ /dev/null @@ -1,5 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2017 Intel Corporation - -eal_common_arch_sources = files('rte_spinlock.c', 'rte_cpuflags.c', - 'rte_cycles.c', 'rte_hypervisor.c') diff --git a/lib/librte_eal/common/meson.build b/lib/librte_eal/common/meson.build index 2b97715a20..e666618f7f 100644 --- a/lib/librte_eal/common/meson.build +++ b/lib/librte_eal/common/meson.build @@ -41,13 +41,6 @@ common_sources = files( 'rte_service.c' ) -# get architecture specific sources and objs -eal_common_arch_sources = [] -eal_common_arch_objs = [] -subdir(join_paths('arch', arch_subdir)) -common_sources += eal_common_arch_sources -common_objs += eal_common_arch_objs - common_headers = files( 'include/rte_alarm.h', 'include/rte_branch_prediction.h', diff --git a/lib/librte_eal/freebsd/eal/Makefile b/lib/librte_eal/freebsd/eal/Makefile index b160b57906..e3023f24fa 100644 --- a/lib/librte_eal/freebsd/eal/Makefile +++ b/lib/librte_eal/freebsd/eal/Makefile @@ -7,7 +7,7 @@ LIB = librte_eal.a ARCH_DIR ?= $(RTE_ARCH) VPATH += $(RTE_SDK)/lib/librte_eal/common -VPATH += $(RTE_SDK)/lib/librte_eal/common/arch/$(ARCH_DIR) +VPATH += $(RTE_SDK)/lib/librte_eal/$(ARCH_DIR) CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -I$(SRCDIR)/include diff --git a/lib/librte_eal/linux/eal/Makefile b/lib/librte_eal/linux/eal/Makefile index e70cf104a4..177b7c45da 100644 --- a/lib/librte_eal/linux/eal/Makefile +++ b/lib/librte_eal/linux/eal/Makefile @@ -8,7 +8,7 @@ LIB = librte_eal.a ARCH_DIR ?= $(RTE_ARCH) EXPORT_MAP := ../../rte_eal_version.map -VPATH += $(RTE_SDK)/lib/librte_eal/common/arch/$(ARCH_DIR) +VPATH += $(RTE_SDK)/lib/librte_eal/$(ARCH_DIR) VPATH += $(RTE_SDK)/lib/librte_eal/common diff --git a/lib/librte_eal/meson.build b/lib/librte_eal/meson.build index 1730d603fc..16a4f9825e 100644 --- a/lib/librte_eal/meson.build +++ b/lib/librte_eal/meson.build @@ -12,6 +12,8 @@ subdir('common') # defines common_sources, common_objs, etc. dpdk_conf.set('RTE_EXEC_ENV_' + exec_env.to_upper(), 1) subdir(exec_env + '/eal') +subdir(arch_subdir) + allow_experimental_apis = true deps += 'kvargs' if dpdk_conf.has('RTE_USE_LIBBSD') @@ -23,7 +25,7 @@ endif if cc.has_header('getopt.h') cflags += ['-DHAVE_GETOPT_H', '-DHAVE_GETOPT', '-DHAVE_GETOPT_LONG'] endif -sources = common_sources + env_sources +sources += common_sources + env_sources objs = common_objs + env_objs headers = common_headers + env_headers includes = eal_inc diff --git a/lib/librte_eal/common/arch/ppc_64/meson.build b/lib/librte_eal/ppc/meson.build similarity index 51% rename from lib/librte_eal/common/arch/ppc_64/meson.build rename to lib/librte_eal/ppc/meson.build index 40b3dc533a..695b171516 100644 --- a/lib/librte_eal/common/arch/ppc_64/meson.build +++ b/lib/librte_eal/ppc/meson.build @@ -1,5 +1,8 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Luca Boccassi -eal_common_arch_sources = files('rte_cpuflags.c', - 'rte_cycles.c', 'rte_hypervisor.c') +sources += files( + 'rte_cpuflags.c', + 'rte_cycles.c', + 'rte_hypervisor.c', +) diff --git a/lib/librte_eal/common/arch/ppc_64/rte_cpuflags.c b/lib/librte_eal/ppc/rte_cpuflags.c similarity index 100% rename from lib/librte_eal/common/arch/ppc_64/rte_cpuflags.c rename to lib/librte_eal/ppc/rte_cpuflags.c diff --git a/lib/librte_eal/common/arch/ppc_64/rte_cycles.c b/lib/librte_eal/ppc/rte_cycles.c similarity index 100% rename from lib/librte_eal/common/arch/ppc_64/rte_cycles.c rename to lib/librte_eal/ppc/rte_cycles.c diff --git a/lib/librte_eal/common/arch/ppc_64/rte_hypervisor.c b/lib/librte_eal/ppc/rte_hypervisor.c similarity index 100% rename from lib/librte_eal/common/arch/ppc_64/rte_hypervisor.c rename to lib/librte_eal/ppc/rte_hypervisor.c diff --git a/lib/librte_eal/x86/meson.build b/lib/librte_eal/x86/meson.build new file mode 100644 index 0000000000..252699eebd --- /dev/null +++ b/lib/librte_eal/x86/meson.build @@ -0,0 +1,9 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2017 Intel Corporation + +sources += files( + 'rte_cpuflags.c', + 'rte_cycles.c', + 'rte_hypervisor.c', + 'rte_spinlock.c', +) diff --git a/lib/librte_eal/common/arch/x86/rte_cpuflags.c b/lib/librte_eal/x86/rte_cpuflags.c similarity index 100% rename from lib/librte_eal/common/arch/x86/rte_cpuflags.c rename to lib/librte_eal/x86/rte_cpuflags.c diff --git a/lib/librte_eal/common/arch/x86/rte_cpuid.h b/lib/librte_eal/x86/rte_cpuid.h similarity index 100% rename from lib/librte_eal/common/arch/x86/rte_cpuid.h rename to lib/librte_eal/x86/rte_cpuid.h diff --git a/lib/librte_eal/common/arch/x86/rte_cycles.c b/lib/librte_eal/x86/rte_cycles.c similarity index 100% rename from lib/librte_eal/common/arch/x86/rte_cycles.c rename to lib/librte_eal/x86/rte_cycles.c diff --git a/lib/librte_eal/common/arch/x86/rte_hypervisor.c b/lib/librte_eal/x86/rte_hypervisor.c similarity index 100% rename from lib/librte_eal/common/arch/x86/rte_hypervisor.c rename to lib/librte_eal/x86/rte_hypervisor.c diff --git a/lib/librte_eal/common/arch/x86/rte_spinlock.c b/lib/librte_eal/x86/rte_spinlock.c similarity index 100% rename from lib/librte_eal/common/arch/x86/rte_spinlock.c rename to lib/librte_eal/x86/rte_spinlock.c -- 2.25.1