env_dpdk: Remove the device from dev_device_list in DPDK.

Change-Id: I4b4b1969d53a4671754ae2b15e51d1169bd36a9e
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
This commit is contained in:
Cunyin Chang 2016-12-02 08:42:13 +08:00 committed by Jim Harris
parent 4a0c1021fc
commit 050802cda9

View File

@ -47,10 +47,7 @@
#include <rte_eal.h>
#include <rte_pci.h>
#include <rte_version.h>
#if RTE_VERSION < RTE_VERSION_NUM(16, 11, 0, 0)
#include <rte_dev.h>
#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);
}