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 <james.r.harris@intel.com>
Change-Id: I7e343c6f964b03cc62484b57803a3bad00f80288
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4947
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
Jim Harris 2020-10-28 17:27:13 +00:00 committed by Tomasz Zawadzki
parent f2196fcafb
commit f896aa6f10
2 changed files with 4 additions and 1 deletions

View File

@ -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)

View File

@ -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: