From 5ac6129908037ce33d02fcab470c4fa9edda5061 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Mon, 23 Apr 2018 11:35:28 -0700 Subject: [PATCH] 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 Reviewed-on: https://review.gerrithub.io/408743 Tested-by: SPDK Automated Test System Reviewed-by: Jim Harris Reviewed-by: Dariusz Stojaczyk Reviewed-by: Shuhei Matsumoto Reviewed-by: Changpeng Liu --- lib/env_dpdk/vtophys.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/env_dpdk/vtophys.c b/lib/env_dpdk/vtophys.c index 14e57331f..254997c0a 100644 --- a/lib/env_dpdk/vtophys.c +++ b/lib/env_dpdk/vtophys.c @@ -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);