Spdk/lib/env_dpdk
Darek Stojaczyk 60b7ff32f3 pci: allow devices to be attached by surprise
With all the error checks and segfault preventions in place,
we can finally enable hotplug in a multi-process scenario
for DPDK 18.11+.

If a device is attached in the primary process, it will send
an attach IPC request to the secondary process which needs
to succeed. Until now it would get rejected, and the attach
would fail in all the processes.

The device in secondary process will be now probed by DPDK
and will be put into the process local SPDK list of devices
to be locally attached. Either SPDK will attach it sometime
later on any attach/enumerate request, or DPDK will remove
it automatically once the same device in the primary process
gets removed.

We also allow the surprise attach in primary processes, as
it's technically possible for the pci devices (NVMe) to
be attached exclusively from the secondary process. The
fact that the NVMe stack doesn't support it is another story.
Currently the NVMe stack will handle the failure by itself
just fine.

Change-Id: Ia24a8b4610cc7c659f59a2fdda9d8a78e58af873
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/434416 (master)
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/448378
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: register dpdk pci drivers right after init 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 pci: register dpdk pci drivers right after init 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 pci: register dpdk pci drivers right after init 2019-03-22 08:16:19 +00:00
pci_nvme.c pci: register dpdk pci drivers right after init 2019-03-22 08:16:19 +00:00
pci_virtio.c pci: register dpdk pci drivers right after init 2019-03-22 08:16:19 +00:00
pci.c pci: allow devices to be attached by surprise 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