env_dpdk: fix build with DPDK 16.07

DPDK commit 9df1ae8a888d ("eal: rename and move PCI resource structure")
introduced the new struct rte_mem_resource name; before that point, the
equivalent type was struct rte_pci_resource.

Since this is an easy fix, we can go ahead and patch around it; however,
users are highly recommended to use newer DPDK releases.

Change-Id: I27637136fa932f10032f5f76248da07120fa02a9
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/408743
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
Daniel Verkamp 2018-04-23 11:35:28 -07:00
parent 5d5e402810
commit 5ac6129908

View File

@ -275,7 +275,11 @@ vtophys_get_paddr_pci(uint64_t vaddr)
struct spdk_vtophys_pci_device *vtophys_dev;
uintptr_t paddr;
struct rte_pci_device *dev;
#if RTE_VERSION >= RTE_VERSION_NUM(16, 11, 0, 1)
struct rte_mem_resource *res;
#else
struct rte_pci_resource *res;
#endif
unsigned r;
pthread_mutex_lock(&g_vtophys_pci_devices_mutex);