Commit 779dd1bc authored by Dariusz Stojaczyk's avatar Dariusz Stojaczyk Committed by Ben Walker
Browse files

env/dpdk: compile with rte_pci and rte_bus_pci for DPDK 17.11-rc1



DPDK 17.11-rc1 moved a part of it's
eal code into two separate libraries.

Change-Id: Ibcea448487a001c30abb68447e3fe2104ba9a7c3
Signed-off-by: default avatarDariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/387655


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent db704770
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -76,6 +76,16 @@ ifneq ($(wildcard $(DPDK_ABS_DIR)/lib/librte_malloc.*),)
DPDK_LIB_LIST += rte_malloc
endif

# librte_pci and librte_bus_pci were added in DPDK 17.11. Link these libraries conditionally
# based on their existence to maintain backward compatibility.
ifneq (, $(wildcard $(DPDK_ABS_DIR)/lib/librte_pci.*))
DPDK_LIB_LIST += rte_pci
endif

ifneq (, $(wildcard $(DPDK_ABS_DIR)/lib/librte_bus_pci.*))
DPDK_LIB_LIST += rte_bus_pci
endif

DPDK_LIB = $(DPDK_LIB_LIST:%=$(DPDK_ABS_DIR)/lib/lib%$(DPDK_LIB_EXT))

ENV_CFLAGS = $(DPDK_INC)
+3 −0
Original line number Diff line number Diff line
@@ -48,6 +48,9 @@
extern struct rte_pci_bus rte_pci_bus;
#endif
#include <rte_pci.h>
#if RTE_VERSION >= RTE_VERSION_NUM(17, 11, 0, 1)
#include <rte_bus_pci.h>
#endif
#include <rte_dev.h>

/* x86-64 userspace virtual addresses use only the low 47 bits [0..46],