numam-spdk/lib/env_dpdk
Darek Stojaczyk def2d0ac3e env/dpdk: detach pci devices from EAL interrupt thread
While detaching the device, DPDK may try to unregister
a VFIO interrupt callback which is currently "in use".
The unregister call may fail, but the error doesn't get
propagated to upper DPDK layers. Practically, detaching
the device may stop in the middle but still return 0 to
SPDK.

This effectively breaks hotremove as the device would
be neither usable or removable.

We work around it in SPDK by internally scheduling the
DPDK device detach on the DPDK interrupt thread. This
prevents any other interrupt callback to be "in use"
while the device is detached.

Since device detach in SPDK can be asynchronous now,
we add a few checks to prevent re-attaching devices
that are still being detached.

Change-Id: Ibb56a8017e34418db0304fe32774811427b056aa
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/448928
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>
2019-04-18 22:49:30 +00:00
..
env_internal.h env/dpdk: add spdk_pci_fini() 2019-03-28 14:50:46 +00:00
env.c env: add flag RING_F_EXACT_SZ to spdk_ring_create 2019-03-21 14:07:03 +00:00
env.mk configure: add option not to use the internal rte_vhost copy 2019-03-13 14:26:20 +00:00
init.c env/dpdk: add spdk_pci_fini() 2019-03-28 14:50:46 +00:00
Makefile env_dpdk: move vtophys.c contents to memory.c 2019-02-20 16:41:46 +00:00
memory.c env/dpdk: drop support for DPDK < 17.11 2019-03-20 21:05:33 +00:00
pci_ioat.c ioat: add device IDs for new CB-DMA engines 2019-02-26 06:50:52 +00:00
pci_nvme.c pci: remove nvme-specific attach functions 2018-12-07 17:24:19 +00:00
pci_virtio.c pci: remove virtio-specific attach functions 2018-12-07 17:24:19 +00:00
pci.c env/dpdk: detach pci devices from EAL interrupt thread 2019-04-18 22:49:30 +00:00
threads.c env: drop DPDK 16.07 support 2018-11-30 19:59:34 +00:00