diff options
| author | 童宗振 <[email protected]> | 2024-08-06 02:13:16 +0000 |
|---|---|---|
| committer | 童宗振 <[email protected]> | 2024-08-06 02:13:16 +0000 |
| commit | e279579397030323cb451cba23660ac823b3fab0 (patch) | |
| tree | 3687f0df72b291dbed01bb7e26d5cb3c6d8d5a10 /support | |
| parent | cb4c34cf1904910b622b36454f378630e11731b3 (diff) | |
Build in aarch64
Diffstat (limited to 'support')
| -rw-r--r-- | support/CMakeLists.txt | 21 | ||||
| -rw-r--r-- | support/dpdk/dpdk-23.11.1-fix-dup-msl-name-sec-process.patch | 3 |
2 files changed, 22 insertions, 2 deletions
diff --git a/support/CMakeLists.txt b/support/CMakeLists.txt index 2c43f8c..4da503c 100644 --- a/support/CMakeLists.txt +++ b/support/CMakeLists.txt @@ -134,8 +134,27 @@ elseif(CMAKE_BUILD_TYPE STREQUAL "Release") else() set(DPDK_BUILD_TYPE debugoptimized) endif() + +if(MACHINE STREQUAL ${AARCH64}) + set(DPDK_MESON_MACHINE generic) +else() + set(DPDK_MESON_MACHINE ${MACHINE}) +endif() + +set(DPDK_C_ARGS "['-DRTE_ETHDEV_PROFILE_WITH_VTUNE']") +if((MACHINE STREQUAL ${AARCH64}) AND (CMAKE_BUILD_TYPE STREQUAL "Debug")) + # arm unrecognized argument in option ‘-mcmodel=medium’ + # set(DPDK_C_ARGS "['-DRTE_ETHDEV_PROFILE_WITH_VTUNE','-mcmodel=large']") + set(DPDK_BUILD_TYPE debugoptimized) +endif() + +message(STATUS "dpdk build machine: ${DPDK_MESON_MACHINE}") +message(STATUS "dpdk c args: ${DPDK_C_ARGS}") message(STATUS "dpdk build type: ${DPDK_BUILD_TYPE}") + +set(DPDK_MESON_ENABLE_APPS "pdump,proc-info,test-pmd") + set(DPDK_MESON_DISABLED_DRIVERS "common/cpt,common/dpaax,common/octeontx,common/octeontx2,common/sfc_efx,\ common/qat,bus/dpaa,bus/fslmc,bus/ifpga,bus/vmbus,mempool/bucket,mempool/dpaa,\ mempool/dpaa2,mempool/octeontx,mempool/octeontx2,mempool/stack,raw/ifpga,raw/ioat,\ @@ -152,7 +171,7 @@ ExternalProject_Add(dpdk PREFIX dpdk COMMAND patch -Ns -p1 -i ${MERGED_PATCH_FILE} COMMAND ${CMAKE_COMMAND} -E chdir <SOURCE_DIR> bash ${DPDK_SOURCE_DIR}/dpdk-config-set.sh CONFIGURE_COMMAND - COMMAND meson -Dmax_lcores=256 -Dc_args=-DRTE_ETHDEV_PROFILE_WITH_VTUNE -Ddisable_drivers=${DPDK_MESON_DISABLED_DRIVERS} -Dprefix=<INSTALL_DIR> -Dcpu_instruction_set=${MACHINE} -Dibverbs_link=dlopen -Dbuildtype=${DPDK_BUILD_TYPE} build + COMMAND meson -Dmax_lcores=256 -Dc_args=${DPDK_C_ARGS} -Ddisable_drivers=${DPDK_MESON_DISABLED_DRIVERS} -Dprefix=<INSTALL_DIR> -Dplatform=generic -Dcpu_instruction_set=${DPDK_MESON_MACHINE} -Dibverbs_link=dlopen -Dbuildtype=${DPDK_BUILD_TYPE} -Denable_apps=${DPDK_MESON_ENABLE_APPS} build BUILD_COMMAND ${CMAKE_COMMAND} -E chdir <SOURCE_DIR>/build ninja INSTALL_COMMAND COMMAND ${CMAKE_COMMAND} -E chdir <SOURCE_DIR>/build ninja install diff --git a/support/dpdk/dpdk-23.11.1-fix-dup-msl-name-sec-process.patch b/support/dpdk/dpdk-23.11.1-fix-dup-msl-name-sec-process.patch index 4191e59..daac876 100644 --- a/support/dpdk/dpdk-23.11.1-fix-dup-msl-name-sec-process.patch +++ b/support/dpdk/dpdk-23.11.1-fix-dup-msl-name-sec-process.patch @@ -1,10 +1,11 @@ --- dpdk-stable-23.11.1/lib/eal/linux/eal_memalloc.c 2024-05-17 14:46:11.000000000 +0800 +++ dpdk-stable-23.11.1-mr/lib/eal/linux/eal_memalloc.c 2024-07-12 17:27:43.833952738 +0800 -@@ -7,6 +7,7 @@ +@@ -7,6 +7,8 @@ #include <stdlib.h> #include <stdio.h> #include <stdint.h> +#include <inttypes.h> ++#include <rte_cycles.h> #include <string.h> #include <sys/mman.h> #include <sys/stat.h> |
