Spdk/lib/env_dpdk
Darek Stojaczyk 5980c657bd pci: prevent surprise DPDK device removal
In DPDK 18.11, a device can be potentially detached not only
upon an SPDK request, but also directly from within the DPDK
itself. In a multi-process scenario, when one process detaches
the PCI device, an IPC message - detach request - will be sent
to every other process in the same shared memory group. As we
don't propagate the removal notification to upper layers, the
still-referenced rte_pci_device object will just disappear at
one moment.

SPDK is still not ready for supporting the above case and will
try to avoid it, but just in case some detach request slips
through, then this patch provides the sanity checks preventing
SPDK from crashing.

Change-Id: I3e35d8efb33085163b9acd8a565e86a4221df844
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/434412 (master)
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/448373
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: prevent surprise DPDK device removal 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: prevent surprise DPDK device removal 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