Spdk/test/unit/lib/nvme
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
..
nvme_ctrlr_cmd.c nvme: add Get/Set Feature wrappers with NSID 2018-06-12 17:59:33 +00:00
nvme_ctrlr_ocssd_cmd.c ocssd: nvme driver public API extension for Open-Channel 2018-06-12 17:59:33 +00:00
nvme_ctrlr.c nvme: detach PCI device in secondary process 2019-03-22 08:16:19 +00:00
nvme_ns_cmd.c nvme: make nvme_ctrlr_start() static and can return correct errno 2018-09-05 21:55:38 +00:00
nvme_ns_ocssd_cmd.c test/nvme: replace PAGE_SIZE with OCSSD_SECTOR_SIZE 2018-12-13 20:12:00 +00:00
nvme_ns.c nvme: add helper to wait for internal commands 2018-05-28 01:43:55 +00:00
nvme_pcie.c test: Simplify the mock library 2018-08-09 17:18:23 +00:00
nvme_qpair.c test/nvme: add unit test cases for nvme_qpair.c 2018-07-10 01:02:36 +00:00
nvme_quirks.c nvme: add debug logs for matched quirks 2018-02-23 10:07:39 -05:00
nvme_rdma.c test/unit: add nvme_rdma.c unittests 2018-10-09 21:17:17 +00:00
nvme.c nvme: fix the parse of spdk_nvme_transport_id_parse 2018-10-09 07:38:21 +00:00
Makefile test/unit: add nvme_rdma.c unittests 2018-10-09 21:17:17 +00:00