Commit 80e4f5ae authored by Changpeng Liu's avatar Changpeng Liu Committed by Jim Harris
Browse files

env/dpdk: make SPDK can compile with DPDK 17.05



Change-Id: Id69a162b6f2abfdcd4d41b368cfcde52665eb904
Signed-off-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
parent 01af49aa
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -51,9 +51,13 @@
#include <stdbool.h>

#include <rte_config.h>
#include <rte_version.h>
#include <rte_eal.h>
#if RTE_VERSION >= RTE_VERSION_NUM(17, 05, 0, 0)
#include <rte_bus.h>
extern struct rte_pci_bus rte_pci_bus;
#endif
#include <rte_pci.h>
#include <rte_version.h>
#include <rte_dev.h>

struct spdk_pci_enum_ctx {
+4 −0
Original line number Diff line number Diff line
@@ -170,7 +170,11 @@ spdk_pci_get_device(struct spdk_pci_addr *pci_addr)
	addr.devid = pci_addr->dev;
	addr.function = pci_addr->func;

#if RTE_VERSION >= RTE_VERSION_NUM(17, 05, 0, 0)
	FOREACH_DEVICE_ON_PCIBUS(dev) {
#else
	TAILQ_FOREACH(dev, &pci_device_list, next) {
#endif
		rc = rte_eal_compare_pci_addr(&dev->addr, &addr);
		if (rc < 0) {
			continue;