Yes, Damjan, will submit the patch to gerrit for public review, after finishing internal review inside VPP/Aarch64. This email is just to get the idea from community beforehand. Thanks.
From: Damjan Marion (damarion) <damar...@cisco.com> Sent: Wednesday, March 13, 2019 11:04 PM To: Lijian Zhang (Arm Technology China) <lijian.zh...@arm.com> Cc: vpp-dev@lists.fd.io; nd <n...@arm.com> Subject: Re: Build VPP packages on aarch64 Dear Lijian, We use gerrit for code review, so please submit your patch there… Thanks, -- Damjan On 13 Mar 2019, at 16:01, Lijian Zhang (Arm Technology China) <lijian.zh...@arm.com<mailto:lijian.zh...@arm.com>> wrote: Hi Maintainers, The current aarch64 version of VPP package distro in cloud repository (https://packagecloud.io/fdio/master/ubuntu) is made on a ThunderX server. During the compilation process, no matter what type of make target is (either binaries, e.g, build/build-release, or packages, e.g., pkg-deb, pkg-rpm), it’s always using some arch-specific options, e.g., 128Byte cache line size, T=arm64-thunderx-linuxapp-gcc, RTE_MACHINE=thunderx, even for the package distro to be uploaded into cloud repository. The aarch64 version of package distro crashed on current CSIT performance testing aarch64 servers due to the non-generic compilation options. And that non-generic options may also cause performance drop on other aarch64 variants. So VPP/Aarch64 community has a suggestion that, 1. for binary type target, e.g., build/build-release, the compilation can use arch-specific options 2. for package type target, e.g., pkg-deb/pkg-rpm, the compilation has to use generic options, e.g., 64Byte cache line size, T=arm64-armv8a-linuxapp-gcc, RTE_MACHINE=armv8a Makefile gets to know if it’s binary target or package target by checking if there’s a string of ‘package’ in target name. A draft patch is as below. Appreciate your suggestions. diff --git a/build-data/packages/external.mk b/build-data/packages/external.mk index 1ed3f09af..03e902dc1 100644 --- a/build-data/packages/external.mk +++ b/build-data/packages/external.mk @@ -42,6 +42,10 @@ endif DPDK_PLATFORM_TARGET=$(strip $($(PLATFORM)_dpdk_target)) ifneq ($(DPDK_PLATFORM_TARGET),) DPDK_MAKE_ARGS += DPDK_TARGET=$(DPDK_PLATFORM_TARGET) +else +ifneq (,$(findstring package,$(MAKECMDGOALS))) +DPDK_MAKE_ARGS += DPDK_TARGET_GENERIC=y +endif endif DPDK_MAKE_EXTRA_ARGS = $(strip $($(PLATFORM)_dpdk_make_extra_args)) diff --git a/build-data/packages/vpp.mk b/build-data/packages/vpp.mk index 9ce557a99..6c6cb4446 100644 --- a/build-data/packages/vpp.mk +++ b/build-data/packages/vpp.mk @@ -31,6 +31,9 @@ vpp_cmake_args += -DCMAKE_PREFIX_PATH:PATH="$(vpp_cmake_prefix_path)" ifeq ("$(V)","1") vpp_cmake_args += -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON endif +ifneq (,$(findstring package,$(MAKECMDGOALS))) +vpp_cmake_args += -DCMAKE_TARGET_GENERIC:BOOL=ON +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 9e10fca1a..1cf2de196 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_TARGET_GENERIC ?= n DPDK_MLX4_PMD ?= n DPDK_MLX5_PMD ?= n DPDK_MLX5_PMD_DLOPEN_DEPS ?= n @@ -69,6 +70,9 @@ DPDK_TARGET ?= arm64-armv8a-linuxapp-$(DPDK_CC) DPDK_MACHINE ?= armv8a DPDK_TUNE ?= generic +# Assign aarch64 variant specific options +ifeq (n, $(DPDK_TARGET_GENERIC)) + CPU_IMP_ARM = 0x41 CPU_IMP_CAVIUM = 0x43 @@ -113,6 +117,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 60cf3b9dc..a1a670b23 100644 --- a/src/cmake/cpu.cmake +++ b/src/cmake/cpu.cmake @@ -33,9 +33,12 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*)") set(CPU_PART ${value}) endif() endforeach() + if(CMAKE_TARGET_GENERIC) + message(STATUS "Generic image for all aarch64 variant - cache line size detection disabled") + set(VPP_LOG2_CACHE_LINE_SIZE 6) # Implementer 0x43 - Cavium # Part 0x0af - ThunderX2 is 64B, rest all are 128B - if (${CPU_IMPLEMENTER} STREQUAL "0x43") + elseif (${CPU_IMPLEMENTER} STREQUAL "0x43") if (${CPU_PART} STREQUAL "0x0af") set(VPP_LOG2_CACHE_LINE_SIZE 6) else() Thanks.
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#12510): https://lists.fd.io/g/vpp-dev/message/12510 Mute This Topic: https://lists.fd.io/mt/30416789/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-