0cee787483
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 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>