Spdk/lib/env_dpdk
Jim Harris 6dc9dbe5ca env_dpdk: don't call remove_rte_dev from secondary proc
During secondary process shutdown, when nvme device
would get detached, it would trigger env_dpdk to
send rte_eal_hotplug_remove event for the corresponding
BDF.  But this isn't valid from a secondary process -
we can only attach/detach from the primary process.

Usually this would just result in a bunch of annoying
print messages as the secondary and primary process
sent rte messages between each other.  But occasionally
one of the response messages from the primary process
could arrive just as the secondary process was going
through rte_eal_cleanup.  The message would get
kicked to the DPDK intr thread, we would do bus_cleanup
which frees all of the PCI state, and then the message
would execute on the intr thread causing seg faults,
use-after-free or some other violation.

It's possible some kind of cleanup should be
implemented in DPDK, but for now, let's just not
induce incorrect behavior from SPDK, and don't send
the hotplug_remove messages from a secondary
process.

Fixes issue #2651.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ie431a1f8e74503e1de1be36cbb9589682d6dc94a

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16553
Reviewed-by: Michal Berger <michal.berger@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-27 08:46:05 +00:00
..
22.07 env_dpdk: DPDK 22.07 PCI now includes in-tree headers 2022-12-16 09:27:11 +00:00
22.11 env_dpdk: align copyright notice with DPDK 2022-12-15 08:41:05 +00:00
env_internal.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
env.c env_dpdk: Add function to iterate memory chunks in a pool 2023-01-20 17:56:34 +00:00
env.mk module/accel: Add compressDev accel_module 2023-01-19 11:16:01 +00:00
init.c env_dpdk: clean up DPDK args print during init 2023-01-17 19:46:50 +00:00
Makefile so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
memory.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
pci_dpdk_2207.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
pci_dpdk_2211.c env_dpdk: allow 2211.c file to build against older DPDK 2022-11-15 08:31:28 +00:00
pci_dpdk.c env_dpdk: do not use rte_version_release() 2023-01-10 13:09:18 +00:00
pci_dpdk.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
pci_event.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
pci_idxd.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
pci_ioat.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
pci_virtio.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
pci_vmd.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
pci.c env_dpdk: don't call remove_rte_dev from secondary proc 2023-01-27 08:46:05 +00:00
sigbus_handler.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
spdk_env_dpdk.map env_dpdk: Add function to iterate memory chunks in a pool 2023-01-20 17:56:34 +00:00
threads.c update Intel copyright notices 2022-11-10 08:28:53 +00:00