numam-spdk/test/unit
Darek Stojaczyk ebb89b20ca nvme: detach PCI device in secondary process
We only detached the PCI device on the controller destruction,
which happens just once - in the primary process, but secondary
process needs the PCI detach as well.

Requesting to hotremove the NVMe PCIe controller in secondary
process is broken, because DPDK will still keep the device
reference and won't allow SPDK to hotplug it again.

Fix this by detaching the local PCI device whenever removing
a secondary process from spdk_nvme_ctrlr. This does require
an additional transport check in the generic NVMe layer, but
I found it an overkill to create a multi-process transport
abstraction just for this case.

Change-Id: I812dc1c878ade5b149556806228a2afcb49f0b17
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/431487 (master)
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/448364
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-03-22 08:16:19 +00:00
..
include test: use spdk.unittest.mk for histogram_data.h unit tests 2018-02-14 11:07:05 -05:00
lib nvme: detach PCI device in secondary process 2019-03-22 08:16:19 +00:00
Makefile test: add histogram unit tests 2017-12-29 14:20:48 -05:00
unittest.sh test/unit: add nvme_rdma.c unittests 2018-10-09 21:17:17 +00:00