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); }