configure: added --max-lcores option to ./configure
This patch adds support for --max-lcores configuration option to ./configure script. This option can be used to change value of DPDK's RTE_MAX_LCORE (which is by default set to 128 for x86 architecture). If specified, DPDK will be configured to use the value provided by the user instead of the default one. The option can be useful in systems where number of physical CPUs is larger than 128. When RTE_MAX_LCORE is increased, it is possible to specify cores with identifiers larger than 128 in the SPDK's CPU mask. If the option is not specifed, DPDK will use default value of RTE_MAX_LCORE. --max-lcores range is [1..1024] Example usage: ./configure --max-lcores=256 ./configure --max-lcores=16 Change-Id: I47d321ba394c9acf27eaa91619aeaad28db6de34 Signed-off-by: Marcin Spiewak <marcin.spiewak@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17453 Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com> Community-CI: Mellanox Build Bot
This commit is contained in:
parent
a4463cbc64
commit
ceb3747451
3
CONFIG
3
CONFIG
@ -217,3 +217,6 @@ CONFIG_SMA=n
|
||||
|
||||
# Build with Avahi support
|
||||
CONFIG_AVAHI=n
|
||||
|
||||
# Setup DPDK's RTE_MAX_LCORES
|
||||
CONFIG_MAX_LCORES=
|
||||
|
16
configure
vendored
16
configure
vendored
@ -28,6 +28,7 @@ function usage() {
|
||||
echo " --cross-prefix=prefix Prefix for cross compilation (default: none)"
|
||||
echo " example: aarch64-linux-gnu"
|
||||
echo " --libdir=path Configure installation path for the libraries (default: \$prefix/lib)"
|
||||
echo " --max-lcores=VAL DPDK configuration. Maximum number of lcores supported by EAL."
|
||||
echo ""
|
||||
echo " --enable-debug Configure for debug builds"
|
||||
echo " --enable-werror Treat compiler warnings as errors"
|
||||
@ -651,6 +652,14 @@ for i in "$@"; do
|
||||
--without-avahi)
|
||||
CONFIG[AVAHI]=n
|
||||
;;
|
||||
--max-lcores='')
|
||||
echo "Must specify max number of lcores for --max-lcores"
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
--max-lcores=*)
|
||||
CONFIG[MAX_LCORES]="${i#*=}"
|
||||
;;
|
||||
--)
|
||||
break
|
||||
;;
|
||||
@ -1250,6 +1259,13 @@ if [[ "${CONFIG[AVAHI]}" = "y" ]]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n ${CONFIG[MAX_LCORES]} ]]; then
|
||||
if [[ ! ${CONFIG[MAX_LCORES]} =~ ^[1-9][0-9]*$ ]] || ((CONFIG[MAX_LCORES] > 1024)); then
|
||||
echo "ERROR: Max number of lcores must be a decimal number in range [1..1024] (given: ${CONFIG[MAX_LCORES]})"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# For ARM Neoverse-N1 platform, debug build needs gcc version newer than 8.4
|
||||
if [[ "${CONFIG[DEBUG]}" = "y" && $arch = aarch64* && "$CC_TYPE" = "gcc" ]]; then
|
||||
GCC_VERSION=$($CC -dumpfullversion)
|
||||
|
@ -103,6 +103,10 @@ endif
|
||||
|
||||
DPDK_CFLAGS += -fPIC
|
||||
|
||||
ifneq ($(CONFIG_MAX_LCORES),)
|
||||
DPDK_OPTS += -Dmax_lcores=$(CONFIG_MAX_LCORES)
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_WERROR),y)
|
||||
DPDK_CFLAGS += -Werror
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user