aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build-data/packages/external.mk5
-rw-r--r--build/external/packages/dpdk.mk3
-rw-r--r--src/plugins/dpdk/CMakeLists.txt12
3 files changed, 17 insertions, 3 deletions
diff --git a/build-data/packages/external.mk b/build-data/packages/external.mk
index 138feb78497..1ed3f09af34 100644
--- a/build-data/packages/external.mk
+++ b/build-data/packages/external.mk
@@ -29,6 +29,11 @@ ifneq ($(DPDK_MLX5_PMD),)
DPDK_MAKE_ARGS += DPDK_MLX5_PMD=y
endif
+DPDK_MLX5_PMD_DLOPEN_DEPS=$(strip $($(PLATFORM)_uses_dpdk_mlx5_dlopen_deps))
+ifneq ($(DPDK_MLX5_PMD_DLOPEN_DEPS),)
+DPDK_MAKE_ARGS += DPDK_MLX5_PMD_DLOPEN_DEPS=y
+endif
+
DPDK_MLX4_PMD=$(strip $($(PLATFORM)_uses_dpdk_mlx4_pmd))
ifneq ($(DPDK_MLX4_PMD),)
DPDK_MAKE_ARGS += DPDK_MLX4_PMD=y
diff --git a/build/external/packages/dpdk.mk b/build/external/packages/dpdk.mk
index 72301e543af..aeaa7e4943b 100644
--- a/build/external/packages/dpdk.mk
+++ b/build/external/packages/dpdk.mk
@@ -17,6 +17,7 @@ DPDK_DOWNLOAD_DIR ?= $(DL_CACHE_DIR)
DPDK_DEBUG ?= n
DPDK_MLX4_PMD ?= n
DPDK_MLX5_PMD ?= n
+DPDK_MLX5_PMD_DLOPEN_DEPS ?= n
DPDK_TAP_PMD ?= n
DPDK_FAILSAFE_PMD ?= n
@@ -196,7 +197,7 @@ $(B)/custom-config: $(B)/.patch.ok Makefile
$(call set,RTE_LIBRTE_MLX5_PMD,$(DPDK_MLX5_PMD))
$(call set,RTE_LIBRTE_PMD_SOFTNIC,n)
$(call set,RTE_LIBRTE_MLX4_DLOPEN_DEPS,$(DPDK_MLX4_PMD))
- $(call set,RTE_LIBRTE_MLX5_DLOPEN_DEPS,$(DPDK_MLX5_PMD))
+ $(call set,RTE_LIBRTE_MLX5_DLOPEN_DEPS,$(DPDK_MLX5_PMD_DLOPEN_DEPS))
$(call set,RTE_LIBRTE_PMD_TAP,$(DPDK_TAP_PMD))
$(call set,RTE_LIBRTE_PMD_FAILSAFE,$(DPDK_FAILSAFE_PMD))
@# not needed
diff --git a/src/plugins/dpdk/CMakeLists.txt b/src/plugins/dpdk/CMakeLists.txt
index a0a083966b3..ed743ea6d9d 100644
--- a/src/plugins/dpdk/CMakeLists.txt
+++ b/src/plugins/dpdk/CMakeLists.txt
@@ -39,6 +39,9 @@ int main()
#endif
#ifdef RTE_LIBRTE_MLX5_PMD
printf(\"RTE_LIBRTE_MLX5_PMD=%u\\n\", RTE_LIBRTE_MLX5_PMD);
+#ifdef RTE_LIBRTE_MLX5_DLOPEN_DEPS
+ printf(\"RTE_LIBRTE_MLX5_DLOPEN_DEPS=%u\\n\", RTE_LIBRTE_MLX5_DLOPEN_DEPS);
+#endif
#endif
return 0;
}
@@ -95,8 +98,13 @@ if(DPDK_INCLUDE_DIR AND DPDK_LIB)
message(STATUS "DPDK depends on IPSec MB library")
endif()
if(DPDK_RTE_LIBRTE_MLX4_PMD OR DPDK_RTE_LIBRTE_MLX5_PMD)
- set(DPDK_LINK_FLAGS "${DPDK_LINK_FLAGS} -Wl,-lmnl")
- message(STATUS "DPDK depends on libmnl (Mellanox PMD requirement)")
+ if (DPDK_RTE_LIBRTE_MLX5_DLOPEN_DEPS)
+ set(DPDK_LINK_FLAGS "${DPDK_LINK_FLAGS} -Wl,-lmnl")
+ message(STATUS "DPDK depends on libmnl (Mellanox PMD requirement)")
+ else()
+ set(DPDK_LINK_FLAGS "${DPDK_LINK_FLAGS} -Wl,-lmnl,-libverbs,-lmlx5")
+ message(STATUS "DPDK depends on libmnl, libibverbs, libmlx5 (Mellanox PMD requirement)")
+ endif()
endif()
set(DPDK_LINK_FLAGS "${DPDK_LINK_FLAGS} -Wl,-lnuma")
add_vpp_plugin(dpdk