configure: Check if DPDK support mlx5_pci PMD
Since SPDK supports DPDK version older than 21.02 which introduces mlx5_pci PMD, we should check DPDK version in use before enabling build of DPDK libraries. Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com> Change-Id: Ie86a055bfd079f0b0595649a5d6f60d23e1b1185 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9257 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: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
3c5cff613b
commit
e71ae46797
29
configure
vendored
29
configure
vendored
@ -734,13 +734,36 @@ if [[ "${CONFIG[REDUCE]}" = "y" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if echo -e '#include <spdk/stdinc.h>\n' \
|
||||
CONFIG[REDUCE_MLX5]="y"
|
||||
# Check if libmlx5 exists to enable mlx5_pci compress PMD
|
||||
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"
|
||||
echo "libmlx5 is not found, so disabling DPDK mlx5_pci compress PMD"
|
||||
CONFIG[REDUCE_MLX5]="n"
|
||||
fi
|
||||
|
||||
if [[ "${CONFIG[DPDK_PKG_CONFIG]}" = "y" ]]; then
|
||||
# Check if librte_compress_mlx5 exists in DPDK package
|
||||
if [ ! -f "${CONFIG[DPDK_LIB_DIR]}"/librte_compress_mlx5.so ]; then
|
||||
echo "librte_compress_mlx5 is not found, so disabling DPDK mlx5_pci compress PMD"
|
||||
CONFIG[REDUCE_MLX5]="n"
|
||||
fi
|
||||
else
|
||||
# Check DPDK version to determine if mlx5_pci driver is supported
|
||||
if [ ! -f "${CONFIG[DPDK_DIR]}"/../VERSION ]; then
|
||||
echo "Can get DPDK version, so disabling DPDK mlx5_pci compress PMD"
|
||||
CONFIG[REDUCE_MLX5]="n"
|
||||
else
|
||||
# mlx5_pci is supported by DPDK >- 21.02.0
|
||||
dpdk_ver=$(cat "${CONFIG[DPDK_DIR]}"/../VERSION)
|
||||
if lt "$dpdk_ver" 21.02.0; then
|
||||
echo "DPDK version ${dpdk_ver} doesn't support mlx5_pci compress PMD"
|
||||
CONFIG[REDUCE_MLX5]="n"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user