aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--build/external/Makefile2
-rw-r--r--build/external/mlx_rdma_dpdk_matrix.txt1
-rw-r--r--build/external/packages.mk4
-rw-r--r--build/external/packages/dpdk.mk9
5 files changed, 16 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 4cd9e9b1d51..4d3ba7578f6 100644
--- a/Makefile
+++ b/Makefile
@@ -760,3 +760,7 @@ ifeq ($(OS_ID)-$(OS_VERSION_ID),$(MAKE_VERIFY_GATE_OS))
else
$(call banner,"Skipping tests. Tests under 'make verify' supported on $(MAKE_VERIFY_GATE_OS)")
endif
+
+.PHONY: check-dpdk-mlx
+check-dpdk-mlx:
+ @[ $$(make -sC build/external dpdk-show-DPDK_MLX_DEFAULT) = y ] \ No newline at end of file
diff --git a/build/external/Makefile b/build/external/Makefile
index 9f6a6cee476..b036313afee 100644
--- a/build/external/Makefile
+++ b/build/external/Makefile
@@ -38,8 +38,8 @@ ARCH_X86_64=$(filter x86_64,$(shell uname -m))
include packages.mk
include packages/ipsec-mb.mk
include packages/quicly.mk
-include packages/dpdk.mk
include packages/rdma-core.mk
+include packages/dpdk.mk
include packages/libbpf.mk
.PHONY: clean
diff --git a/build/external/mlx_rdma_dpdk_matrix.txt b/build/external/mlx_rdma_dpdk_matrix.txt
new file mode 100644
index 00000000000..9fdd83a51c4
--- /dev/null
+++ b/build/external/mlx_rdma_dpdk_matrix.txt
@@ -0,0 +1 @@
+rdma=41.0 dpdk=22.07 \ No newline at end of file
diff --git a/build/external/packages.mk b/build/external/packages.mk
index 005c2a958b2..99322ae3bef 100644
--- a/build/external/packages.mk
+++ b/build/external/packages.mk
@@ -146,5 +146,9 @@ $(B)/.$1.install.ok: $(B)/.$1.build.ok
.PHONY: $1-install
$1-install: $(B)/.$1.install.ok
+.PHONY: $1-show-%
+$1-show-%:
+ @echo $$($$*)
+
ALL_TARGETS += $1-install
endef
diff --git a/build/external/packages/dpdk.mk b/build/external/packages/dpdk.mk
index b963c363738..bf27d8aa731 100644
--- a/build/external/packages/dpdk.mk
+++ b/build/external/packages/dpdk.mk
@@ -14,9 +14,6 @@
DPDK_PKTMBUF_HEADROOM ?= 128
DPDK_USE_LIBBSD ?= n
DPDK_DEBUG ?= n
-DPDK_MLX4_PMD ?= n
-DPDK_MLX5_PMD ?= n
-DPDK_MLX5_COMMON_PMD ?= n
DPDK_TAP_PMD ?= n
DPDK_FAILSAFE_PMD ?= n
DPDK_MACHINE ?= default
@@ -34,6 +31,11 @@ dpdk_tarball_md5sum := $(dpdk_tarball_md5sum_$(dpdk_version))
dpdk_url := $(dpdk_base_url)/$(dpdk_tarball)
dpdk_tarball_strip_dirs := 1
dpdk_depends := rdma-core $(if $(ARCH_X86_64), ipsec-mb)
+
+DPDK_MLX_DEFAULT := $(shell if grep -q "rdma=$(rdma-core_version) dpdk=$(dpdk_version)" mlx_rdma_dpdk_matrix.txt; then echo 'y'; else echo 'n'; fi)
+DPDK_MLX4_PMD ?= $(DPDK_MLX_DEFAULT)
+DPDK_MLX5_PMD ?= $(DPDK_MLX_DEFAULT)
+DPDK_MLX5_COMMON_PMD ?= $(DPDK_MLX_DEFAULT)
# Debug or release
DPDK_BUILD_TYPE:=release
@@ -173,6 +175,7 @@ PIP_DOWNLOAD_DIR = $(CURDIR)/downloads/
define dpdk_config_cmds
cd $(dpdk_build_dir) && \
+ echo "DPDK_MLX_DEFAULT=$(DPDK_MLX_DEFAULT)" > dpdk_mlx_default.sh && \
rm -rf ../dpdk-meson-venv && \
mkdir -p ../dpdk-meson-venv && \
python3 -m venv ../dpdk-meson-venv && \