Spdk/lib/env_dpdk
Darek Stojaczyk 9a59463b3b 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
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-12-04 15:41:21 +00:00
..
env_internal.h pci: keep device information in the spdk_pci_device struct 2018-12-04 15:41:21 +00:00
env.c env: drop DPDK 16.07 support 2018-11-30 19:59:34 +00:00
env.mk dpdkbuild: stop building ipsec library with make 2018-10-31 21:55:37 +00:00
init.c env: add --huge-dir option 2018-11-08 23:09:34 +00:00
Makefile env: add pci_virtio.c 2017-09-26 14:28:24 -04:00
memory.c memory: fix contiguous memory calculation for unaligned buffers 2018-11-29 15:16:13 +00:00
pci_ioat.c env: drop DPDK 16.07 support 2018-11-30 19:59:34 +00:00
pci_nvme.c env: drop DPDK 16.07 support 2018-11-30 19:59:34 +00:00
pci_virtio.c env: drop DPDK 16.07 support 2018-11-30 19:59:34 +00:00
pci.c pci: handle detaching a device in secondary processes 2018-12-04 15:41:21 +00:00
threads.c env: drop DPDK 16.07 support 2018-11-30 19:59:34 +00:00
vtophys.c env: drop DPDK 16.07 support 2018-11-30 19:59:34 +00:00