Commit 9cf7d886 authored by Darek Stojaczyk's avatar Darek Stojaczyk
Browse files

pci: do not manually unmap resources if probe fails



We need to do it only for DPDK 16.11, which leaks the
mappings otherwise. DPDK was fixed in version 17.02 with
the following commit:

e84ad157 (pci: unmap resources if probe fails)

Unmapping the resources twice doesn't actually cause
us any trouble, but prints an ambiguous error message.

Change-Id: I8b62e86d5fff8fe924dbf9ae2e37cff29298d412
Signed-off-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/433863


Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent bf9dbae5
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -48,9 +48,7 @@ spdk_pci_device_init(struct rte_pci_driver *driver,
	int rc;

	if (!ctx->cb_fn) {
#if RTE_VERSION >= RTE_VERSION_NUM(17, 05, 0, 4)
		rte_pci_unmap_device(device);
#elif RTE_VERSION >= RTE_VERSION_NUM(16, 11, 0, 0)
#if RTE_VERSION >= RTE_VERSION_NUM(16, 11, 0, 0) && RTE_VERSION < RTE_VERSION_NUM(17, 02, 0, 1)
		rte_eal_pci_unmap_device(device);
#endif