Spdk/lib/env_dpdk
Darek Stojaczyk 508d2b6f34 pci: handle detaching a device in secondary processes
Upon detaching a device in a secondary process, DPDK 18.11
will try to detach it from the primary process as well.
SPDK doesn't support such hot-detach and will reject it
in the primary process. That will cause the secondary
process to also reject its detach. The device in the
secondary process will be still there in DPDK, but for
SPDK it will remain inaccessible - neither attach, nor
enumerate will work on it.

To fix it, we make our attach and enumerate functions
always check the process local list of devices probed
by DPDK, but not attached in SPDK.

Looking at the patch from a different perspective, it
simply introduces error handling for the DPDK detach
function. If a device failed to detach, we'll now maintain
it locally in SPDK to make it attach-able again.

Change-Id: I8c509a571bea7a9fb413c9c2bfd64c62ad91074b
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/434413 (master)
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/448375
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
..
env_internal.h pci: keep device information in the spdk_pci_device struct 2019-03-22 08:16:19 +00:00
env.c env: drop DPDK 16.07 support 2019-03-22 08:16:19 +00:00
env.mk mk: add spdk_lib_list_to_shared_libs 2018-10-15 16:44:36 +00:00
init.c env/dpdk: always set base-virtaddr 2019-03-22 08:16:19 +00:00
Makefile env: add pci_virtio.c 2017-09-26 14:28:24 -04:00
memory.c memory: return first translation from mem_map_translate 2018-12-14 17:59:03 +00:00
pci_ioat.c env: drop DPDK 16.07 support 2019-03-22 08:16:19 +00:00
pci_nvme.c env: drop DPDK 16.07 support 2019-03-22 08:16:19 +00:00
pci_virtio.c env: drop DPDK 16.07 support 2019-03-22 08:16:19 +00:00
pci.c pci: handle detaching a device in secondary processes 2019-03-22 08:16:19 +00:00
threads.c env: drop DPDK 16.07 support 2019-03-22 08:16:19 +00:00
vtophys.c env: drop DPDK 16.07 support 2019-03-22 08:16:19 +00:00