diff options
-rw-r--r-- | build-data/packages/dpdk.mk | 10 | ||||
-rw-r--r-- | build-data/platforms/arm32.mk | 14 | ||||
-rw-r--r-- | dpdk/Makefile | 11 |
3 files changed, 31 insertions, 4 deletions
diff --git a/build-data/packages/dpdk.mk b/build-data/packages/dpdk.mk index c7f04346ab6..2bfc4b49d32 100644 --- a/build-data/packages/dpdk.mk +++ b/build-data/packages/dpdk.mk @@ -17,6 +17,16 @@ DPDK_MAKE_ARGS = -C $(call find_source_fn,$(PACKAGE_SOURCE)) \ DPDK_DEBUG=$(DPDK_DEBUG) +TARGET=$(strip $($(PLATFORM)_dpdk_target)) +ifneq ($(TARGET),) +DPDK_MAKE_ARGS += DPDK_TARGET=$(TARGET) +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)" +endif + dpdk_configure = echo dpdk_make_args = $(DPDK_MAKE_ARGS) config diff --git a/build-data/platforms/arm32.mk b/build-data/platforms/arm32.mk index fecc5bbcadb..5e1adabfeea 100644 --- a/build-data/platforms/arm32.mk +++ b/build-data/platforms/arm32.mk @@ -15,16 +15,24 @@ arm32_arch = native arm32_native_tools = vppapigen -arm32_uses_dpdk = no +arm32_uses_dpdk = yes arm32_uses_openssl = no arm32_root_packages = vpp vlib vlib-api vnet svm vpp-api-test \ vpp-japi gmod vlib_configure_args_arm32 = --with-pre-data=128 +vnet_configure_args_arm32 = --with-dpdk --without-vcgn --without-ipsec --without-ipv6sr +vpp_configure_args_arm32 = --with-dpdk --without-vcgn --without-ipsec --without-ipv6sr + +arm32_dpdk_arch = "armv7a" +arm32_dpdk_target = "arm-armv7a-linuxapp-gcc" +arm32_dpdk_make_extra_args = "CPU_CFLAGS='-mfloat-abi=hard' \ + CONFIG_RTE_EAL_IGB_UIO=y \ + CONFIG_RTE_LIBRTE_E1000_PMD=y \ + CONFIG_RTE_MAX_LCORE=4 \ + CONFIG_RTE_MAX_NUMA_NODES=1" -vnet_configure_args_arm32 = --without-vcgn --without-ipsec --without-ipv6sr -vpp_configure_args_arm32 = --without-vcgn --without-ipsec --without-ipv6sr arm32_debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -DVLIB_MAX_CPUS=4 -march=armv7-a \ -fstack-protector-all -fPIC -Werror diff --git a/dpdk/Makefile b/dpdk/Makefile index 5d05e6af2d1..165058d9530 100644 --- a/dpdk/Makefile +++ b/dpdk/Makefile @@ -38,7 +38,11 @@ else DPDK_CC=gcc endif + +ifeq (,$(DPDK_TARGET)) DPDK_TARGET := x86_64-native-linuxapp-$(DPDK_CC) +endif + JOBS := $(shell grep processor /proc/cpuinfo | wc -l) # compiler/linker custom arguments @@ -63,6 +67,10 @@ else ifeq ($(DPDK_MARCH),core-avx-i) DPDK_MACHINE:=ivb # Ivy Bridge else ifeq ($(DPDK_MARCH),core-avx2) DPDK_MACHINE:=hsw # Haswell +else ifeq ($(DPDK_MARCH),armv7a) +DPDK_MACHINE:=armv7a # ARMv7 +else ifeq ($(DPDK_MARCH),armv8a) +DPDK_MACHINE:=armv8a # ARMv8 else $(error Unknown DPDK_MARCH) endif @@ -75,7 +83,8 @@ DPDK_MAKE_ARGS := -C $(DPDK_SOURCE) -j $(JOBS) \ EXTRA_CFLAGS="$(DPDK_EXTRA_CFLAGS)" \ EXTRA_LDFLAGS="$(DPDK_EXTRA_LDFLAGS)" \ CPU_CFLAGS="$(DPDK_CPU_CFLAGS)" \ - CPU_LDFLAGS="$(DPDK_CPU_LDFLAGS)" + CPU_LDFLAGS="$(DPDK_CPU_LDFLAGS)" \ + $(DPDK_MAKE_EXTRA_ARGS) DPDK_SOURCE_FILES := $(shell [ -e $(DPDK_SOURCE) ] && find $(DPDK_SOURCE) -name "*.[chS]") |