diff options
-rw-r--r-- | build-data/packages/external.mk | 4 | ||||
-rw-r--r-- | build-data/packages/vpp.mk | 5 | ||||
-rw-r--r-- | build/external/packages/dpdk.mk | 9 | ||||
-rw-r--r-- | src/cmake/cpu.cmake | 2 |
4 files changed, 19 insertions, 1 deletions
diff --git a/build-data/packages/external.mk b/build-data/packages/external.mk index 9bc04d3ef03..0c0c24375b0 100644 --- a/build-data/packages/external.mk +++ b/build-data/packages/external.mk @@ -44,6 +44,10 @@ ifneq ($(DPDK_PLATFORM_TARGET),) DPDK_MAKE_ARGS += DPDK_TARGET=$(DPDK_PLATFORM_TARGET) endif +ifneq (,$(TARGET_PLATFORM)) +DPDK_MAKE_ARGS += DPDK_AARCH64_GENERIC=n +endif + DPDK_MAKE_EXTRA_ARGS = $(strip $($(PLATFORM)_dpdk_make_extra_args)) ifneq ($(DPDK_MAKE_EXTRA_ARGS),) DPDK_MAKE_ARGS += DPDK_MAKE_EXTRA_ARGS="$(DPDK_MAKE_EXTRA_ARGS)" diff --git a/build-data/packages/vpp.mk b/build-data/packages/vpp.mk index 9ce557a9946..ec61083455e 100644 --- a/build-data/packages/vpp.mk +++ b/build-data/packages/vpp.mk @@ -31,6 +31,11 @@ vpp_cmake_args += -DCMAKE_PREFIX_PATH:PATH="$(vpp_cmake_prefix_path)" ifeq ("$(V)","1") vpp_cmake_args += -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON endif +ifeq (,$(TARGET_PLATFORM)) +ifeq ($(MACHINE),aarch64) +vpp_cmake_args += -DVPP_LOG2_CACHE_LINE_SIZE=7 +endif +endif # Use devtoolset on centos 7 ifneq ($(wildcard /opt/rh/devtoolset-7/enable),) diff --git a/build/external/packages/dpdk.mk b/build/external/packages/dpdk.mk index a551151bba7..9cbcf020a23 100644 --- a/build/external/packages/dpdk.mk +++ b/build/external/packages/dpdk.mk @@ -15,6 +15,7 @@ DPDK_PKTMBUF_HEADROOM ?= 128 DPDK_CACHE_LINE_SIZE ?= 64 DPDK_DOWNLOAD_DIR ?= $(DL_CACHE_DIR) DPDK_DEBUG ?= n +DPDK_AARCH64_GENERIC ?= y DPDK_MLX4_PMD ?= n DPDK_MLX5_PMD ?= n DPDK_TAP_PMD ?= n @@ -67,7 +68,10 @@ export CROSS DPDK_TARGET ?= arm64-armv8a-linuxapp-$(DPDK_CC) DPDK_MACHINE ?= armv8a DPDK_TUNE ?= generic - +ifeq (y, $(DPDK_AARCH64_GENERIC)) +DPDK_CACHE_LINE_SIZE := 128 +# assign aarch64 variant specific options +else CPU_IMP_ARM = 0x41 CPU_IMP_CAVIUM = 0x43 @@ -112,6 +116,9 @@ $(warning Unknown Cavium CPU) endif endif +# finish of assigning aarch64 variant specific options +endif + ############################################################################## # Unknown platform ############################################################################## diff --git a/src/cmake/cpu.cmake b/src/cmake/cpu.cmake index 60cf3b9dcf0..df52053bab5 100644 --- a/src/cmake/cpu.cmake +++ b/src/cmake/cpu.cmake @@ -17,6 +17,8 @@ if(CMAKE_CROSSCOMPILING) message(STATUS "Cross-compiling - cache line size detection disabled") set(VPP_LOG2_CACHE_LINE_SIZE 6) +elseif(DEFINED VPP_LOG2_CACHE_LINE_SIZE) + # Cache line size assigned via cmake args elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*)") file(READ "/proc/cpuinfo" cpuinfo) string(REPLACE "\n" ";" cpuinfo ${cpuinfo}) |