mk: Enable build of mlx5_pci compress PMD

This PMD is availabe for BlueField2 DPU.
It requires libmlx5, so configure file is
updated to check if this library exists

Change-Id: Ic0cfbfdf24af393381667435009fb6afc49d9181
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8780
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Alexey Marchuk 2021-06-15 16:25:07 +03:00 committed by Tomasz Zawadzki
parent 5263f0a12f
commit e269bf4e84
5 changed files with 28 additions and 0 deletions

4
CONFIG
View File

@ -3,6 +3,7 @@
#
# Copyright (c) Intel Corporation.
# All rights reserved.
# Copyright (c) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -141,6 +142,9 @@ CONFIG_PMDK_DIR=
# Enable the dependencies for building the compress vbdev
CONFIG_REDUCE=n
# Enable mlx5_pci dpdk compress PMD, enabled automatically if CONFIG_REDUCE=y and libmlx5 exists
CONFIG_REDUCE_MLX5=n
# Requires libiscsi development libraries.
CONFIG_ISCSI_INITIATOR=n

9
configure vendored
View File

@ -733,6 +733,15 @@ if [[ "${CONFIG[REDUCE]}" = "y" ]]; then
echo "Please install then re-run this script."
exit 1
fi
if echo -e '#include <spdk/stdinc.h>\n' \
'#include <infiniband/mlx5dv.h>\n' \
'#include <infiniband/verbs.h>\n' \
'int main(void) { return 0; }\n' \
| "${BUILD_CMD[@]}" -lmlx5 -I${rootdir}/include -c - 2> /dev/null; then
CONFIG[REDUCE_MLX5]="y"
echo "mlx5 available so enabling DPDK mlx5_pci compress PMD"
fi
fi
if [[ "${CONFIG[NVME_CUSE]}" = "y" ]]; then

View File

@ -3,6 +3,7 @@
#
# Copyright (c) Intel Corporation.
# All rights reserved.
# Copyright (c) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -66,6 +67,9 @@ endif
ifeq ($(CONFIG_REDUCE),y)
DPDK_DRIVERS += compress compress/isal
ifeq ($(CONFIG_REDUCE_MLX5),y)
DPDK_DRIVERS += common/mlx5 compress/mlx5
endif
DPDK_CFLAGS += -I$(ISAL_DIR)
DPDK_LDFLAGS += -L$(ISAL_DIR)/.libs -lisal
endif

View File

@ -3,6 +3,7 @@
#
# Copyright (c) Intel Corporation.
# All rights reserved.
# Copyright (c) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -93,6 +94,9 @@ else
# PMD name for DPDK 20.08 and earlier
DPDK_LIB_LIST += rte_pmd_isal
endif
ifeq ($(CONFIG_REDUCE_MLX5),y)
DPDK_LIB_LIST += rte_common_mlx5 rte_compress_mlx5
endif
endif
ifeq ($(DPDK_FRAMEWORK),y)
@ -146,6 +150,9 @@ endif
ifeq ($(CONFIG_REDUCE),y)
DPDK_PRIVATE_LINKER_ARGS += -lisal -L$(ISAL_DIR)/.libs
ifeq ($(CONFIG_REDUCE_MLX5),y)
DPDK_PRIVATE_LINKER_ARGS += -lmlx5
endif
endif
ifneq (,$(wildcard $(DPDK_INC_DIR)/rte_config.h))

View File

@ -3,6 +3,7 @@
#
# Copyright (c) Intel Corporation.
# All rights reserved.
# Copyright (c) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -57,6 +58,9 @@ endif
ifeq ($(CONFIG_REDUCE),y)
BLOCKDEV_MODULES_LIST += bdev_compress reduce
BLOCKDEV_MODULES_PRIVATE_LIBS += -lpmem
ifeq ($(CONFIG_REDUCE_MLX5),y)
BLOCKDEV_MODULES_PRIVATE_LIBS += -lmlx5
endif
endif
ifeq ($(CONFIG_RDMA),y)