From f896aa6f1013830e2d1a4175d3bfc57144860cff Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Wed, 28 Oct 2020 17:27:13 +0000 Subject: [PATCH] env_dpdk: add rte_rcu library dependency rte_hash depends on rte_rcu starting in upcoming DPDK 20.11 release. rte_rcu was only added in DPDK 19.05 release, so we need to check if it exists before linking it. Fixes issue #1661. Signed-off-by: Jim Harris Change-Id: I7e343c6f964b03cc62484b57803a3bad00f80288 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4947 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Tomasz Zawadzki Reviewed-by: Aleksey Marchuk --- lib/env_dpdk/env.mk | 3 +++ test/external_code/hello_world/Makefile | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/env_dpdk/env.mk b/lib/env_dpdk/env.mk index ad9cd2434a..b631377c4f 100644 --- a/lib/env_dpdk/env.mk +++ b/lib/env_dpdk/env.mk @@ -114,6 +114,9 @@ endif ifeq ($(LINK_HASH),y) DPDK_LIB_LIST += rte_hash +ifneq (, $(wildcard $(DPDK_ABS_DIR)/lib/librte_rcu.*)) +DPDK_LIB_LIST += rte_rcu +endif endif DPDK_SHARED_LIB = $(DPDK_LIB_LIST:%=$(DPDK_ABS_DIR)/lib/lib%.so) diff --git a/test/external_code/hello_world/Makefile b/test/external_code/hello_world/Makefile index 0bb9131897..90265db90c 100644 --- a/test/external_code/hello_world/Makefile +++ b/test/external_code/hello_world/Makefile @@ -33,7 +33,7 @@ DPDK_LIB = -lrte_eal -lrte_mempool -lrte_ring -lrte_mbuf -lrte_mempool_ring -lrte_pci DPDK_LIB += -lrte_bus_pci -lrte_kvargs -lrte_vhost -lrte_net -lrte_hash -lrte_telemetry -DPDK_LIB += -lrte_cryptodev -lrte_power +DPDK_LIB += -lrte_cryptodev -lrte_power -lrte_rcu # Shows how to compile both an external bdev and an external application against the SPDK combined shared object and dpdk shared objects. bdev_shared_combo: