diff --git a/lib/env_dpdk/env.mk b/lib/env_dpdk/env.mk index 13acf8407..fa942f01d 100644 --- a/lib/env_dpdk/env.mk +++ b/lib/env_dpdk/env.mk @@ -38,9 +38,15 @@ DPDK_LIB_LIST += rte_telemetry rte_kvargs DPDK_POWER=n ifeq ($(OS),Linux) +# Despite rte_power was added DPDK 1.6, +# some DPDK packages do not include it. See #2534. +ifneq (, $(wildcard $(DPDK_LIB_DIR)/librte_power.*)) DPDK_POWER=y +# Since DPDK 21.02 rte_power depends on rte_ethdev that +# in turn depends on rte_net. DPDK_LIB_LIST += rte_power rte_ethdev rte_net endif +endif # There are some complex dependencies when using crypto, reduce or both so # here we add the feature specific ones and set a flag to add the common diff --git a/module/scheduler/Makefile b/module/scheduler/Makefile index 2e2f8f8cd..83f48c905 100644 --- a/module/scheduler/Makefile +++ b/module/scheduler/Makefile @@ -8,10 +8,12 @@ include $(SPDK_ROOT_DIR)/mk/spdk.common.mk DIRS-y = dynamic -# Do not compile schedulers and governors based on DPDK env -# if non-DPDK env is used. +# When DPDK rte_power is missing, do not compile schedulers +# and governors based on it. ifeq (y,$(DPDK_POWER)) DIRS-y += dpdk_governor gscheduler +else +$(warning Skipping building dpdk_governor and gscheduler, due to missing rte_power) endif .PHONY: all clean $(DIRS-y)