[1/1] build: add emag(arm64) platform and default config

Message ID 20190912045023.4564-2-jerryhao@os.amperecomputing.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series build: add emag(arm64) platform and default config |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-dpdk_compile_ovs success Compile Testing PASS
ci/iol-dpdk_compile success Compile Testing PASS
ci/iol-dpdk_compile_spdk success Compile Testing PASS
ci/intel-Performance success Performance Testing PASS
ci/mellanox-Performance success Performance Testing PASS

Commit Message

Jerry Hao OS Sept. 12, 2019, 4:51 a.m. UTC
  This patch is to add the emag default CACHE_LINE_SIZE
settings and ARCH variable definitions

Signed-off-by: Jerry Hao OS <jerryhao@os.amperecomputing.com>
---
 config/defconfig_arm64-emag-linux-gcc    |  1 +
 config/defconfig_arm64-emag-linuxapp-gcc |  8 ++++++
 mk/machine/emag/rte.vars.mk              | 31 ++++++++++++++++++++++++
 3 files changed, 40 insertions(+)
 create mode 120000 config/defconfig_arm64-emag-linux-gcc
 create mode 100644 config/defconfig_arm64-emag-linuxapp-gcc
 create mode 100644 mk/machine/emag/rte.vars.mk
  

Comments

Jerin Jacob Kollanukkaran Sept. 12, 2019, 5:45 a.m. UTC | #1
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Jerry Hao OS
> Sent: Thursday, September 12, 2019 10:22 AM
> To: thomas@monjalon.net
> Cc: dev@dpdk.org; Jerry Hao OS <jerryhao@os.amperecomputing.com>
> Subject: [dpdk-dev] [PATCH 1/1] build: add emag(arm64) platform and
> default config
> 
> This patch is to add the emag default CACHE_LINE_SIZE
> settings and ARCH variable definitions
> 
> Signed-off-by: Jerry Hao OS <jerryhao@os.amperecomputing.com>
> ---
>  config/defconfig_arm64-emag-linux-gcc    |  1 +
>  config/defconfig_arm64-emag-linuxapp-gcc |  8 ++++++
>  mk/machine/emag/rte.vars.mk              | 31 ++++++++++++++++++++++++
>  3 files changed, 40 insertions(+)
>  create mode 120000 config/defconfig_arm64-emag-linux-gcc
>  create mode 100644 config/defconfig_arm64-emag-linuxapp-gcc
>  create mode 100644 mk/machine/emag/rte.vars.mk

Add meson build support as well. See config/arm/*

> +
> +# ARCH =
> +# CROSS =
> +# MACHINE_CFLAGS =
> +# MACHINE_LDFLAGS =
> +# MACHINE_ASFLAGS =
> +# CPU_CFLAGS =
> +# CPU_LDFLAGS =
> +# CPU_ASFLAGS =
> +
> +MACHINE_CFLAGS += -march=armv8-a+crc+crypto

Is emag platform is only armv8? If it is supports lse then add that as well.
See mk/machine/octeontx2/rte.vars.mk as example

If it has dedicated mcpu support then add the following
MACHINE_CFLAGS += $(call rte_cc_has_argument, -mcpu=your_cpu)


> --
> 2.17.1
  

Patch

diff --git a/config/defconfig_arm64-emag-linux-gcc b/config/defconfig_arm64-emag-linux-gcc
new file mode 120000
index 000000000..21894a31a
--- /dev/null
+++ b/config/defconfig_arm64-emag-linux-gcc
@@ -0,0 +1 @@ 
+defconfig_arm64-emag-linuxapp-gcc
\ No newline at end of file
diff --git a/config/defconfig_arm64-emag-linuxapp-gcc b/config/defconfig_arm64-emag-linuxapp-gcc
new file mode 100644
index 000000000..f7c05044c
--- /dev/null
+++ b/config/defconfig_arm64-emag-linuxapp-gcc
@@ -0,0 +1,8 @@ 
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2019 Ampere Computing
+#
+
+#include "defconfig_arm64-armv8a-linux-gcc"
+
+CONFIG_RTE_MACHINE="emag"
+CONFIG_RTE_CACHE_LINE_SIZE=64
diff --git a/mk/machine/emag/rte.vars.mk b/mk/machine/emag/rte.vars.mk
new file mode 100644
index 000000000..9ce8b6bc9
--- /dev/null
+++ b/mk/machine/emag/rte.vars.mk
@@ -0,0 +1,31 @@ 
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2019 Ampere Computing
+#
+
+#
+# machine:
+#
+#   - can define ARCH variable (overridden by cmdline value)
+#   - can define CROSS variable (overridden by cmdline value)
+#   - define MACHINE_CFLAGS variable (overridden by cmdline value)
+#   - define MACHINE_LDFLAGS variable (overridden by cmdline value)
+#   - define MACHINE_ASFLAGS variable (overridden by cmdline value)
+#   - can define CPU_CFLAGS variable (overridden by cmdline value) that
+#     overrides the one defined in arch.
+#   - can define CPU_LDFLAGS variable (overridden by cmdline value) that
+#     overrides the one defined in arch.
+#   - can define CPU_ASFLAGS variable (overridden by cmdline value) that
+#     overrides the one defined in arch.
+#   - may override any previously defined variable
+#
+
+# ARCH =
+# CROSS =
+# MACHINE_CFLAGS =
+# MACHINE_LDFLAGS =
+# MACHINE_ASFLAGS =
+# CPU_CFLAGS =
+# CPU_LDFLAGS =
+# CPU_ASFLAGS =
+
+MACHINE_CFLAGS += -march=armv8-a+crc+crypto