build: allow to redefine max_lcores for DPDK 88/42088/2
authorVladimir Smirnov <[email protected]>
Fri, 3 Jan 2025 20:47:26 +0000 (21:47 +0100)
committerMohammed HAWARI <[email protected]>
Wed, 8 Jan 2025 09:59:13 +0000 (09:59 +0000)
In current versions of DPDK (at least as of 24.11), max
amount of cores available determined at compile_time.

Unless machine type 'native' is used, it is statically set
per platform and for most of them equals to 128.

Add a new option to allow user to redefine max amount of
lcores available to DPDK.

Type: make

Change-Id: Ic4356e12ca75a5c84aeb3bee72de432a23aa6f8a
Signed-off-by: Vladimir Smirnov <[email protected]>
build/external/packages/dpdk.mk

index 6a2fac4..88051da 100644 (file)
@@ -18,6 +18,8 @@ DPDK_TAP_PMD                 ?= n
 DPDK_FAILSAFE_PMD            ?= n
 DPDK_MACHINE                 ?= default
 DPDK_MLX_IBV_LINK            ?= static
+# On most of the systems, default value for max lcores is 128
+DPDK_MAX_LCORES              ?=
 
 dpdk_version                 ?= 24.07
 dpdk_base_url                ?= http://fast.dpdk.org/rel
@@ -46,6 +48,11 @@ ifeq ($(DPDK_DEBUG), y)
 DPDK_BUILD_TYPE:=debug
 endif
 
+DPDK_MAX_LCORES_FLAG :=
+ifneq ($(DPDK_MAX_LCORES),)
+DPDK_MAX_LCORES_FLAG := "-Dmax_lcores=$(DPDK_MAX_LCORES)"
+endif
+
 DPDK_DRIVERS_DISABLED := baseband/\*,  \
        bus/dpaa,                                                       \
        bus/ifpga,                                                      \
@@ -177,7 +184,8 @@ DPDK_MESON_ARGS = \
        "-Ddisable_libs=$(DPDK_LIBS_DISABLED)" \
        -Db_pie=true \
        -Dmachine=$(DPDK_MACHINE) \
-       --buildtype=$(DPDK_BUILD_TYPE) \
+       $(DPDK_MAX_LCORES_FLAG) \
+        --buildtype=$(DPDK_BUILD_TYPE) \
        -Denable_kmods=false \
        ${DPDK_MLX_CONFIG_FLAG}