numam-spdk/lib/env_dpdk
Changpeng Liu 76e1ac04c7 env/dpdk: fix the PCI detach error in secondary process
DPDK will report error when detaching the PCI device in secondary
process, because SPDK will return -1 in `pci_device_fini`, so
here we will reset the `attached` flag before that.

Also return the errno instead of -1.

Change-Id: I3efa4d97ceab504215faeb9d3d80a694bdd6014c
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7944
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
2021-10-22 00:36:41 +00:00
..
env_internal.h env/dpdk: revert 8f7d9ec "env/dpdk: Use the DPDK device count for IOMMU mapping" 2021-09-24 07:40:21 +00:00
env.c spdk_zmalloc: Remove unnecessary memset() 2021-05-11 11:49:06 +00:00
env.mk dpdk: update DPDK to 21.08 version 2021-08-25 07:26:17 +00:00
init.c env/dpdk: revert 8f7d9ec "env/dpdk: Use the DPDK device count for IOMMU mapping" 2021-09-24 07:40:21 +00:00
Makefile configure: Build against installed DPDK instance 2021-06-29 18:17:43 +00:00
memory.c env/dpdk: revert 8f7d9ec "env/dpdk: Use the DPDK device count for IOMMU mapping" 2021-09-24 07:40:21 +00:00
pci_event.c env: extend the use of event listen 2021-04-16 19:21:13 +00:00
pci_idxd.c env: fix pci driver registration 2020-08-27 08:36:43 +00:00
pci_ioat.c env: fix pci driver registration 2020-08-27 08:36:43 +00:00
pci_virtio.c env: fix pci driver registration 2020-08-27 08:36:43 +00:00
pci_vmd.c vmd: update for changes in IceLake platform 2021-08-31 08:39:37 +00:00
pci.c env/dpdk: fix the PCI detach error in secondary process 2021-10-22 00:36:41 +00:00
sigbus_handler.c env: only pass failing address to spdk_pci_error_handler 2021-06-15 08:34:28 +00:00
spdk_env_dpdk.map lib: add a hotplug lib for device 2021-04-12 09:48:21 +00:00
threads.c Revert "thread: add spdk_env_get_primary_core" 2020-07-29 14:58:44 +00:00