From 050802cda9c63152d17fc16b9c2ed212fee4e6da Mon Sep 17 00:00:00 2001 From: Cunyin Chang Date: Fri, 2 Dec 2016 08:42:13 +0800 Subject: [PATCH] env_dpdk: Remove the device from dev_device_list in DPDK. Change-Id: I4b4b1969d53a4671754ae2b15e51d1169bd36a9e Signed-off-by: Cunyin Chang --- lib/env_dpdk/pci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/env_dpdk/pci.c b/lib/env_dpdk/pci.c index dad862d57..4d4865650 100644 --- a/lib/env_dpdk/pci.c +++ b/lib/env_dpdk/pci.c @@ -47,10 +47,7 @@ #include #include #include - -#if RTE_VERSION < RTE_VERSION_NUM(16, 11, 0, 0) #include -#endif #define spdk_pci_device rte_pci_device @@ -271,6 +268,9 @@ spdk_pci_find_driver(enum spdk_pci_device_type type) void spdk_pci_device_detach(struct spdk_pci_device *device) { +#if RTE_VERSION >= RTE_VERSION_NUM(16, 11, 0, 0) + rte_eal_device_remove(&device->device); +#endif rte_eal_pci_detach(&device->addr); }