From c708e6dfdb3e1787b35e2762319c13c44d29799d Mon Sep 17 00:00:00 2001 From: Tomasz Zawadzki Date: Tue, 25 Jan 2022 10:58:49 +0100 Subject: [PATCH] test/dpdk: enable kmods on FreeBSD for upstream DPDK tests To compile contigmem and nic_uio in DPDK the `enable_kmods` flag has to be enabled in meson. This is required for FreeBSD. This is done in dpdkbuild/Makefile for the submodule, but is needed in build_native_dpdk() for upstream DPDK tests. While here, removed comment in autotest_common.sh that refered to patch that was already upstreamed to DPDK. See: https://review.spdk.io/gerrit/c/spdk/dpdk/+/2534 Signed-off-by: Tomasz Zawadzki Change-Id: I2ee17ed5b62291881e64b687c642a81993e03e36 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11238 Community-CI: Broadcom CI Tested-by: SPDK CI Jenkins Reviewed-by: Konrad Sztyber Reviewed-by: Michal Berger Reviewed-by: Pawel Piatek Reviewed-by: Jim Harris --- autobuild.sh | 8 +++++++- test/common/autotest_common.sh | 1 - 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/autobuild.sh b/autobuild.sh index b128230ab..bf91951f8 100755 --- a/autobuild.sh +++ b/autobuild.sh @@ -57,6 +57,7 @@ function build_native_dpdk() { local external_dpdk_base_dir local compiler_version local compiler + local dpdk_kmods compiler=${CC:-gcc} @@ -167,8 +168,13 @@ function build_native_dpdk() { fi fi + dpdk_kmods="false" + if [ "$(uname -s)" = "FreeBSD" ]; then + dpdk_kmods="true" + fi + meson build-tmp --prefix="$external_dpdk_dir" --libdir lib \ - -Denable_docs=false -Denable_kmods=false -Dtests=false \ + -Denable_docs=false -Denable_kmods="$dpdk_kmods" -Dtests=false \ -Dc_link_args="$dpdk_ldflags" -Dc_args="$dpdk_cflags" \ -Dmachine=native -Denable_drivers=$(printf "%s," "${DPDK_DRIVERS[@]}") ninja -C "$external_dpdk_base_dir/build-tmp" $MAKEFLAGS diff --git a/test/common/autotest_common.sh b/test/common/autotest_common.sh index 818997a99..a360ff626 100755 --- a/test/common/autotest_common.sh +++ b/test/common/autotest_common.sh @@ -1265,7 +1265,6 @@ function freebsd_update_contigmem_mod() { if [ $(uname) = FreeBSD ]; then kldunload contigmem.ko || true if [ -n "$SPDK_RUN_EXTERNAL_DPDK" ]; then - echo "Warning: SPDK only works on FreeBSD with patches that only exist in SPDK's dpdk submodule" cp -f "$SPDK_RUN_EXTERNAL_DPDK/kmod/contigmem.ko" /boot/modules/ cp -f "$SPDK_RUN_EXTERNAL_DPDK/kmod/contigmem.ko" /boot/kernel/ cp -f "$SPDK_RUN_EXTERNAL_DPDK/kmod/nic_uio.ko" /boot/modules/